mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
nfsd: delete unreachable confusing code in nfs4_open_delegation()
op_delegate_type is assigned OPEN_DELEGATE_NONE just before the if-block
where condition specifies it not be equal to OPEN_DELEGATE_NONE. Compiler
treats the block as unreachable and optimizes it out from the resulting
executable.
In that aspect commit d08d32e6e5 ("nfsd4: return delegation immediately
if lease fails") notably makes no difference.
Seems it's better to just drop this code instead of fiddling with memory
barriers or atomics.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
ccd608e29b
commit
bfce8e4273
|
|
@ -6362,11 +6362,6 @@ nfs4_open_delegation(struct svc_rqst *rqstp, struct nfsd4_open *open,
|
|||
return;
|
||||
out_no_deleg:
|
||||
open->op_delegate_type = OPEN_DELEGATE_NONE;
|
||||
if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS &&
|
||||
open->op_delegate_type != OPEN_DELEGATE_NONE) {
|
||||
dprintk("NFSD: WARNING: refusing delegation reclaim\n");
|
||||
open->op_recall = true;
|
||||
}
|
||||
|
||||
/* 4.1 client asking for a delegation? */
|
||||
if (open->op_deleg_want)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user