linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Cc: trondmy@hammerspace.com, bfields@fieldses.org, dai.ngo@oracle.com
Subject: Re: [PATCH RFC 2/2] NFSD: nfsd_file_put() can sleep
Date: Thu, 12 May 2022 06:08:01 -0400	[thread overview]
Message-ID: <ddd64fbc1bfc6dc5ad7d0656dd38e686f556eae2.camel@kernel.org> (raw)
In-Reply-To: <165230597851.5906.18376771236120628748.stgit@klimt.1015granger.net>

On Wed, 2022-05-11 at 17:52 -0400, Chuck Lever wrote:
> 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);
> 
> 

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2022-05-12 10:08 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 ` [PATCH RFC 2/2] NFSD: nfsd_file_put() can sleep Chuck Lever
2022-05-12 10:08   ` Jeff Layton [this message]
     [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=ddd64fbc1bfc6dc5ad7d0656dd38e686f556eae2.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).