summaryrefslogtreecommitdiff
path: root/tools/arch
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2023-10-26 17:50:18 +0300
committerChuck Lever <chuck.lever@oracle.com>2024-01-08 01:54:24 +0300
commitf3734cc4073f68ac3566293acc6d62971c47ad5a (patch)
tree8aaf609d1b7373badab1d8748297bda709cf18c2 /tools/arch
parent74fd48739d0488e39ae18b0168720f449a06690c (diff)
downloadlinux-f3734cc4073f68ac3566293acc6d62971c47ad5a.tar.xz
NFSD: use read_seqbegin() rather than read_seqbegin_or_lock()
The usage of read_seqbegin_or_lock() in nfsd_copy_write_verifier() is wrong. "seq" is always even and thus "or_lock" has no effect, this code can never take ->writeverf_lock for writing. I guess this is fine, nfsd_copy_write_verifier() just copies 8 bytes and nfsd_reset_write_verifier() is supposed to be very rare operation so we do not need the adaptive locking in this case. Yet the code looks wrong and sub-optimal, it can use read_seqbegin() without changing the behaviour. [ cel: Note also that it eliminates this Sparse warning: fs/nfsd/nfssvc.c:360:6: warning: context imbalance in 'nfsd_copy_write_verifier' - different lock contexts for basic block ] Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/arch')
0 files changed, 0 insertions, 0 deletions