summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsproc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-13 22:53:17 +0100
committerChuck Lever <chuck.lever@oracle.com>2021-03-22 15:18:58 +0100
commitd52532002ffa217ad3fa4c3ba86c95203d21dd21 (patch)
treeb7aedf13cdecd9d738890181ca38fb968439c8d9 /fs/nfsd/nfsproc.c
parentNFSD: Update the NFSv2 STATFS result encoder to use struct xdr_stream (diff)
downloadlinux-d52532002ffa217ad3fa4c3ba86c95203d21dd21.tar.xz
linux-d52532002ffa217ad3fa4c3ba86c95203d21dd21.zip
NFSD: Add a helper that encodes NFSv3 directory offset cookies
Refactor: Add helper function similar to nfs3svc_encode_cookie3(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r--fs/nfsd/nfsproc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 2088bb0887ba..5a0dd6e23c85 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -595,8 +595,7 @@ nfsd_proc_readdir(struct svc_rqst *rqstp)
&resp->common, nfssvc_encode_entry);
resp->count = resp->buffer - buffer;
- if (resp->offset)
- *resp->offset = htonl(offset);
+ nfssvc_encode_nfscookie(resp, offset);
fh_put(&argp->fh);
return rpc_success;