Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 17:28 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > > > Ian Kent writes: > > > > > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > > > FWIW, I've

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 17:28 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > > > Ian Kent writes: > > > > > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > > > FWIW, I've folded that pile into

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Eric W. Biederman
Ian Kent writes: > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: >> Ian Kent writes: >> >> > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: >> > > FWIW, I've folded that pile into vfs.git#work.autofs. >> > > >> > > Problems: >> > >> >

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Eric W. Biederman
Ian Kent writes: > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: >> Ian Kent writes: >> >> > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: >> > > FWIW, I've folded that pile into vfs.git#work.autofs. >> > > >> > > Problems: >> > >> > snip ... >> > >> > > * the last one

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > FWIW, I've folded that pile into vfs.git#work.autofs. > > > > > > Problems: > > > > snip ... > > > > > * the last one

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > FWIW, I've folded that pile into vfs.git#work.autofs. > > > > > > Problems: > > > > snip ... > > > > > * the last one (propagation-related) is too

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Eric W. Biederman
Ian Kent writes: > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: >> FWIW, I've folded that pile into vfs.git#work.autofs. >> >> Problems: > > snip ... > >> * the last one (propagation-related) is too ugly to live - at the >> very least, its pieces should live in

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Eric W. Biederman
Ian Kent writes: > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: >> FWIW, I've folded that pile into vfs.git#work.autofs. >> >> Problems: > > snip ... > >> * the last one (propagation-related) is too ugly to live - at the >> very least, its pieces should live in fs/pnode.c;

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-06 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > FWIW, I've folded that pile into vfs.git#work.autofs. > > Problems: snip ... > * the last one (propagation-related) is too ugly to live - at the > very least, its pieces should live in fs/pnode.c; exposing propagate_next() > is

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-06 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > FWIW, I've folded that pile into vfs.git#work.autofs. > > Problems: snip ... > * the last one (propagation-related) is too ugly to live - at the > very least, its pieces should live in fs/pnode.c; exposing propagate_next() > is

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-04 Thread Ian Kent
On Sun, 2016-12-04 at 10:18 +0800, Ian Kent wrote: > On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > > > > On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > > > > > > > > > * path_has_submounts() is broken.  At the very least, it's > > > AB-BA between mount_lock and rename_lock.  

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-04 Thread Ian Kent
On Sun, 2016-12-04 at 10:18 +0800, Ian Kent wrote: > On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > > > > On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > > > > > > > > > * path_has_submounts() is broken.  At the very least, it's > > > AB-BA between mount_lock and rename_lock.  

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > > > > * path_has_submounts() is broken.  At the very least, it's > > AB-BA between mount_lock and rename_lock.  I would suggest trying to > > put read_seqlock_excl(_lock) around the

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > > > > * path_has_submounts() is broken.  At the very least, it's > > AB-BA between mount_lock and rename_lock.  I would suggest trying to > > put read_seqlock_excl(_lock) around the

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > FWIW, I've folded that pile into vfs.git#work.autofs. > > Problems: > * (fixed) __path_is_mountpoint() should _not_ treat NULL from > __lookup_mnt() as "nothing's mounted there" until it has checked > that mount_lock hadn't been

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > FWIW, I've folded that pile into vfs.git#work.autofs. > > Problems: > * (fixed) __path_is_mountpoint() should _not_ treat NULL from > __lookup_mnt() as "nothing's mounted there" until it has checked > that mount_lock hadn't been

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Al Viro
On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > * path_has_submounts() is broken. At the very least, it's > AB-BA between mount_lock and rename_lock. I would suggest trying to > put read_seqlock_excl(_lock) around the call of d_walk() in there, > and using __lookup_mnt() in the

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Al Viro
On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > * path_has_submounts() is broken. At the very least, it's > AB-BA between mount_lock and rename_lock. I would suggest trying to > put read_seqlock_excl(_lock) around the call of d_walk() in there, > and using __lookup_mnt() in the

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-02 Thread Al Viro
FWIW, I've folded that pile into vfs.git#work.autofs. Problems: * (fixed) __path_is_mountpoint() should _not_ treat NULL from __lookup_mnt() as "nothing's mounted there" until it has checked that mount_lock hadn't been touched - mount --move on something unrelated can race with

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-02 Thread Al Viro
FWIW, I've folded that pile into vfs.git#work.autofs. Problems: * (fixed) __path_is_mountpoint() should _not_ treat NULL from __lookup_mnt() as "nothing's mounted there" until it has checked that mount_lock hadn't been touched - mount --move on something unrelated can race with

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-30 Thread Ian Kent
On Wed, 2016-11-30 at 14:22 -0800, Andrew Morton wrote: > So a far as I can tell, this patch series is intended to > address Al's review comments against the > http://lkml.kernel.org/r/20161011053352.27645.83962.st...@pluto.themaw.net > series? That's right and also to fix an additional problem I

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-30 Thread Ian Kent
On Wed, 2016-11-30 at 14:22 -0800, Andrew Morton wrote: > So a far as I can tell, this patch series is intended to > address Al's review comments against the > http://lkml.kernel.org/r/20161011053352.27645.83962.st...@pluto.themaw.net > series? That's right and also to fix an additional problem I

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-30 Thread Andrew Morton
So a far as I can tell, this patch series is intended to address Al's review comments against the http://lkml.kernel.org/r/20161011053352.27645.83962.st...@pluto.themaw.net series?

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-30 Thread Andrew Morton
So a far as I can tell, this patch series is intended to address Al's review comments against the http://lkml.kernel.org/r/20161011053352.27645.83962.st...@pluto.themaw.net series?

[PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-27 Thread Ian Kent
From: Ian Kent Forgetting that the rcu lock allows nesting I added a superfluous rcu version of path_is_mountpoint(). Merge it and the rcu version, make the common case (d_mountpoint() returning true) inline and change the path parameter to a const. Also move the function

[PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-27 Thread Ian Kent
From: Ian Kent Forgetting that the rcu lock allows nesting I added a superfluous rcu version of path_is_mountpoint(). Merge it and the rcu version, make the common case (d_mountpoint() returning true) inline and change the path parameter to a const. Also move the function definition to