Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux