The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.10
------>
commit 8faca501ec0832218d2eece01ddd3b6982e9abe9
Author: Maxim Patlasov <mpatla...@virtuozzo.com>
Date:   Tue Jul 18 18:19:29 2017 +0400

    fuse: fix typo in fuse_fiemap()
    
    fuse_fiemap() must honor return value of fuse_request_fiemap(). Otherwise:
    
    > FIEMAP does not return errors in case of errors returned by fused.
    > It is a very bad bug, in case of error the file looks as empty!
    
    Signed-off-by: Alexey Kuznetsov <kuz...@virtuozzo.com>
    Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com>
---
 fs/fuse/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index f362d10..a24d89b 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3821,7 +3821,6 @@ int fuse_fiemap(struct inode *inode, struct 
fiemap_extent_info *fieinfo,
        }
 
        for (;;) {
-               int res;
                int last = 0;
                unsigned int npages;
                u32 cur_max = fieinfo->fi_extents_max - 
fieinfo->fi_extents_mapped;
@@ -3835,8 +3834,8 @@ int fuse_fiemap(struct inode *inode, struct 
fiemap_extent_info *fieinfo,
                        cur_max = (npages * PAGE_SIZE) / sizeof(struct 
fiemap_extent);
                }
 
-               res = fuse_request_fiemap(inode, cur_max, &start, &len, &last, 
fieinfo);
-               if (res < 0)
+               err = fuse_request_fiemap(inode, cur_max, &start, &len, &last, 
fieinfo);
+               if (err < 0)
                        goto out;
 
                if (len == 0 || last)
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to