The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear 
at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.49
------>
commit dc4e0d9f0d8c8aef2995f77fbbde26f640824d88
Author: Kirill Tkhai <[email protected]>
Date:   Thu Jun 24 14:27:01 2021 +0300

    ploop: Use vfs_truncate2()
    
    We may lose vstorage lease on file/inode. Use vfs_truncate2(),
    which cares about file argument passed to do_truncate().
    
    Suggested-by: Alexey Kuznetsov <[email protected]>
    Signed-off-by: Kirill Tkhai <[email protected]>
---
 drivers/md/dm-ploop-map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 3a2dc8696118..d4bd646ef1d9 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -853,7 +853,7 @@ static int truncate_prealloc_safe(struct ploop_delta 
*delta, loff_t len, const c
                return 0;
        new_len = ALIGN(new_len, PREALLOC_SIZE);
 
-       ret = vfs_truncate(&file->f_path, new_len);
+       ret = vfs_truncate2(&file->f_path, new_len, file);
        if (ret) {
                pr_err("ploop: %s->truncate(): %d\n", func, ret);
                return ret;
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to