summaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-10-09 14:30:16 -0400
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 12:44:37 -0400
commit21d316a767ac2ebc9de281cd2ec5f3c22827dd8e (patch)
tree5e03bded3e0e64a4e430e3ae9815ba99ed5206e1 /fs/nfsd/xdr4.h
parent02e0297f160aa1ba9835fed3c97845c9450c2dc3 (diff)
NFSD: Clean up nfsd4_encode_copy_notify()
Replace open-coded encoding logic with the use of conventional XDR utility functions. Note that if we replace the cpn_sec and cpn_nsec fields with a single struct timespec64 field, the encoder can use nfsd4_encode_nfstime4(), as that is the data type specified by the XDR spec. NFS4ERR_INVAL seems inappropriate if the encoder doesn't support encoding the response. Instead use NFS4ERR_SERVERFAULT, since this condition is a software bug on the server. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index f97977bbd6fb..80e859dc84d8 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -745,8 +745,7 @@ struct nfsd4_copy_notify {
/* response */
stateid_t cpn_cnr_stateid;
- u64 cpn_sec;
- u32 cpn_nsec;
+ struct timespec64 cpn_lease_time;
struct nl4_server *cpn_src;
};