[Devel] [PATCH RHEL7 COMMIT] fuse kio: Return possibility to handle files served in userspace

Konstantin Khorenko khorenko at virtuozzo.com
Thu Oct 11 11:19:34 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.7
------>
commit 8c3ae1c2abf83c3bed189a6835529ecce4e84999
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Oct 11 11:19:32 2018 +0300

    fuse kio: Return possibility to handle files served in userspace
    
    Fallback to old behavior, when !fi->private files are
    served in userspace.
    
    https://pmc.acronis.com/browse/VSTOR-15947
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Acked-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index cd059b28d940..14bed318d139 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -1073,8 +1073,10 @@ static int pcs_kio_classify_req(struct fuse_conn *fc, struct fuse_req *req, bool
 	case FUSE_SETATTR: {
 		struct fuse_setattr_in const *inarg = req->in.args[0].value;
 
-		if (unlikely(!fi || !fi->private))
+		if (unlikely(!fi))
 			goto fail;
+		if (!fi->private)
+			return 1;
 		if (!(inarg->valid & FATTR_SIZE))
 			return 1;
 		if (lk)
@@ -1096,8 +1098,10 @@ static int pcs_kio_classify_req(struct fuse_conn *fc, struct fuse_req *req, bool
 		return 1;
 	}
 
-	if (unlikely(!fi || !fi->private))
+	if (unlikely(!fi))
 		goto fail;
+	if (!fi->private)
+		return 1;
 
 	return 0;
 



More information about the Devel mailing list