Message ID | 20210308155151.GC7284@fieldses.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] Revert "nfsd4: remove check_conflicting_opens warning" | expand |
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);