Commit d4a95a7e authored by Trond Myklebust's avatar Trond Myklebust

NFS: Always initialise fattr->label in nfs_fattr_alloc()

We're about to add a check in nfs_free_fattr() for whether or not the
label is non-zero.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent aa97a3ef
...@@ -1598,8 +1598,10 @@ struct nfs_fattr *nfs_alloc_fattr(void) ...@@ -1598,8 +1598,10 @@ struct nfs_fattr *nfs_alloc_fattr(void)
struct nfs_fattr *fattr; struct nfs_fattr *fattr;
fattr = kmalloc(sizeof(*fattr), GFP_NOFS); fattr = kmalloc(sizeof(*fattr), GFP_NOFS);
if (fattr != NULL) if (fattr != NULL) {
nfs_fattr_init(fattr); nfs_fattr_init(fattr);
fattr->label = NULL;
}
return fattr; return fattr;
} }
EXPORT_SYMBOL_GPL(nfs_alloc_fattr); EXPORT_SYMBOL_GPL(nfs_alloc_fattr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment