提交 66d46437 编写于 作者: J J. Bruce Fields 提交者: Zheng Zengkai

Revert "nfsd4: remove check_conflicting_opens warning"

stable inclusion
from stable-5.10.25
commit 894ecf0cb505561b9f37b302b7479eea939b0790
bugzilla: 51362

--------------------------------

commit 4aa5e002 upstream.

This reverts commit 50747dd5 "nfsd4: remove check_conflicting_opens
warning", as a prerequisite for reverting 94415b06, which has a
serious bug.

Cc: stable@vger.kernel.org
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5cd84439
......@@ -4957,6 +4957,7 @@ static int nfsd4_check_conflicting_opens(struct nfs4_client *clp,
writes--;
if (fp->fi_fds[O_RDWR])
writes--;
WARN_ON_ONCE(writes < 0);
if (writes > 0)
return -EAGAIN;
spin_lock(&fp->fi_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册