linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: NeilBrown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/8] NFS: prepare for RCU-walk support but pushing tests later in code.
Date: Wed, 5 Mar 2014 06:49:46 +0000	[thread overview]
Message-ID: <20140305064946.GY18016@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20140305165933.09ca9d84@notabene.brown>

On Wed, Mar 05, 2014 at 04:59:33PM +1100, NeilBrown wrote:
> > 	b) having already become negative.
> 
> I didn't think dentries ever became negative.  When a file is deleted the old
> positive dentry is unlinked and a new negative dentry is created in it's
> place.
> Or has that changed since last I looked?

It has never been true.  See what d_delete() is doing.  If there was only
one reference to dentry, it *does* become negative.

> If they can become negative, then I could
>    dir = ACCESS_ONCE(parent->d_inode);
>    if (!dir)
>         return -ECHILD;
> 
> Do you think that would be safe?

Depends on what you do with it afterwards...

  reply	other threads:[~2014-03-05  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  3:00 [PATCH/RFC 0/8] Extend RCU-walk support to NFS NeilBrown
2014-03-05  3:00 ` [PATCH 6/8] NFS: teach nfs_neg_need_reval to understand LOOKUP_RCU NeilBrown
2014-03-05  3:00 ` [PATCH 2/8] NFS: prepare for RCU-walk support but pushing tests later in code NeilBrown
2014-03-05  5:34   ` Al Viro
2014-03-05  5:59     ` NeilBrown
2014-03-05  6:49       ` Al Viro [this message]
2014-03-06  5:47         ` NeilBrown
2014-03-05  3:00 ` [PATCH 8/8] NFS: allow lockless access to access_cache NeilBrown
2014-03-05 15:11   ` Trond Myklebust
2014-03-06  6:03     ` NeilBrown
2014-03-05  3:00 ` [PATCH 5/8] NFS: teach nfs_do_access to understand MAY_NOT_BLOCK NeilBrown
2014-03-05  3:00 ` [PATCH 7/8] NFS: teach nfs_lookup_verify_inode to handle LOOKUP_RCU NeilBrown
2014-03-05  3:00 ` [PATCH 3/8] sunrpc/auth: allow lockless (rcu) lookup of credential cache NeilBrown
2014-03-05  3:00 ` [PATCH 1/8] NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used NeilBrown
2014-03-05  3:00 ` [PATCH 4/8] sunrpc/auth: add 'rcu_walk' arg to rpc_lookup_cred NeilBrown
2014-03-05 14:43   ` Trond Myklebust
2014-03-06  5:50     ` NeilBrown

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=20140305064946.GY18016@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --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).