Skip to content

Commit d4a95a7

Browse files
author
Trond Myklebust
committed
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: Trond Myklebust <[email protected]>
1 parent aa97a3e commit d4a95a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/nfs/inode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,8 +1598,10 @@ struct nfs_fattr *nfs_alloc_fattr(void)
15981598
struct nfs_fattr *fattr;
15991599

16001600
fattr = kmalloc(sizeof(*fattr), GFP_NOFS);
1601-
if (fattr != NULL)
1601+
if (fattr != NULL) {
16021602
nfs_fattr_init(fattr);
1603+
fattr->label = NULL;
1604+
}
16031605
return fattr;
16041606
}
16051607
EXPORT_SYMBOL_GPL(nfs_alloc_fattr);

0 commit comments

Comments
 (0)