From 664b0cf4bed3db05a3e1ed8f5e2ab757a60c5ba8 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 28 Sep 2007 16:45:51 -0400 Subject: [PATCH] --- yaml --- r: 68784 b: refs/heads/master c: a16e92edcd0a2846455a30823e1bac964e743baa h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4xdr.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 34b6b0c6101e..e7d6dbbad595 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cfdcad4da1903720b9b8c1f176e46a0ebf546be3 +refs/heads/master: a16e92edcd0a2846455a30823e1bac964e743baa diff --git a/trunk/fs/nfsd/nfs4xdr.c b/trunk/fs/nfsd/nfs4xdr.c index 9cf900740c76..e15f2cf8ac15 100644 --- a/trunk/fs/nfsd/nfs4xdr.c +++ b/trunk/fs/nfsd/nfs4xdr.c @@ -1475,7 +1475,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, err = vfs_getattr(exp->ex_mnt, dentry, &stat); if (err) goto out_nfserr; - if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL)) || + if ((bmval0 & (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(dentry, &statfs); @@ -1721,7 +1722,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, if (bmval0 & FATTR4_WORD0_MAXNAME) { if ((buflen -= 4) < 0) goto out_resource; - WRITE32(~(u32) 0); + WRITE32(statfs.f_namelen); } if (bmval0 & FATTR4_WORD0_MAXREAD) { if ((buflen -= 8) < 0)