* [PATCH] HFSPlus: change kmalloc/memset to kzalloc
@ 2007-06-03 23:04 Wyatt Banks
0 siblings, 0 replies; only message in thread
From: Wyatt Banks @ 2007-06-03 23:04 UTC (permalink / raw)
To: zippel, linux-kernel
From: Wyatt Banks <wyatt@banksresearch.com>
Removed kmalloc and memset in favor of kzalloc.
Signed-off-by: Wyatt Banks <wyatt@banksresearch.com>
---
Patched against 2.6.21.3
To explain the HFSPLUS_SB() macro in the removed memset call:
hfsplus_fs.h:#define HFSPLUS_SB(super) (*(struct hfsplus_sb_info *)(super)->s_fs_info)
--- linux-2.6.21.3/fs/hfsplus/super.c 2007-05-24 17:22:47.000000000 -0400
+++ linux-2.6.21.3-devel/fs/hfsplus/super.c 2007-06-02 12:29:33.000000000 -0400
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct sup
struct nls_table *nls = NULL;
int err = -EINVAL;
- sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL);
+ sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
return -ENOMEM;
- memset(sbi, 0, sizeof(HFSPLUS_SB(sb)));
sb->s_fs_info = sbi;
INIT_HLIST_HEAD(&sbi->rsrc_inodes);
hfsplus_fill_defaults(sbi);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-04 0:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 23:04 [PATCH] HFSPlus: change kmalloc/memset to kzalloc Wyatt Banks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox