diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-11-05 01:03:26 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-11-05 21:54:38 +0300 |
commit | d4a95a7e5a4d3b68b26f70668cf77324a11b5718 (patch) | |
tree | 12090884de9446c035b4b6aa7c05e8bc23c7f07c /fs/nfs/inode.c | |
parent | aa97a3ef15c303697ca58340938a5c385be00cf7 (diff) | |
download | linux-d4a95a7e5a4d3b68b26f70668cf77324a11b5718.tar.xz |
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 <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index b4cb75c45f90..0b5b1e44b2c4 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1598,8 +1598,10 @@ struct nfs_fattr *nfs_alloc_fattr(void) struct nfs_fattr *fattr; fattr = kmalloc(sizeof(*fattr), GFP_NOFS); - if (fattr != NULL) + if (fattr != NULL) { nfs_fattr_init(fattr); + fattr->label = NULL; + } return fattr; } EXPORT_SYMBOL_GPL(nfs_alloc_fattr); |