[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180918095437.GB417@jagdpanzerIV>
Date: Tue, 18 Sep 2018 18:54:37 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: David Howells <dhowells@...hat.com>
Cc: viro@...iv.linux.org.uk, torvalds@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock
creation/configuration context [ver #11]
On (08/01/18 16:25), David Howells wrote:
[..]
> @@ -2460,18 +2428,41 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags,
> if (!can_change_locked_flags(mnt, mnt_flags))
> return -EPERM;
>
> - err = security_sb_remount(sb, data, data_size);
> - if (err)
> - return err;
> + if (type->init_fs_context) {
> + fc = vfs_sb_reconfig(path, sb_flags);
> + if (IS_ERR(fc))
> + return PTR_ERR(fc);
> +
> + err = parse_monolithic_mount_data(fc, data, data_size);
> + if (err < 0)
> + goto err_fc;
> +
> + if (fc->ops->validate) {
> + err = fc->ops->validate(fc);
> + if (err < 0)
> + goto err_fc;
> + }
> +
> + err = security_fs_context_validate(fc);
> + if (err)
> + return err;
goto err_fc?
> + } else {
> + err = security_sb_remount(sb, data, data_size);
> + if (err)
> + return err;
> + }
goto err_fc?
-ss
Powered by blists - more mailing lists