All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Cc: trondmy@hammerspace.com, bfields@fieldses.org,
	jlayton@redhat.com, dai.ngo@oracle.com
Subject: [PATCH RFC 2/2] NFSD: nfsd_file_put() can sleep
Date: Wed, 11 May 2022 17:52:58 -0400	[thread overview]
Message-ID: <165230597851.5906.18376771236120628748.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <165230584037.5906.5496655737644872339.stgit@klimt.1015granger.net>

Ensure the lockdep infrastructure can catch calls to nfsd_file_put()
when spinlocks are held.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/filecache.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 8f7ed5dbb003..60a5d82e59b3 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -301,6 +301,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-11 21:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 21:52 [PATCH RFC 0/2] Fix "sleep while locked" in RELEASE_LOCKOWNER Chuck Lever
2022-05-11 21:52 ` [PATCH RFC 1/2] NFSD: nfsd4_release_lockowner() should drop clp->cl_lock sooner Chuck Lever
2022-05-11 22:04   ` Trond Myklebust
2022-05-12 14:03     ` Chuck Lever III
2022-05-12 10:07   ` Jeff Layton
2022-05-12 14:10     ` Chuck Lever III
2022-05-11 21:52 ` Chuck Lever [this message]
2022-05-12 10:08   ` [PATCH RFC 2/2] NFSD: nfsd_file_put() can sleep Jeff Layton
     [not found] ` <PH0PR14MB549335582C7A4D4F4D2269B2AAD99@PH0PR14MB5493.namprd14.prod.outlook.com>
2022-05-26 23:39   ` [PATCH RFC 0/2] Fix "sleep while locked" in RELEASE_LOCKOWNER Chuck Lever III
2022-05-27  0:21     ` Charles Hedrick
2022-05-27 15:32       ` Chuck Lever III

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=165230597851.5906.18376771236120628748.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=dai.ngo@oracle.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@hammerspace.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.