fuse makes an entirely noop yet wasting lots of time call
to user space every fsync().

Actually, it was a surprize from mainstream, which used
to corrupt vstorage in vz9 and late vz7. We put a strut
to prevent corruption bd7d3266.. "fuse: illegal access to file in vstorage"

Now it is time to remove this strut completely
algother with this nonsensial call.

NOTE: for vstorage only, flag close_wait is ours.
But actually I see no way how this call could be used
for something not destructive for any fuse backend.
Whatever, it is not our problem.

https://pmc.acronis.work/browse/VSTOR-79527

Signed-off-by: Alexey Kuznetsov <kuz...@virtuozzo.com>
---
 fs/fuse/file.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index b5abc7b..5e9ba6b 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2163,11 +2163,10 @@ int fuse_write_inode(struct inode *inode, struct 
writeback_control *wbc)
        struct fuse_file *ff;
        int err;
 
-       ff = __fuse_write_file_get(fc, fi);
-       if (!ff && fc->close_wait) {
-               WARN_ON(1);
+       if (fc->close_wait)
                return 0;
-       }
+
+       ff = __fuse_write_file_get(fc, fi);
        err = fuse_flush_times(inode, ff);
        if (ff)
                fuse_file_put(ff, false, false);
-- 
1.8.3.1

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

Reply via email to