linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Peng Tao <tao.peng@primarydata.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	kinglongmee@gmail.com
Subject: Re: [PATCH v2] NFS41: make close wait for layoutreturn
Date: Wed, 23 Sep 2015 20:45:41 +0800	[thread overview]
Message-ID: <56029EF5.1000507@gmail.com> (raw)
In-Reply-To: <CAHQdGtRHNs0MOP2mx6jiA5dFXfzM2UZHwuGkTyoNpit-vpGzsQ@mail.gmail.com>

On 9/23/2015 20:05, Trond Myklebust wrote:
> On Wed, Sep 23, 2015 at 4:27 AM, Kinglong Mee <kinglongmee@gmail.com> wrote:
>> I find the inode returned from nfs_igrab_and_active is NULL
>> in _nfs4_proc_delegreturn(),
>>
>>         data->inode = nfs_igrab_and_active(inode);
>>
>> So that, NFS_I(inode) causes the panic.
> 
> I've added a check for ino == NULL to nfs4_wait_on_layoutreturn()...

Yes, that's right.

But you add the checking at the wrong place in pnfs_wait_on_layoutreturn() at your tree.


+bool pnfs_wait_on_layoutreturn(struct inode *ino, struct rpc_task *task)
+{
+        struct pnfs_layout_hdr *lo;
+        bool sleep = false;
+
+	if (ino == NULL)
+		goto out;
+	/* we might not have grabbed lo reference. so need to check under

thanks, 
Kinglong Mee

  reply	other threads:[~2015-09-23 12:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22  3:35 [PATCH v2] NFS41: make close wait for layoutreturn Peng Tao
2015-09-23  7:53 ` Kinglong Mee
2015-09-23  7:55   ` Kinglong Mee
2015-09-23  8:27     ` Kinglong Mee
2015-09-23 12:05       ` Trond Myklebust
2015-09-23 12:45         ` Kinglong Mee [this message]
2015-09-23 12:52           ` Trond Myklebust
2015-09-23 12:59             ` Trond Myklebust

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=56029EF5.1000507@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tao.peng@primarydata.com \
    --cc=trond.myklebust@primarydata.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).