All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ian Kent <raven@themaw.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] freeing unlinked file indefinitely delayed
Date: Sun, 12 Jul 2015 16:17:29 +0100	[thread overview]
Message-ID: <20150712151729.GK17109@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1436441204.2709.10.camel@pluto.fritz.box>

On Thu, Jul 09, 2015 at 07:26:44PM +0800, Ian Kent wrote:
> > But the dentrys that will most likely face summary execution will be
> > hashed, such as was the case on that 2.6.32 kernel at dput().
> > 
> > Doesn't that mean that something dropped the dentry after the dput(),
> > that will now also free the dentry, that took the refcount to 0?
> 
> Oh wait, think I get it now ... perhaps it's prune_one_dentry() doing
> it ...

What, unhashing?  Yes, it does.

A bit of context - the breakage that had first pointed in direction of
this bug had been a deadlock with dcache shrinker run on frozen fs was
stumbling across a hashed dentry with zero refcount *and* zero link count
of its inode, triggering its eviction, final iput(), inode freeing and
deadlock on attempt to do sb_start_intwrite() there; figuring out how could
such a dentry appear in the first place had uncovered this fun.  Which
	a) is a bug in its own right and
	b) happens in mainline as well.

  reply	other threads:[~2015-07-12 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08  1:42 [RFC] freeing unliked file indefinitely delayed Al Viro
2015-07-08  2:39 ` J. Bruce Fields
2015-07-08 15:41 ` Ben Myers
2015-07-12 15:00   ` [RFC] freeing unlinked " Al Viro
2015-07-13 18:17     ` Ben Myers
2015-07-13 19:56       ` Al Viro
2015-07-14  0:54         ` Ben Myers
2015-07-09 11:17 ` [RFC] freeing unliked " Ian Kent
2015-07-09 11:26   ` Ian Kent
2015-07-12 15:17     ` Al Viro [this message]
2015-07-13  2:30       ` [RFC] freeing unlinked " Ian Kent

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=20150712151729.GK17109@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=torvalds@linux-foundation.org \
    /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.