From 1c69b3a7a0e16668f7fc411a21eb95a262f6fbeb Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 11 Oct 2023 12:34:17 +0200 Subject: [PATCH] Properly propagate errors in the write syscall --- Linux-5.1/fs/winefs/xip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Linux-5.1/fs/winefs/xip.c b/Linux-5.1/fs/winefs/xip.c index 6ad3f4c4a..da6e2ee33 100644 --- a/Linux-5.1/fs/winefs/xip.c +++ b/Linux-5.1/fs/winefs/xip.c @@ -231,6 +231,7 @@ __pmfs_xip_file_write(struct address_space *mapping, const char __user *buf, &xmem, &xpfn); PMFS_END_TIMING(write_find_block_t, write_find_blocks_time); if (blocks_found <= 0) { + status = blocks_found; break; } @@ -918,9 +919,9 @@ static int pmfs_find_and_alloc_blocks(struct inode *inode, set_block: *bno = block; - err = 0; - err: return blocks_found; + err: + return err; } int pmfs_iomap_begin(struct inode *inode, loff_t offset, loff_t length,