[Devel] [PATCH] fs/fuse kio_pcs: remove s_subtype check

Kirill Tkhai ktkhai at virtuozzo.com
Mon May 28 18:31:09 MSK 2018


On 28.05.2018 18:28, Pavel Butsykin wrote:
> The s_subtype field is initialized after calling vfs_kern_mount(), so we can't
> check s_subtype inside vfs_kern_mount(). Instead of s_subtype we can check
> dev_name, but this leads to an unjustified modification of common fuse.
> 
> Given that s_subtype/dev_name check doesn't protect from the possibility to
> mount fuse whith kpcs on any device except vstorage/pstorage, we can remove
> this check.
> 
> Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>

> ---
>  fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> index 61378f0d9a58..930ddff1b680 100644
> --- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> +++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> @@ -142,12 +142,7 @@ void kpcs_conn_abort(struct fuse_conn *fc)
>  
>  static int kpcs_probe(struct fuse_conn *fc, char *name)
>  {
> -	if (IS_PSTORAGE(fc->sb))
> -		return 1;
> -
> -	pr_err("FUSE: kio_pcs: kdirect is only available for"
> -	       "pstorage/vstorage fuse mount\n");
> -	return 0;
> +	return 1;
>  }
>  
>  static int fuse_pcs_getfileinfo(struct fuse_conn *fc, struct file *file,
> 


More information about the Devel mailing list