Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: drop the nfsd4_fattr_args "size" field

We already have a slot for this in the kstat structure. Just overwrite
that instead of keeping a copy.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Jeff Layton and committed by
Chuck Lever
3a405432 c757ca1a

+2 -6
+2 -6
fs/nfsd/nfs4xdr.c
··· 2928 2928 struct kstat stat; 2929 2929 struct kstatfs statfs; 2930 2930 struct nfs4_acl *acl; 2931 - u64 size; 2932 2931 #ifdef CONFIG_NFSD_V4_SECURITY_LABEL 2933 2932 void *context; 2934 2933 int contextlen; ··· 3046 3047 static __be32 nfsd4_encode_fattr4_size(struct xdr_stream *xdr, 3047 3048 const struct nfsd4_fattr_args *args) 3048 3049 { 3049 - return nfsd4_encode_uint64_t(xdr, args->size); 3050 + return nfsd4_encode_uint64_t(xdr, args->stat.size); 3050 3051 } 3051 3052 3052 3053 static __be32 nfsd4_encode_fattr4_fsid(struct xdr_stream *xdr, ··· 3554 3555 if (status) 3555 3556 goto out; 3556 3557 } 3557 - args.size = 0; 3558 3558 if (attrmask[0] & (FATTR4_WORD0_CHANGE | FATTR4_WORD0_SIZE)) { 3559 3559 status = nfsd4_deleg_getattr_conflict(rqstp, dentry, 3560 3560 &file_modified, &size); ··· 3567 3569 if (err) 3568 3570 goto out_nfserr; 3569 3571 if (file_modified) 3570 - args.size = size; 3571 - else 3572 - args.size = args.stat.size; 3572 + args.stat.size = size; 3573 3573 3574 3574 if (!(args.stat.result_mask & STATX_BTIME)) 3575 3575 /* underlying FS does not offer btime so we can't share it */