lkml.org 
[lkml]   [2016]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs:efs:fix return value
Date
When the function sb_bread() fails, the return value should
be -EIO, fix it.

Signed-off-by: Heloise <os@iscas.ac.cn>
---
fs/efs/super.c | 4 ++--
1 file 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)) {
--
2.1.0

\
 
 \ /
  Last update: 2016-05-17 08:21    [W:0.023 / U:4.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site