]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nfsd: getattr for FATTR4_WORD0_FILES_AVAIL needs the statfs buffer
authorChristoph Hellwig <hch@lst.de>
Wed, 28 May 2014 08:46:13 +0000 (10:46 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 30 May 2014 21:32:26 +0000 (17:32 -0400)
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>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c

index 70d147244891bf023b7b10a4e5e66aad2b306248..3976dc699731adbae002594f2b067882719aa113 100644 (file)
@@ -2049,8 +2049,8 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
        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);