All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Kirby <sim@hostway.ca>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Patrick McLean <patrick@cim.mcgill.ca>,
	Patrick McLean <patrickm@gaikai.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-nfs@vger.kernel.org
Subject: Re: Regression with initramfs and nfsroot (appears to be in the dcache)
Date: Fri, 30 Nov 2012 18:18:17 -0800	[thread overview]
Message-ID: <20121201021817.GA11921@hostway.ca> (raw)
In-Reply-To: <20121130020047.GA4939@ZenIV.linux.org.uk>

On Fri, Nov 30, 2012 at 02:00:48AM +0000, Al Viro wrote:

> OK, that settles it.  WARN_ON() and printks in the area can be dropped;
> the right fix is below.  However, there's a similar place in cifs that
> also needs to be dealt with and I really, really wonder why the hell do
> we do d_drop() in nfs_revalidate_lookup().  It's not relevant in this
> bug, but I would like to understand what's wrong with simply returning
> 0 from ->d_revalidate() and letting the caller (in fs/namei.c) take care
> of unhashing, etc. itself.  Would make have_submounts() in there pointless
> as well - we could just return 0 and let d_invalidate() take care of the
> checks...  Trond?
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -450,7 +450,8 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
>  			nfs_refresh_inode(dentry->d_inode, entry->fattr);
>  			goto out;
>  		} else {
> -			d_drop(dentry);
> +			if (d_invalidate(dentry) != 0)
> +				goto out;
>  			dput(dentry);
>  		}
>  	}

Hello,

With your previous patch (with the WARN_ON), I hit the WARN_ON() in the
test case described here: https://patchwork.kernel.org/patch/1446851/ .
The __d_move()ing mountpoint case no longer hits, and there is no longer
an EBUSY, so this seems to work for me (in 3.6, where it broke).

Simon-

      parent reply	other threads:[~2012-12-01  2:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 19:16 Regression with initramfs and nfsroot (appears to be in the dcache) Patrick McLean
2012-11-29 21:33 ` Al Viro
2012-11-29 22:06   ` Patrick McLean
2012-11-29 22:21     ` Al Viro
2012-11-29 22:53       ` Patrick McLean
2012-11-29 23:43         ` Al Viro
2012-11-30  0:19           ` Patrick McLean
2012-11-30  0:35             ` Al Viro
2012-11-30  0:57               ` Patrick McLean
2012-11-30  1:36                 ` Al Viro
2012-11-30  1:54                   ` Patrick McLean
2012-11-30  2:00                     ` Al Viro
2012-11-30  2:00                       ` Al Viro
2012-11-30  2:33                       ` Patrick McLean
2012-11-30  2:33                         ` Patrick McLean
2012-11-30  4:11                         ` Al Viro
2012-11-30  4:11                           ` Al Viro
2012-11-30 13:58                       ` Myklebust, Trond
2012-11-30 13:58                         ` Myklebust, Trond
2012-11-30 13:58                         ` Myklebust, Trond
2012-12-01 21:40                         ` Al Viro
2012-12-01  2:18                       ` Simon Kirby [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=20121201021817.GA11921@hostway.ca \
    --to=sim@hostway.ca \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=patrick@cim.mcgill.ca \
    --cc=patrickm@gaikai.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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.