diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-09-29 09:59:05 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-10-16 12:44:31 -0400 |
commit | e4ad7ce775eee3b1271b9ef0dc1dbdc47cf6a00c (patch) | |
tree | aa6478fdf95263e659b4711dccf2795372a745f3 /fs/nfsd/nfs4state.c | |
parent | c564178290ee068efb87d81654fc03aa01464a0c (diff) | |
download | linux-e4ad7ce775eee3b1271b9ef0dc1dbdc47cf6a00c.tar.gz linux-e4ad7ce775eee3b1271b9ef0dc1dbdc47cf6a00c.tar.bz2 linux-e4ad7ce775eee3b1271b9ef0dc1dbdc47cf6a00c.zip |
NFSD: Add nfsd4_encode_open_read_delegation4()
Refactor nfsd4_encode_open() so the open_read_delegation4 type is
encoded in a separate function. This makes it more straightforward
to later add support for returning an nfsace4 in OPEN responses that
offer a delegation.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 305c353a416c..40018cc914a4 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5688,11 +5688,11 @@ nfs4_open_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp, struct path path; cb_up = nfsd4_cb_channel_good(oo->oo_owner.so_client); - open->op_recall = 0; + open->op_recall = false; switch (open->op_claim_type) { case NFS4_OPEN_CLAIM_PREVIOUS: if (!cb_up) - open->op_recall = 1; + open->op_recall = true; break; case NFS4_OPEN_CLAIM_NULL: parent = currentfh; @@ -5746,7 +5746,7 @@ out_no_deleg: if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS && open->op_delegate_type != NFS4_OPEN_DELEGATE_NONE) { dprintk("NFSD: WARNING: refusing delegation reclaim\n"); - open->op_recall = 1; + open->op_recall = true; } /* 4.1 client asking for a delegation? */ |