From 5b4002391153acebce2557af318bbdc17e235134 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 12 Dec 2018 20:13:29 -0500 Subject: LSM: turn sb_eat_lsm_opts() into a method Kill ->sb_copy_data() - it's used only in combination with immediately following ->sb_parse_opts_str(). Turn that combination into a new method. This is just a mechanical move - cleanups will be the next step. Reviewed-by: David Howells Signed-off-by: Al Viro --- security/security.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'security/security.c') diff --git a/security/security.c b/security/security.c index 3d8b72904e00..feb18c925349 100644 --- a/security/security.c +++ b/security/security.c @@ -386,16 +386,7 @@ void security_sb_free(struct super_block *sb) int security_sb_eat_lsm_opts(char *options, struct security_mnt_opts *opts) { - char *s = (char *)get_zeroed_page(GFP_KERNEL); - int err; - - if (!s) - return -ENOMEM; - err = call_int_hook(sb_copy_data, 0, options, s); - if (!err) - err = call_int_hook(sb_parse_opts_str, 0, s, opts); - free_page((unsigned long)s); - return err; + return call_int_hook(sb_eat_lsm_opts, 0, options, opts); } EXPORT_SYMBOL(security_sb_eat_lsm_opts); -- cgit v1.2.3-59-g8ed1b