Skip to contentSkip to conversation

fs:efs:fix return value

PATCH Applied Heloise 1 participant 1 message May 17, 2016

lore
Share & tools
lore

Heloise

author
#0 lore raw

PATCH 1/1 fs:efs:fix return value

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

---
 fs/efs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/efs/super.c +2 -2
index cb68dac..368f7dd 100644
@@ -275,7 +275,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
 
 	if (!bh) {
 		pr_err("cannot read volume header\n");
-		return -EINVAL;
+		return -EIO;
 	}
 
 	/*
@@ -293,7 +293,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
 	bh = sb_bread(s, sb->fs_start + EFS_SUPER);
 	if (!bh) {
 		pr_err("cannot read superblock\n");
-		return -EINVAL;
+		return -EIO;
 	}
 		
 	if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) {
Signature · 1 line
2.1.0