summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorHeloise <os@iscas.ac.cn>2016-05-20 17:04:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 17:58:30 -0700
commit4108124f5c46efc951c4c6be947598a21d6b7fde (patch)
treefda4ad7946c066e364c879e3d15ae88b1cce9c66 /fs
parent28898fd1a85fa37a59c090271e8be37afe710276 (diff)
downloadop-kernel-dev-4108124f5c46efc951c4c6be947598a21d6b7fde.zip
op-kernel-dev-4108124f5c46efc951c4c6be947598a21d6b7fde.tar.gz
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.cn Signed-off-by: Heloise <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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/efs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/efs/super.c b/fs/efs/super.c
index cb68dac..368f7dd 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -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)) {
OpenPOWER on IntegriCloud