diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-11-09 13:13:21 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-03-22 10:18:55 -0400 |
commit | a1409e2de4f11034c8eb30775cc3e37039a4ef13 (patch) | |
tree | 1a057c5cc0ac182396212f5343b94b2d5aa3bf84 /fs/nfsd/nfs3xdr.c | |
parent | a161e6c76aeba835e475a2f27dbbe5c37e565e94 (diff) | |
download | linux-rpi-a1409e2de4f11034c8eb30775cc3e37039a4ef13.tar.gz linux-rpi-a1409e2de4f11034c8eb30775cc3e37039a4ef13.tar.bz2 linux-rpi-a1409e2de4f11034c8eb30775cc3e37039a4ef13.zip |
NFSD: Count bytes instead of pages in the NFSv3 READDIR encoder
Clean up: Counting the bytes used by each returned directory entry
seems less brittle to me than trying to measure consumed pages after
the fact.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs3xdr.c')
-rw-r--r-- | fs/nfsd/nfs3xdr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index e334a1454edb..523b2dca0494 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c @@ -1364,6 +1364,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, int namlen, return -EINVAL; } + cd->count += num_entry_words; cd->buflen -= num_entry_words; cd->buffer = p; cd->common.err = nfs_ok; |