linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: Milosz Tanski <milosz@adfin.com>,
	Trond.Myklebust@netapp.com, jlayton@redhat.com,
	moseleymark@gmail.com, linux-cachefs@redhat.com,
	linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: evict_inode() vs iget5_locked() race [was Re: [Linux-cachefs] Blast from the past, CacheFiles: Error: Unexpected object collision]
Date: Thu, 19 Sep 2013 12:01:47 +0100	[thread overview]
Message-ID: <20130919110147.GQ13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <5769.1379579209@warthog.procyon.org.uk>

On Thu, Sep 19, 2013 at 09:26:49AM +0100, David Howells wrote:

> There's a potential race between evict_inode() and iget5_locked() in which the
> former can be tearing down an inode corresponding to a file whilst the latter
> is trying to set up a new inode corresponding to that same file - but it's
> possible that the cleanups for the former may adversely affect the setups for
> the latter.

evict() calls ->evict_inode() before removing it from hash.  It's called
only with I_FREEING already set.  If find_inode() runs across that
sucker, it will wait for evict() to do
	wake_up_bit(&inode->i_state, __I_NEW);
(after return from ->evict_inode() and after removal from hash chain)
and repeat the search.

Details, please...

      reply	other threads:[~2013-09-19 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANP1eJE=T4PPPBcvs4vj--zNMtkvRGqiAjR2ZfZuA0=DVGYA6A@mail.gmail.com>
2013-09-19  8:26 ` evict_inode() vs iget5_locked() race [was Re: [Linux-cachefs] Blast from the past, CacheFiles: Error: Unexpected object collision] David Howells
2013-09-19 11:01   ` Al Viro [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=20130919110147.GQ13318@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Trond.Myklebust@netapp.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=milosz@adfin.com \
    --cc=moseleymark@gmail.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).