mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs:affs:fix sb_bread() return value
@ 2017-04-26  6:59 Heloise
  2017-04-26  7:46 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Heloise @ 2017-04-26  6:59 UTC (permalink / raw)
  To: akpm, fabf, viro, jack, mszeredi, mikulas
  Cc: linux-fsdevel, linux-kernel, Heloise

When the function sb_bread() fails, the return value should
be -EIO, fix it.

Signed-off-by: Heloise <os@iscas.ac.cn>
---
 fs/affs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index c2c27a8..df1f4fe 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -419,7 +419,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
 	boot_bh = sb_bread(sb, 0);
 	if (!boot_bh) {
 		pr_err("Cannot read boot block\n");
-		return -EINVAL;
+		return -EIO;
 	}
 	memcpy(sig, boot_bh->b_data, 4);
 	brelse(boot_bh);
-- 
2.1.0

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

end of thread, other threads:[~2017-04-26  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26  6:59 [PATCH] fs:affs:fix sb_bread() return value Heloise
2017-04-26  7:46 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®