[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: cleanup in truncate (backport)
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Oct 31 16:03:22 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.15
------>
commit 6225b28dad57af2521f00caf99e48485c350a9d7
Author: Alexey Kuznetsov <kuznet at virtuozzo.com>
Date: Wed Oct 31 16:03:20 2018 +0300
fs/fuse kio_pcs: cleanup in truncate (backport)
It was not a bug, the behaviour stays the same, but code looked really strange.
Noticed by dmonakhov@
Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_map.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 9e7d0dba2bbd..ec00cf238b1c 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2481,14 +2481,13 @@ noinline void pcs_mapping_truncate(struct pcs_int_request *ireq, u64 old_size)
ireq->truncreq.offset = offset;
ireq->truncreq.phase = 0;
+ map_truncate_tail(&di->mapping, offset);
+
if (offset == 0) {
- map_truncate_tail(&di->mapping, offset);
ireq_complete(ireq);
return;
}
- map_truncate_tail(&di->mapping, offset + 1);
-
m = pcs_find_get_map(di, offset - 1);
FUSE_KTRACE(ireq->cc->fc, "mapping truncate %llu->%llu " DENTRY_FMT " %x", (unsigned long long)old_size,
More information about the Devel
mailing list