[Virtio-fs] [PATCH 7/9] fuse: return early if punch_hole fails

Liu Bo bo.liu at linux.alibaba.com
Tue Apr 16 18:03:20 UTC 2019


We don't have to clear FUSE_I_SIZE_UNSTABLE if punch_hole fails at
filemap_write_and_wait_rang(), since the bit is not set yet.

Signed-off-by: Liu Bo <bo.liu at linux.alibaba.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 620326e..712fd97 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3585,7 +3585,7 @@ static long __fuse_file_fallocate(struct file *file, int mode,
 		err = filemap_write_and_wait_range(inode->i_mapping, offset,
 							endbyte);
 		if (err)
-			goto out;
+			return err;
 		fuse_sync_writes(inode);
 	}
 
-- 
1.8.3.1




More information about the Virtio-fs mailing list