Commit 4108124f authored by Heloise's avatar Heloise Committed by Linus Torvalds

fs/efs/super.c: fix return value

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

Link: http://lkml.kernel.org/r/1463464943-4142-1-git-send-email-os@iscas.ac.cnSigned-off-by: default avatarHeloise <os@iscas.ac.cn>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Firo Yang <firogm@gmail.com>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 28898fd1
...@@ -275,7 +275,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent) ...@@ -275,7 +275,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
if (!bh) { if (!bh) {
pr_err("cannot read volume header\n"); 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) ...@@ -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); bh = sb_bread(s, sb->fs_start + EFS_SUPER);
if (!bh) { if (!bh) {
pr_err("cannot read superblock\n"); pr_err("cannot read superblock\n");
return -EINVAL; return -EIO;
} }
if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) { if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment