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 <pbutsy...@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,
-- 
2.15.1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to