One thread has made fallocate and needs to take inode_lock()
to commit attributes _before_ it dropped dio write iocount.
Another thread took inode_mutex and has to wait for pending
writes since it hit fuse cached writeback region.

Affects: #VSTOR-95025

Signed-off-by: Alexey Kuznetsov <kuz...@virtuozzo.com>
---
 fs/fuse/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index aa248bd..6a89f96 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3469,8 +3469,8 @@ static long fuse_file_fallocate(struct file *file, int 
mode, loff_t offset,
        args.in_args[0].value = &inarg;
        err = fuse_simple_request(fm, &args);
        if (revoke_lock) {
-               inode_lock(inode);
                fuse_write_dio_end(fi);
+               inode_lock(inode);
        }
        if (err == -ENOSYS) {
                fm->fc->no_fallocate = 1;
-- 
1.8.3.1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to