diff options
| author | Christoph Hellwig <hch@infradead.org> | 2013-11-14 08:50:10 -0500 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2013-11-14 15:18:47 -0500 |
| commit | aea240f4162d50e0f2d8bd5ea3ba11b5f072add8 (patch) | |
| tree | 214ecab9cbcc13116fa1a5a05c45b604ce851cdf | |
| parent | 6ff40decff0ef35a5d755ec60182d7f803356dfb (diff) | |
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>
| -rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 9d76ee311ddc..088de1355e93 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
| @@ -2391,7 +2391,7 @@ out_acl: | |||
| 2391 | if (bmval0 & FATTR4_WORD0_MAXFILESIZE) { | 2391 | if (bmval0 & FATTR4_WORD0_MAXFILESIZE) { |
| 2392 | if ((buflen -= 8) < 0) | 2392 | if ((buflen -= 8) < 0) |
| 2393 | goto out_resource; | 2393 | goto out_resource; |
| 2394 | WRITE64(~(u64)0); | 2394 | WRITE64(exp->ex_path.mnt->mnt_sb->s_maxbytes); |
| 2395 | } | 2395 | } |
| 2396 | if (bmval0 & FATTR4_WORD0_MAXLINK) { | 2396 | if (bmval0 & FATTR4_WORD0_MAXLINK) { |
| 2397 | if ((buflen -= 4) < 0) | 2397 | if ((buflen -= 4) < 0) |
