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

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 28 18:39:33 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.2
------>
commit 5d36d87d2ed05619a094bb362f88af0dc31e086e
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Mon May 28 18:39:33 2018 +0300

    fs/fuse kio_pcs: remove s_subtype check
    
    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