[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1392931828.2594.12.camel@joe-AO722>
Date: Thu, 20 Feb 2014 13:30:28 -0800
From: Joe Perches <joe@...ches.com>
To: Fabian Frederick <fabf@...net.be>
Cc: linux-kernel@...r.kernel.org, dhowells <dhowells@...hat.com>,
akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/1] afs: afs_alloc_inode: use kmem_cache_zalloc
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists