[PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    
Call zonefs_io_error() after getting any error from filemap_splice_read()
in zonefs_file_splice_read(), including non-fatal errors such as ENOMEM,
EINTR and EAGAIN.

Suggested-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
Link: https://lore.kernel.org/r/5d327bed-b532-ad3b-a211-52ad0a3e276a@xxxxxxxxxx/
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
cc: Naohiro Aota <naohiro.aota@xxxxxxx>
cc: Johannes Thumshirn <jth@xxxxxxxxxx>
cc: Christoph Hellwig <hch@xxxxxx>
cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
cc: Jens Axboe <axboe@xxxxxxxxx>
cc: linux-fsdevel@xxxxxxxxxxxxxxx
cc: linux-block@xxxxxxxxxxxxxxx
cc: linux-mm@xxxxxxxxx
---
 fs/zonefs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index 65d4c4fe6364..0660cffc5ed8 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -782,7 +782,7 @@ static ssize_t zonefs_file_splice_read(struct file *in, loff_t *ppos,
 
 	if (len > 0) {
 		ret = filemap_splice_read(in, ppos, pipe, len, flags);
-		if (ret == -EIO)
+		if (ret < 0)
 			zonefs_io_error(inode, false);
 	}
 





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux