Revert "nfsd4: remove check_conflicting_opens warning"

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

Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
J. Bruce Fields 2021-03-08 10:51:51 -05:00 committed by Chuck Lever
parent 0ddc942394
commit 4aa5e00203

View File

@ -4952,6 +4952,7 @@ static int nfsd4_check_conflicting_opens(struct nfs4_client *clp,
writes--; writes--;
if (fp->fi_fds[O_RDWR]) if (fp->fi_fds[O_RDWR])
writes--; writes--;
WARN_ON_ONCE(writes < 0);
if (writes > 0) if (writes > 0)
return -EAGAIN; return -EAGAIN;
spin_lock(&fp->fi_lock); spin_lock(&fp->fi_lock);