From: Joe Perches <joe@perches.com>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, dhowells <dhowells@redhat.com>,
akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] afs: afs_alloc_inode: use kmem_cache_zalloc
Date: Thu, 20 Feb 2014 13:30:28 -0800 [thread overview]
Message-ID: <1392931828.2594.12.camel@joe-AO722> (raw)
In-Reply-To: <20140220211612.506074a7fd876e47130a8c5c@skynet.be>
On Thu, 2014-02-20 at 21:16 +0800, Fabian Frederick wrote:
> afs_vnode is currently cleared with 2 memsets after allocation and
> 1 in constructor (afs_i_init_once).
Trivial comments:
> -This patch calls zalloc for explicit zero fill.
OK, but see below.
> -Fix some typos.
Well...
> diff --git a/fs/afs/super.c b/fs/afs/super.c
[]
> @@ -76,7 +76,7 @@ static const match_table_t afs_options_list = {
[]
> - * initialise the filesystem
> + * Initialize the filesystem
> @@ -448,19 +448,19 @@ error:
[]
> - * initialise an inode cache slab element prior to any use
> + * Initialize an inode cache slab element prior to any use
English spellings don't need to be changed to American.
> @@ -481,15 +481,12 @@ static struct inode *afs_alloc_inode(struct super_block *sb)
[]
> - vnode = kmem_cache_alloc(afs_inode_cachep, GFP_KERNEL);
> + vnode = kmem_cache_zalloc(afs_inode_cachep, GFP_KERNEL);
[]
> - memset(&vnode->fid, 0, sizeof(vnode->fid));
> - memset(&vnode->status, 0, sizeof(vnode->status));
> -
> vnode->volume = NULL;
> vnode->update_cnt = 0;
These could be removed too.
next prev parent reply other threads:[~2014-02-20 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 13:16 Fabian Frederick
2014-02-20 21:30 ` Joe Perches [this message]
2014-02-20 22:03 ` David Howells
2014-02-20 22:23 ` Has slab ctor operation changed? -- was " David Howells
2014-02-20 21:47 ` Fabian Frederick
2014-02-21 0:19 ` Dave Chinner
2014-02-24 19:52 ` Christoph Lameter
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=1392931828.2594.12.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®