Messages in this thread |  | | Subject | Re: [PATCH 1/1] afs: afs_alloc_inode: use kmem_cache_zalloc | From | Joe Perches <> | Date | Thu, 20 Feb 2014 13:30:28 -0800 |
| |
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.
|  |