Skip to content

Commit aea240f

Browse files
Christoph HellwigJ. Bruce Fields
authored andcommitted
nfsd: export proper maximum file size to the client
I noticed that we export a way to high value for the maxfilesize attribute when debugging a client issue. The issue didn't turn out to be related to it, but I think we should export it, so that clients can limit what write sizes they accept before hitting the server. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 6ff40de commit aea240f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/nfsd/nfs4xdr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
23912391
if (bmval0 & FATTR4_WORD0_MAXFILESIZE) {
23922392
if ((buflen -= 8) < 0)
23932393
goto out_resource;
2394-
WRITE64(~(u64)0);
2394+
WRITE64(exp->ex_path.mnt->mnt_sb->s_maxbytes);
23952395
}
23962396
if (bmval0 & FATTR4_WORD0_MAXLINK) {
23972397
if ((buflen -= 4) < 0)

0 commit comments

Comments
 (0)