[Devel] [PATCH RHEL7 COMMIT] fuse kio: Differ fuse_pcs_kdirect_claim_op() return values
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Oct 16 15:37:13 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.8
------>
commit 295ff1f4e5ce59e3d15387f5e1c0f79489727b04
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Oct 16 15:37:11 2018 +0300
fuse kio: Differ fuse_pcs_kdirect_claim_op() return values
Fail open in case of fuse_get_req() was failed, and leave it successful in case
of vstorage-mount said we can't claim file by kio (e.g., file will be served by
userspace).
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Reviewed-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 85fe69f4db89..a9b0b729dafe 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -293,7 +293,7 @@ static int fuse_pcs_kdirect_claim_op(struct fuse_conn *fc, struct file *file,
if (req->out.h.error || outarg->result) {
TRACE("h.err:%d result:%d\n",
req->out.h.error, outarg->result);
- err = req->out.h.error ? req->out.h.error : outarg->result;
+ err = -EOPNOTSUPP;
}
fuse_put_request(fc, req);
@@ -347,7 +347,7 @@ static int kpcs_do_file_open(struct fuse_conn *fc, struct file *file, struct ino
pcs_mapping_deinit(&di->mapping);
kfree(di);
/* Claim error means we cannot claim, just that */
- return 0;
+ return (ret == -EOPNOTSUPP ? 0: ret);
}
/* TODO: Propper initialization of dentry should be here!!! */
fi->private = di;
More information about the Devel
mailing list