All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH v2 6/6] NFSD: nfsd_file_put() can sleep
Date: Tue, 24 May 2022 14:57:29 -0400	[thread overview]
Message-ID: <165341864964.3187.10891043744511023924.stgit@bazille.1015granger.net> (raw)
In-Reply-To: <165341832236.3187.8388683641228729897.stgit@bazille.1015granger.net>

Now that there are no more callers of nfsd_file_put() that might
hold a spin lock, ensure the lockdep infrastructure can catch
newly introduced calls to nfsd_file_put() made while a spinlock
is held.

Link: https://lore.kernel.org/linux-nfs/ece7fd1d-5fb3-5155-54ba-347cfc19bd9a@oracle.com/T/#mf1855552570cf9a9c80d1e49d91438cd9085aada
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/filecache.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index a7e3a443a2cb..d32fcd8ad457 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -302,6 +302,8 @@ nfsd_file_put_noref(struct nfsd_file *nf)
 void
 nfsd_file_put(struct nfsd_file *nf)
 {
+	might_sleep();
+
 	set_bit(NFSD_FILE_REFERENCED, &nf->nf_flags);
 	if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags) == 0) {
 		nfsd_file_flush(nf);



      parent reply	other threads:[~2022-05-24 18:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 18:56 [PATCH v2 0/6] RELEASE_LOCKOWNER discussion, cont Chuck Lever
2022-05-24 18:56 ` [PATCH v2 1/6] fs/locks.c: Count held file locks Chuck Lever
2022-05-24 18:57 ` [PATCH v2 2/6] NFSD: Fix possible sleep during nfsd4_release_lockowner() Chuck Lever
2022-05-24 18:57 ` [PATCH v2 3/6] blargh Chuck Lever
2022-05-24 18:57 ` [PATCH v2 4/6] NFSD: Modernize nfsd4_release_lockowner() Chuck Lever
2022-05-24 18:57 ` [PATCH v2 5/6] NFSD: Add documenting comment for nfsd4_release_lockowner() Chuck Lever
2022-05-24 18:57 ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165341864964.3187.10891043744511023924.stgit@bazille.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --subject='Re: [PATCH v2 6/6] NFSD: nfsd_file_put() can sleep' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.