summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-06-20 06:36:14 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2019-07-03 01:40:41 +0300
commit10f966bbf521bb9b2e497bbca496a5141f4071d0 (patch)
tree828ab169692133b6220c3a547631349c0a0cbced /fs/f2fs/super.c
parentf91108b801ad7d7668c95841f4cb76494b2a9c8a (diff)
downloadlinux-10f966bbf521bb9b2e497bbca496a5141f4071d0.tar.xz
f2fs: use generic EFSBADCRC/EFSCORRUPTED
f2fs uses EFAULT as error number to indicate filesystem is corrupted all the time, but generic filesystems use EUCLEAN for such condition, we need to change to follow others. This patch adds two new macros as below to wrap more generic error code macros, and spread them in code. EFSBADCRC EBADMSG /* Bad CRC detected */ EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Chao Yu <yuchao0@huawei.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 2a40944d0810..3ac706506ca2 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2846,7 +2846,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi,
if (sanity_check_raw_super(sbi, bh)) {
f2fs_err(sbi, "Can't find valid F2FS filesystem in %dth superblock",
block + 1);
- err = -EINVAL;
+ err = -EFSCORRUPTED;
brelse(bh);
continue;
}