linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read()
@ 2023-05-25  8:38 David Howells
  2023-05-25 11:18 ` Johannes Thumshirn
  2023-05-25 15:21 ` Matthew Wilcox
  0 siblings, 2 replies; 6+ messages in thread
From: David Howells @ 2023-05-25  8:38 UTC (permalink / raw)
  To: Damien Le Moal
  Cc: dhowells, Naohiro Aota, Johannes Thumshirn, Christoph Hellwig,
	Al Viro, Jens Axboe, linux-fsdevel, linux-block, linux-mm,
	linux-kernel

    
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@kernel.org>
Link: https://lore.kernel.org/r/5d327bed-b532-ad3b-a211-52ad0a3e276a@kernel.org/
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Naohiro Aota <naohiro.aota@wdc.com>
cc: Johannes Thumshirn <jth@kernel.org>
cc: Christoph Hellwig <hch@lst.de>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: Jens Axboe <axboe@kernel.dk>
cc: linux-fsdevel@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-mm@kvack.org
---
 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);
 	}
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-26 14:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25  8:38 [PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read() David Howells
2023-05-25 11:18 ` Johannes Thumshirn
2023-05-25 15:21 ` Matthew Wilcox
2023-05-25 23:04   ` Damien Le Moal
2023-05-25 23:46     ` Damien Le Moal
2023-05-26 14:07       ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).