summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorZhiguo Niu <zhiguo.niu@unisoc.com>2023-10-16 19:27:31 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 17:14:50 +0000
commit184b4e42d9290ec2aadf1a6782dbdcd0a7262b41 (patch)
tree4a91a0ba22825c044c7cd774eeea91e315d4f1dd /include
parent38f43d43f20a896c709c1d9297c8108bc405f15b (diff)
downloadlinux-stable-184b4e42d9290ec2aadf1a6782dbdcd0a7262b41.tar.gz
linux-stable-184b4e42d9290ec2aadf1a6782dbdcd0a7262b41.tar.bz2
linux-stable-184b4e42d9290ec2aadf1a6782dbdcd0a7262b41.zip
f2fs: fix error path of __f2fs_build_free_nids
[ Upstream commit a5e80e18f268ea7c7a36bc4159de0deb3b5a2171 ] If NAT is corrupted, let scan_nat_page() return EFSCORRUPTED, so that, caller can set SBI_NEED_FSCK flag into checkpoint for later repair by fsck. Also, this patch introduces a new fscorrupted error flag, and in above scenario, it will persist the error flag into superblock synchronously to avoid it has no luck to trigger a checkpoint to record SBI_NEED_FSCK Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/f2fs_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index a82a4bb6ce68..cf1adceb0269 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -104,6 +104,7 @@ enum f2fs_error {
ERROR_CORRUPTED_VERITY_XATTR,
ERROR_CORRUPTED_XATTR,
ERROR_INVALID_NODE_REFERENCE,
+ ERROR_INCONSISTENT_NAT,
ERROR_MAX,
};