From a65001e8a4d465693d0191297a6fd864c96b3147 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 10 Dec 2018 17:19:21 -0500 Subject: btrfs: sanitize security_mnt_opts use 1) keeping a copy in btrfs_fs_info is completely pointless - we never use it for anything. Getting rid of that allows for simpler calling conventions for setup_security_options() (caller is responsible for freeing mnt_opts in all cases). 2) on remount we want to use ->sb_remount(), not ->sb_set_mnt_opts(), same as we would if not for FS_BINARY_MOUNTDATA. Behaviours *are* close (in fact, selinux sb_set_mnt_opts() ought to punt to sb_remount() in "already initialized" case), but let's handle that uniformly. And the only reason why the original btrfs changes didn't go for security_sb_remount() in btrfs_remount() case is that it hadn't been exported. Let's export it for a while - it'll be going away soon anyway. Reviewed-by: David Howells Signed-off-by: Al Viro --- security/security.c | 1 + 1 file changed, 1 insertion(+) (limited to 'security/security.c') diff --git a/security/security.c b/security/security.c index afb05646d41b..3d8b72904e00 100644 --- a/security/security.c +++ b/security/security.c @@ -404,6 +404,7 @@ int security_sb_remount(struct super_block *sb, { return call_int_hook(sb_remount, 0, sb, opts); } +EXPORT_SYMBOL(security_sb_remount); int security_sb_kern_mount(struct super_block *sb) { -- cgit v1.2.3-59-g8ed1b