[PATCH 1/3] autofs - make disc device user accessible

2017-05-09 Thread Ian Kent
-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy Cc: sta...@vger.kernel.org --- fs/autofs4/dev-ioctl.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 734cbf8..9b58d6e 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so _that_ part is perhaps a bit >

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so _that_ part is perhaps a bit >

Re: [PATCH 4/5] fs/autofs4: Fix a dead URL to ftp.kernel.org

2017-03-27 Thread Ian Kent
On Mon, 2017-03-27 at 14:47 +0900, SeongJae Park wrote: > As ftp.kernel.org is closed [0], this commit fixes a dead URL to > ftp.kernel.org in fs/autofs4/ to use www.kernel.org instead. > > [0] https://www.kernel.org/shutting-down-ftp-services.html > > Signed-off-by: SeongJae Park

Re: [PATCH 4/5] fs/autofs4: Fix a dead URL to ftp.kernel.org

2017-03-27 Thread Ian Kent
On Mon, 2017-03-27 at 14:47 +0900, SeongJae Park wrote: > As ftp.kernel.org is closed [0], this commit fixes a dead URL to > ftp.kernel.org in fs/autofs4/ to use www.kernel.org instead. > > [0] https://www.kernel.org/shutting-down-ftp-services.html > > Signed-off-by: SeongJae Park ACK, and

[PATCH 4/7] autofs: update ioctl documentation regarding struct autofs_dev_ioctl

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi <tkus...@tuxera.com> This is the same as bf72eda5 except that it's a different file. Sync documentation with changes made by 730c9eec in 2009. Signed-off-by: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Ian Kent <ra...@themaw.net> --- .../filesys

[PATCH 4/7] autofs: update ioctl documentation regarding struct autofs_dev_ioctl

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This is the same as bf72eda5 except that it's a different file. Sync documentation with changes made by 730c9eec in 2009. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- .../filesystems/autofs4-mount-control.txt |1 + Documentation/filesystems

[PATCH 5/7] autofs: add command enum/macros for root-dir ioctls

2017-01-30 Thread Ian Kent
; Signed-off-by: Ian Kent <ra...@themaw.net> --- include/uapi/linux/auto_dev-ioctl.h |2 -- include/uapi/linux/auto_fs.h| 25 ++--- include/uapi/linux/auto_fs4.h | 16 +++- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/

[PATCH 5/7] autofs: add command enum/macros for root-dir ioctls

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi Sync root-dir ioctl with misc-char-dev ioctl's enum/macro format since these two types of ioctls aren't completely independent of each other in terms of command nr. No functional changes. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- include/uapi/linux

[PATCH 1/7] autofs: remove wrong comment

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi <tkus...@tuxera.com> This format seems to have been taken from device mapper header, but autofs has no such file:function in both kernel and userspace. Signed-off-by: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Ian Kent <ra...@themaw.net> ---

[PATCH 1/7] autofs: remove wrong comment

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This format seems to have been taken from device mapper header, but autofs has no such file:function in both kernel and userspace. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- include/uapi/linux/auto_dev-ioctl.h |4 1 file changed, 4 deletions

[PATCH 2/7] autofs: fix typo in Documentation

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Ian Kent <ra...@themaw.net> --- Documentation/filesystems/autofs4.txt |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/files

[PATCH 3/7] autofs: fix wrong ioctl documentation regarding devid

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi <tkus...@tuxera.com> This is the same as d8732841 except that it's a different file. A caller has no devid input, and devid is obtained via superblock. Signed-off-by: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Ian Kent <ra...@themaw.net>

[PATCH 2/7] autofs: fix typo in Documentation

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- Documentation/filesystems/autofs4.txt |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/filesystems/autofs4.txt b/Documentation/filesystems/autofs4.txt index 8fac3fe

[PATCH 3/7] autofs: fix wrong ioctl documentation regarding devid

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This is the same as d8732841 except that it's a different file. A caller has no devid input, and devid is obtained via superblock. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- Documentation/filesystems/autofs4.txt |5 ++--- 1 file changed, 2 insertions

[PATCH 7/7] autofs - take more care to not update last_used on path walk

2017-01-30 Thread Ian Kent
accesses. Signed-off-by: Ian Kent <ra...@themaw.net> --- fs/autofs4/root.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a11f731..6ddd4fa 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -281,8

[PATCH 7/7] autofs - take more care to not update last_used on path walk

2017-01-30 Thread Ian Kent
accesses. Signed-off-by: Ian Kent --- fs/autofs4/root.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a11f731..6ddd4fa 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -281,8 +281,8 @@ static int

[PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi <tkus...@tuxera.com> This macro is already defined in uapi header. Also use this macro where possible. Signed-off-by: Tomohiro Kusumi <tkus...@tuxera.com> Signed-off-by: Ian Kent <ra...@themaw.net> --- fs/autofs4/dev-ioctl.c |2 --

[PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This macro is already defined in uapi header. Also use this macro where possible. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c |2 -- include/uapi/linux/auto_dev-ioctl.h |4 ++-- 2 files changed, 2 insertions

Re: linux-next: manual merge of the akpm tree with the vfs tree

2016-12-12 Thread Ian Kent
On Mon, 2016-12-12 at 16:52 +1100, Stephen Rothwell wrote: > Hi all, > > Al let me know that he had put a newer version of the autofs patches > into his vfs tree, so I have dropped the following patches from the akpm > tree today: > >   vfs: change d_manage() to take a struct path >   vfs: add

Re: linux-next: manual merge of the akpm tree with the vfs tree

2016-12-12 Thread Ian Kent
On Mon, 2016-12-12 at 16:52 +1100, Stephen Rothwell wrote: > Hi all, > > Al let me know that he had put a newer version of the autofs patches > into his vfs tree, so I have dropped the following patches from the akpm > tree today: > >   vfs: change d_manage() to take a struct path >   vfs: add

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 <ra...@themaw.net> writes: > > > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > > > Ian Kent <ra...@themaw.net> writes: > > > > > > > On Sat, 2016-12-03 at

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: > > >

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 <ra...@themaw.net> writes: > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > FWIW, I've folded that pile into vfs.git#work.autofs. > > > > > > Problems: > > &g

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 ... >

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 >

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 >

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-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

[PATCH 4/7] vfs - change struct path to const in d_manage()

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> The ->d_manage() function is meant to be used to check if an automount is in progress and to block if needed before the mount is followed. It shouldn't need to modify the passed struct path. Make that usage explicit by changing ->d_manage() pa

[PATCH 4/7] vfs - change struct path to const in d_manage()

2016-11-27 Thread Ian Kent
From: Ian Kent The ->d_manage() function is meant to be used to check if an automount is in progress and to block if needed before the mount is followed. It shouldn't need to modify the passed struct path. Make that usage explicit by changing ->d_manage() path parameter to a const. Sign

[PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait()

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> The functions autofs4_expire_wait() and autofs4_wait() don't modify the passed struct path so change it to a const. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Eric W. Biederman <ebied...@xmission.c

[PATCH 6/7] autofs - dont hold spin lock over direct mount expire

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> Commit 7cbdb4a286 altered the autofs indirect mount expire to not hold a spin lock during the expire check. The direct mount expire needs the same treatment because to make autofs expires namespace aware may_umount_tree() needs to to use a similar

[PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait()

2016-11-27 Thread Ian Kent
From: Ian Kent The functions autofs4_expire_wait() and autofs4_wait() don't modify the passed struct path so change it to a const. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/autofs4/autofs_i.h |5 +++-- fs/autofs4/expire.c |4 ++-- fs

[PATCH 6/7] autofs - dont hold spin lock over direct mount expire

2016-11-27 Thread Ian Kent
From: Ian Kent Commit 7cbdb4a286 altered the autofs indirect mount expire to not hold a spin lock during the expire check. The direct mount expire needs the same treatment because to make autofs expires namespace aware may_umount_tree() needs to to use a similar method to may_umount() when

[PATCH 2/7] autofs - make struct path const in autofs4_dir_open()

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> There's no reason to copy the file->f_path in autofs4_dir_open() and f_path is not modified so change it to a "const struct path *". Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Eric W. Biede

[PATCH 7/7] vfs - make may_umount_tree() mount propogation aware

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> Now that autofs has namespace aware mounted checks the expire needs changes to make it aware of mount propagation. When checking for expiration may_umount_tree() checks only if the given mount is in use. This leads to a callback to the automount daemon to

[PATCH 5/7] vfs - constify path parameter of path_has_submounts()

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> path_has_submounts() doesn't modify the passed in path parameter, and shouldn't need to, make that usage explicit. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Eric W. Biederman <ebied...@xmission.c

[PATCH 5/7] vfs - constify path parameter of path_has_submounts()

2016-11-27 Thread Ian Kent
From: Ian Kent path_has_submounts() doesn't modify the passed in path parameter, and shouldn't need to, make that usage explicit. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c|2 +- include/linux/dcache.h |2 +- 2 files

[PATCH 2/7] autofs - make struct path const in autofs4_dir_open()

2016-11-27 Thread Ian Kent
From: Ian Kent There's no reason to copy the file->f_path in autofs4_dir_open() and f_path is not modified so change it to a "const struct path *". Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/autofs4/root.c |6 +++--- 1 file changed,

[PATCH 7/7] vfs - make may_umount_tree() mount propogation aware

2016-11-27 Thread Ian Kent
From: Ian Kent Now that autofs has namespace aware mounted checks the expire needs changes to make it aware of mount propagation. When checking for expiration may_umount_tree() checks only if the given mount is in use. This leads to a callback to the automount daemon to umount the mount which

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

2016-11-27 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> 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 fu

[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 include

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-31 Thread Ian Kent
On Thu, 2016-10-27 at 14:50 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > > > > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > > > > > >   > > > > > > How much testing did it get?  I've several test setup

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-31 Thread Ian Kent
On Thu, 2016-10-27 at 14:50 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > > > > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > > > > > >   > > > > > > How much testing did it get?  I've several test setup

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-27 Thread Ian Kent
On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > >  > > > > How much testing did it get?  I've several test setups involving > > autofs, but they are nowhere near exhaustive and I don't have good > > en

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-27 Thread Ian Kent
On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > >  > > > > How much testing did it get?  I've several test setups involving > > autofs, but they are nowhere near exhaustive and I don't have good > > en

Re: [PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:17 +0100, Al Viro wrote: > On Tue, Oct 11, 2016 at 01:34:18PM +0800, Ian Kent wrote: > > > > + path = file->f_path; > > + > >   /* > >    * An empty directory in an autofs file system is always a > >    * mount p

Re: [PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:17 +0100, Al Viro wrote: > On Tue, Oct 11, 2016 at 01:34:18PM +0800, Ian Kent wrote: > > > > + path = file->f_path; > > + > >   /* > >    * An empty directory in an autofs file system is always a > >    * mount p

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > On Fri, Oct 21, 2016 at 07:39:36AM +0800, Ian Kent wrote: > > > > > Maybe Al has been too busy to comment, he has been on the Cc from the start. > That's... a very mild version of what's been going on.  Let's just say that

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > On Fri, Oct 21, 2016 at 07:39:36AM +0800, Ian Kent wrote: > > > > > Maybe Al has been too busy to comment, he has been on the Cc from the start. > That's... a very mild version of what's been going on.  Let's just say that

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-20 Thread Ian Kent
On Wed, 2016-10-19 at 12:40 -0700, Andrew Morton wrote: > On Tue, 11 Oct 2016 13:33:52 +0800 Ian Kent <ra...@themaw.net> wrote: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_ma

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-20 Thread Ian Kent
On Wed, 2016-10-19 at 12:40 -0700, Andrew Morton wrote: > On Tue, 11 Oct 2016 13:33:52 +0800 Ian Kent wrote: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_manage() dentry > > operati

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-11 Thread Ian Kent
On Tue, 2016-10-11 at 11:04 -0500, Eric W. Biederman wrote: > Ian Kent <ra...@themaw.net> writes: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_manage() dentry > > operation

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-11 Thread Ian Kent
On Tue, 2016-10-11 at 11:04 -0500, Eric W. Biederman wrote: > Ian Kent writes: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_manage() dentry > > operation will need to take a path a

[PATCH 5/8] autofs - change autofs4_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> In order to use the functions path_is_mountpoint() (or its rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Now change autofs4_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Ke

[PATCH 5/8] autofs - change autofs4_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or its rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Now change autofs4_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric

[PATCH 2/8] vfs - add path_is_mountpoint() helper

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using a given dentry that may be in a different namespace. Add helper functions, path_is_moun

[PATCH 8/8] vfs - remove unused have_submounts() function

2016-10-10 Thread Ian Kent
Now that path_has_submounts() has been added have_submounts() is no longer used so remove it. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Eric W. Biederman <ebied...@xmission.com> Cc: Omar Sandoval <osan...@osandov.com> --- fs/dc

[PATCH 3/8] vfs - add path_has_submounts()

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using the given dentry, possibly in a different namespace. Add function, path_has_sub

[PATCH 4/8] autofs - change autofs4_expire_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> In order to use the functions path_is_mountpoint() (or it's rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Start by changing autofs4_expire_wait() to take a struct path instead of a struct dentry. Sign

[PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until

[PATCH 2/8] vfs - add path_is_mountpoint() helper

2016-10-10 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using a given dentry that may be in a different namespace. Add helper functions, path_is_mountpoint() and an rcu

[PATCH 8/8] vfs - remove unused have_submounts() function

2016-10-10 Thread Ian Kent
Now that path_has_submounts() has been added have_submounts() is no longer used so remove it. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c| 33 - include/linux/dcache.h |1 - 2 files changed, 34

[PATCH 3/8] vfs - add path_has_submounts()

2016-10-10 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using the given dentry, possibly in a different namespace. Add function, path_has_submounts(), that checks is a struct

[PATCH 4/8] autofs - change autofs4_expire_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or it's rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Start by changing autofs4_expire_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent Cc: Al

[PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-10 Thread Ian Kent
From: Ian Kent If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until the mount is umounted in the clo

[PATCH 7/8] autofs - use path_has_submounts() to fix unreliable have_submount() checks

2016-10-10 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until

[PATCH 7/8] autofs - use path_has_submounts() to fix unreliable have_submount() checks

2016-10-10 Thread Ian Kent
From: Ian Kent If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until the mount is umounted in the clo

[PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-10 Thread Ian Kent
For the autofs module to be able to reliably check if a dentry is a mountpoint in a multiple namespace environment the ->d_manage() dentry operation will need to take a path argument instead of a dentry. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk

[PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-10 Thread Ian Kent
For the autofs module to be able to reliably check if a dentry is a mountpoint in a multiple namespace environment the ->d_manage() dentry operation will need to take a path argument instead of a dentry. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sando

[RFC PATCH 2/8] vfs - add path_is_mountpoint() helper

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using a given dentry that may be in a different namespace. Add helper functions, path_is_moun

[RFC PATCH 2/8] vfs - add path_is_mountpoint() helper

2016-10-02 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using a given dentry that may be in a different namespace. Add helper functions, path_is_mountpoint() and an rcu

[RFC PATCH 4/8] autofs - change autofs4_expire_wait() to take struct path

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> In order to use the functions path_is_mountpoint() (or it's rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Start by changing autofs4_expire_wait() to take a struct path instead of a struct dentry. Sign

[RFC PATCH 5/8] autofs - change autofs4_wait() to take struct path

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> In order to use the functions path_is_mountpoint() (or its rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Now change autofs4_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Ke

[RFC PATCH 4/8] autofs - change autofs4_expire_wait() to take struct path

2016-10-02 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or it's rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Start by changing autofs4_expire_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent Cc: Al

[RFC PATCH 5/8] autofs - change autofs4_wait() to take struct path

2016-10-02 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or its rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Now change autofs4_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric

[RFC PATCH 8/8] vfs - remove unused have_submounts() function

2016-10-02 Thread Ian Kent
Now that path_has_submounts() has been added have_submounts() is no longer used so remove it. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Eric W. Biederman <ebied...@xmission.com> Cc: Omar Sandoval <osan...@osandov.com> --- fs/dc

[RFC PATCH 8/8] vfs - remove unused have_submounts() function

2016-10-02 Thread Ian Kent
Now that path_has_submounts() has been added have_submounts() is no longer used so remove it. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c| 33 - include/linux/dcache.h |1 - 2 files changed, 34

[RFC PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until

[RFC PATCH 7/8] autofs - use path_has_submounts() to fix unreliable have_submount() checks

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until

[RFC PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-02 Thread Ian Kent
From: Ian Kent If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until the mount is umounted in the clo

[RFC PATCH 7/8] autofs - use path_has_submounts() to fix unreliable have_submount() checks

2016-10-02 Thread Ian Kent
From: Ian Kent If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until the mount is umounted in the clo

[RFC PATCH 3/8] vfs - add path_has_submounts()

2016-10-02 Thread Ian Kent
From: Ian Kent <ik...@redhat.com> d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using the given dentry, possibly in a different namespace. Add function, path_has_sub

[RFC PATCH 3/8] vfs - add path_has_submounts()

2016-10-02 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using the given dentry, possibly in a different namespace. Add function, path_has_submounts(), that checks is a struct

[RFC PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-02 Thread Ian Kent
For the autofs module to be able to reliably check if a dentry is a mountpoint in a multiple namespace environment the ->d_manage() dentry operation will need to take a path argument instead of a dentry. Signed-off-by: Ian Kent <ra...@themaw.net> Cc: Al Viro <v...@zeniv.linux.org.uk

[RFC PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-02 Thread Ian Kent
For the autofs module to be able to reliably check if a dentry is a mountpoint in a multiple namespace environment the ->d_manage() dentry operation will need to take a path argument instead of a dentry. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sando

[RFC PATCH 0/8] Patch series to fix autofs unreliable usage of d_mountpoint()

2016-10-02 Thread Ian Kent
submitting to mmotm. Please note the series here is against the current Linus tree and may be slightly different when posted for inclusion in mmotm. Please review and post any comments. --- Ian Kent (8): vfs - change d_manage() to take a struct path vfs - add path_is_mountpoint() helper

[RFC PATCH 0/8] Patch series to fix autofs unreliable usage of d_mountpoint()

2016-10-02 Thread Ian Kent
submitting to mmotm. Please note the series here is against the current Linus tree and may be slightly different when posted for inclusion in mmotm. Please review and post any comments. --- Ian Kent (8): vfs - change d_manage() to take a struct path vfs - add path_is_mountpoint() helper

Re: linux-next: manual merge of the akpm-current tree with the userns tree

2016-09-30 Thread Ian Kent
On Fri, 2016-09-30 at 17:42 +1000, Stephen Rothwell wrote: > Hi Andrew, Hi Stephen, > > Today's linux-next merge of the akpm-current tree got a conflict in: > > include/linux/mount.h > > between commit: > > 312ddcb332c3 ("mnt: Add a per mount namespace limit on the number of > mounts") >

Re: linux-next: manual merge of the akpm-current tree with the userns tree

2016-09-30 Thread Ian Kent
On Fri, 2016-09-30 at 17:42 +1000, Stephen Rothwell wrote: > Hi Andrew, Hi Stephen, > > Today's linux-next merge of the akpm-current tree got a conflict in: > > include/linux/mount.h > > between commit: > > 312ddcb332c3 ("mnt: Add a per mount namespace limit on the number of > mounts") >

Re: [PATCH 3/4] autofs - make mountpoint checks namespace aware

2016-09-28 Thread Ian Kent
On Fri, 2016-09-23 at 20:00 +0800, Ian Kent wrote: > On Fri, 2016-09-23 at 12:26 +0800, Ian Kent wrote: > > On Thu, 2016-09-22 at 20:37 -0500, Eric W. Biederman wrote: > > > Ian Kent <ra...@themaw.net> writes: > > > > > > > On Thu, 2016-09-22 at 10:43

<    1   2   3   4   5   6   7   8   9   10   >