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 dc2268670f70..55b84cf3ec2b 100644 --- a/drivers/md/dm-ploop-map.c +++ b/drivers/md/dm-ploop-map.c @@ -846,7 +846,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
