aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/init.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2008-10-16 01:02:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:39 -0400
commit8d7b48e0bc5fa01a818eac713d4cb0763090cd0e (patch)
tree4477b2f23f8596901f38582242a40ff869fb798c /fs/autofs4/init.c
parent4b22ff13415fa30b6282c88da790c82b4c6e5127 (diff)
autofs4: add miscellaneous device for ioctls
Add a miscellaneous device to the autofs4 module for routing ioctls. This provides the ability to obtain an ioctl file handle for an autofs mount point that is possibly covered by another mount. The actual problem with autofs is that it can't reconnect to existing mounts. Immediately one things of just adding the ability to remount autofs file systems would solve it, but alas, that can't work. This is because autofs direct mounts and the implementation of "on demand mount and expire" of nested mount trees have the file system mounted on top of the mount trigger dentry. To resolve this a miscellaneous device node for routing ioctl commands to these mount points has been implemented in the autofs4 kernel module and a library added to autofs. This provides the ability to open a file descriptor for these over mounted autofs mount points. Please refer to Documentation/filesystems/autofs4-mount-control.txt for a discussion of the problem, implementation alternatives considered and a description of the interface. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: build fix] Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4/init.c')
-rw-r--r--fs/autofs4/init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/autofs4/init.c b/fs/autofs4/init.c
index 723a1c5e361b..9722e4bd8957 100644
--- a/fs/autofs4/init.c
+++ b/fs/autofs4/init.c
@@ -29,11 +29,20 @@ static struct file_system_type autofs_fs_type = {
29 29
30static int __init init_autofs4_fs(void) 30static int __init init_autofs4_fs(void)
31{ 31{
32 return register_filesystem(&autofs_fs_type); 32 int err;
33
34 err = register_filesystem(&autofs_fs_type);
35 if (err)
36 return err;
37
38 autofs_dev_ioctl_init();
39
40 return err;
33} 41}
34 42
35static void __exit exit_autofs4_fs(void) 43static void __exit exit_autofs4_fs(void)
36{ 44{
45 autofs_dev_ioctl_exit();
37 unregister_filesystem(&autofs_fs_type); 46 unregister_filesystem(&autofs_fs_type);
38} 47}
39 48