From: Wyatt Banks <wyatt@banksresearch.com>
To: zippel@linux-m68k.org, linux-kernel@vger.kernel.org
Subject: [PATCH] HFSPlus: change kmalloc/memset to kzalloc
Date: Sun, 03 Jun 2007 19:04:23 -0400 [thread overview]
Message-ID: <466348F7.9030904@banksresearch.com> (raw)
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);
reply other threads:[~2007-06-04 0:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=466348F7.9030904@banksresearch.com \
--to=wyatt@banksresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox