mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@osdl.org, dhowells@redhat.com, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] namespace.c: cleanup in mark_mounts_for_expiry()
Date: Fri, 20 May 2005 15:47:37 +0100	[thread overview]
Message-ID: <20050520144737.GR29811@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <E1DZ7xj-0003ol-00@dorka.pomaz.szeredi.hu>

On Fri, May 20, 2005 at 03:54:51PM +0200, Miklos Szeredi wrote:
> [ fell in love with that function, now can't let go... ]
> 
> This patch simplifies mark_mounts_for_expiry() by using detach_mnt()
> instead of duplicating everything it does.
> 
> It should be an equivalent transformation except for righting the
> dput/mntput order.

Looks sane.  However, we still have a problem here - just what would
happen if vfsmount is detached while we were grabbing namespace
semaphore?  Refcount alone is not useful here - we might be held by
whoever had detached the vfsmount.  IOW, we should check that it's
still attached (i.e. that mnt->mnt_parent != mnt).  If it's not -
just leave it alone, do mntput() and let whoever holds it deal with
the sucker.  No need to put it back on lists.

  reply	other threads:[~2005-05-20 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 13:54 Miklos Szeredi
2005-05-20 14:47 ` Al Viro [this message]
2005-05-20 16:16   ` Miklos Szeredi
2005-05-24  8:20     ` Jan Kara

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=20050520144737.GR29811@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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

all inboxes | Powered by JetHome®