summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-05-28 10:46:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-06 18:57:27 -0700
commit4f662095c1b2d640a7a71ad9e32f230735b7f851 (patch)
tree08361c2052211167556cbf0de6a8522ad9d2907c
parentc77dea702ddf23f39b0afc2e738eb7716df71734 (diff)
downloadkernel-common-4f662095c1b2d640a7a71ad9e32f230735b7f851.tar.gz
kernel-common-4f662095c1b2d640a7a71ad9e32f230735b7f851.tar.bz2
kernel-common-4f662095c1b2d640a7a71ad9e32f230735b7f851.zip
nfsd: getattr for FATTR4_WORD0_FILES_AVAIL needs the statfs buffer
commit 12337901d654415d9f764b5f5ba50052e9700f37 upstream. Note nobody's ever noticed because the typical client probably never requests FILES_AVAIL without also requesting something else on the list. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/nfsd/nfs4xdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 16e8fa71eb84..bc11bf68ec7f 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2096,8 +2096,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
err = vfs_getattr(&path, &stat);
if (err)
goto out_nfserr;
- if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL |
- FATTR4_WORD0_MAXNAME)) ||
+ if ((bmval0 & (FATTR4_WORD0_FILES_AVAIL | FATTR4_WORD0_FILES_FREE |
+ FATTR4_WORD0_FILES_TOTAL | FATTR4_WORD0_MAXNAME)) ||
(bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE |
FATTR4_WORD1_SPACE_TOTAL))) {
err = vfs_statfs(&path, &statfs);