[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150317005944.GI29656@ZenIV.linux.org.uk>
Date: Tue, 17 Mar 2015 00:59:44 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/13] VFS/namei: new flag to support RCU symlinks:
LOOKUP_LINK_RCU.
On Mon, Mar 16, 2015 at 10:33:45PM +0000, Al Viro wrote:
> On Mon, Mar 16, 2015 at 03:43:20PM +1100, NeilBrown wrote:
> > When we support ->follow_link in RCU-walk we will not want to
> > take a reference to the 'struct path *link' passed to follow_link,
> > and correspondingly will not want to drop that reference.
> >
> > As link_path_walk will complete_walk() in the case of an error,
> > and as complete_walk() will clear LOOKUP_RCU, we cannot test
> > LOOKUP_RCU to determine if the path should be 'put'.
> >
> > So introduce a new flag: LOOKUP_LINK_RCU. This is set on
> > entry to follow_link() if appropriate and put_link() will
> > only call path_put() if it is clear.
>
> Umm... How is it different from nd->depth > 0 && nd->flags & LOOKUP_RCU?
> IOW, could we bump nd->depth before that (conditional) mntget()?
OK, I see... So you are holding that flag for as long as we are traversing
any part of a symlink body, including that of a trailing symlink...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists