linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qnx4: do not interpret -EIO as a correct address
@ 2020-10-23 21:16 Tong Zhang
  2020-11-02  9:12 ` Anders Larsen
  0 siblings, 1 reply; 13+ messages in thread
From: Tong Zhang @ 2020-10-23 21:16 UTC (permalink / raw)
  To: Anders Larsen, linux-kernel; +Cc: ztong0001

qnx4_block_map() may return -EIO on funny qnx4 fs image, in this case do
not interpret -EIO as a correct address

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 fs/qnx4/inode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index e8da1cde87b9..d3a40c5b1a9a 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -59,6 +59,8 @@ static int qnx4_get_block( struct inode *inode, sector_t iblock, struct buffer_h
 	QNX4DEBUG((KERN_INFO "qnx4: qnx4_get_block inode=[%ld] iblock=[%ld]\n",inode->i_ino,iblock));
 
 	phys = qnx4_block_map( inode, iblock );
+	if (phys == -EIO)
+		return -EIO;
 	if ( phys ) {
 		// logical block is before EOF
 		map_bh(bh, inode->i_sb, phys);
-- 
2.25.1


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

end of thread, other threads:[~2020-11-11  1:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 21:16 [PATCH] qnx4: do not interpret -EIO as a correct address Tong Zhang
2020-11-02  9:12 ` Anders Larsen
2020-11-02 20:15   ` [PATCH v2] " Tong Zhang
2020-11-02 22:44     ` David Laight
2020-11-02 23:14       ` [PATCH v3] qnx4: qnx4_block_map error handling Tong Zhang
2020-11-03 10:54         ` David Laight
2020-11-03 13:52           ` Tong Zhang
2020-11-03 21:57             ` David Laight
2020-11-03 22:32               ` Tong Zhang
2020-11-11  1:33                 ` Tong Zhang
2020-11-03 17:35           ` [PATCH v4] " Tong Zhang
2020-11-02 23:17       ` [PATCH v2] qnx4: do not interpret -EIO as a correct address Tong Zhang
2020-11-02 20:17   ` [PATCH] " Tong Zhang

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).