From: Denis Cheng <crquan@gmail.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, chdebra@gmail.com,
Denis Cheng <crquan@gmail.com>
Subject: [PATCH] fs: use kmem_cache_zalloc instead
Date: Fri, 20 Jul 2007 12:07:11 +0800 [thread overview]
Message-ID: <1184904431130-git-send-email-crquan@gmail.com> (raw)
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
fs/file_table.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/file_table.c b/fs/file_table.c
index d17fd69..37453ff 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -102,12 +102,11 @@ struct file *get_empty_filp(void)
goto over;
}
- f = kmem_cache_alloc(filp_cachep, GFP_KERNEL);
+ f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL);
if (f == NULL)
goto fail;
percpu_counter_inc(&nr_files);
- memset(f, 0, sizeof(*f));
if (security_file_alloc(f))
goto fail_sec;
--
1.5.2.2
reply other threads:[~2007-07-20 4:07 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=1184904431130-git-send-email-crquan@gmail.com \
--to=crquan@gmail.com \
--cc=chdebra@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome