diff options
author | Wyatt Banks <wyatt@banksresearch.com> | 2007-07-16 02:40:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:46 -0400 |
commit | a5001a27802723d6de50d9d8a446d594116524b0 (patch) | |
tree | d8ee0ccdf76b00305298d51c5c78d465092d1345 | |
parent | abd4aa5a97ebc0efb9a7fbc98ef0bcf39266fadf (diff) |
HFSPlus: change kmalloc/memset to kzalloc
Removed kmalloc and memset in favor of kzalloc.
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)
Signed-off-by: Wyatt Banks <wyatt@banksresearch.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/hfsplus/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index ebd1b380cbbc..42570c95ad62 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
283 | struct nls_table *nls = NULL; | 283 | struct nls_table *nls = NULL; |
284 | int err = -EINVAL; | 284 | int err = -EINVAL; |
285 | 285 | ||
286 | sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL); | 286 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
287 | if (!sbi) | 287 | if (!sbi) |
288 | return -ENOMEM; | 288 | return -ENOMEM; |
289 | 289 | ||
290 | memset(sbi, 0, sizeof(HFSPLUS_SB(sb))); | ||
291 | sb->s_fs_info = sbi; | 290 | sb->s_fs_info = sbi; |
292 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); | 291 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); |
293 | hfsplus_fill_defaults(sbi); | 292 | hfsplus_fill_defaults(sbi); |