Skip to content

Commit

Permalink
fs/efs/super.c: fix return value
Browse files Browse the repository at this point in the history
When sb_bread() fails, the return value should be -EIO, fix it.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Heloise <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Firo Yang <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Heloise authored and torvalds committed May 21, 2016
1 parent 28898fd commit 4108124
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/efs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand All @@ -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)) {
Expand Down

0 comments on commit 4108124

Please sign in to comment.