summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-12-05 11:58:35 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2018-12-21 11:46:42 -0500
commita10d7c22b34bcf744679019269bfb33ebf0b75ee (patch)
treed8061eb8e92296f6a55d683112c8f8a172f33e83 /fs/super.c
parentf5c0c26d9008b355babb6d16f3d7c4de3bada0e7 (diff)
LSM: split ->sb_set_mnt_opts() out of ->sb_kern_mount()
... leaving the "is it kernel-internal" logics in the caller. Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index d571527cb8b8..1f75fe312597 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1275,10 +1275,16 @@ mount_fs(struct file_system_type *type, int flags, const char *name, void *data)
1275 smp_wmb(); 1275 smp_wmb();
1276 sb->s_flags |= SB_BORN; 1276 sb->s_flags |= SB_BORN;
1277 1277
1278 error = security_sb_kern_mount(sb, flags, &opts); 1278 error = security_sb_set_mnt_opts(sb, &opts, 0, NULL);
1279 if (error) 1279 if (error)
1280 goto out_sb; 1280 goto out_sb;
1281 1281
1282 if (!(flags & MS_KERNMOUNT)) {
1283 error = security_sb_kern_mount(sb);
1284 if (error)
1285 goto out_sb;
1286 }
1287
1282 /* 1288 /*
1283 * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE 1289 * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE
1284 * but s_maxbytes was an unsigned long long for many releases. Throw 1290 * but s_maxbytes was an unsigned long long for many releases. Throw