]> www.infradead.org Git - users/dwmw2/linux.git/commit
nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open
authorJeff Layton <jlayton@kernel.org>
Fri, 3 Feb 2023 18:18:34 +0000 (13:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:26 +0000 (16:19 +0200)
commit94e412c945e64579798204aee7bc669d0acfaf79
treefc1bc088d3b66488bf63032bb3fd1f85ff0710b2
parenta0df1c3326e70b1320afceeb2f5e968910bdf336
nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open

[ Upstream commit dcd779dc46540e174a6ac8d52fbed23593407317 ]

The nested if statements here make no sense, as you can never reach
"else" branch in the nested statement. Fix the error handling for
when there is a courtesy client that holds a conflicting deny mode.

Fixes: 3d6942715180 ("NFSD: add support for share reservation conflict to courteous server")
Reported-by: 張智諺 <cc85nod@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c