fs/efs/super.c: fix return value
authorHeloise <os@iscas.ac.cn>
Sat, 21 May 2016 00:04:25 +0000 (17:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
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>
fs/efs/super.c

index cb68dac..368f7dd 100644 (file)
@@ -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)) {