]> git.baikalelectronics.ru Git - kernel.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>
Fri, 10 Mar 2023 08:33:24 +0000 (09:33 +0100)
commit54ded522b8287d0766ea3bf543e00d47978ea4bf
tree8053bcaf03463b0285c8c442141b8657891f10e7
parentaafd28749f0b01c7d307b5ef30e10a8236140ef5
nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open

[ Upstream commit 7c6cfe4cc5c81c7e5834bd8924345e2a974219aa ]

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: a0aaaa2f05a1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c