aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/init.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2019-01-03 15:27:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-04 13:13:46 -0800
commit55f0d8205dc6399826332c21bc56626868cd453d (patch)
tree9a15cf912445e21d9ad3fb87f087a89185313191 /fs/autofs/init.c
parentinit/main.c: make "initcall_level_names[]" const char * (diff)
downloadlinux-dev-55f0d8205dc6399826332c21bc56626868cd453d.tar.xz
linux-dev-55f0d8205dc6399826332c21bc56626868cd453d.zip
autofs: improve ioctl sbi checks
Al Viro made some suggestions to improve the implementation of commit 0633da48f0 ("fix autofs_sbi() does not check super block type"). The check is unnecessary in all cases except for ioctl usage so placing the check in the super block accessor function adds a small overhead to the common case where it isn't needed. So it's sufficient to do this in the ioctl code only. Also the check in the ioctl code is needlessly complex. [akpm@linux-foundation.org: declare autofs_fs_type in .h, not .c] Link: http://lkml.kernel.org/r/154296970987.9889.1597442413573683096.stgit@pluto-themaw-net Signed-off-by: Ian Kent <raven@themaw.net> Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--fs/autofs/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/autofs/init.c b/fs/autofs/init.c
index 79ae07d9592f..c0c1db2cc6ea 100644
--- a/fs/autofs/init.c
+++ b/fs/autofs/init.c
@@ -16,7 +16,7 @@ static struct dentry *autofs_mount(struct file_system_type *fs_type,
return mount_nodev(fs_type, flags, data, autofs_fill_super);
}
-static struct file_system_type autofs_fs_type = {
+struct file_system_type autofs_fs_type = {
.owner = THIS_MODULE,
.name = "autofs",
.mount = autofs_mount,