All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Revert "nfsd4: remove check_conflicting_opens warning"
@ 2021-03-08 15:51 J. Bruce Fields
  2021-03-08 15:52 ` [PATCH 2/2] Revert "nfsd4: a client's own opens needn't prevent delegations" J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2021-03-08 15:51 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

From: "J. Bruce Fields" <bfields@redhat.com>

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

Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 fs/nfsd/nfs4state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4f6d7658da8a..408e2c4db926 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4952,6 +4952,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);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-08 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08 15:51 [PATCH 1/2] Revert "nfsd4: remove check_conflicting_opens warning" J. Bruce Fields
2021-03-08 15:52 ` [PATCH 2/2] Revert "nfsd4: a client's own opens needn't prevent delegations" J. Bruce Fields
2021-03-08 15:54   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.