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 <[email protected]>
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 <[email protected]>
    Signed-off-by: Pavel Butsykin <[email protected]>
---
 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,

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to