summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2025-08-07 05:44:31 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2025-08-20 20:44:09 +0300
commit8fc6056dcf79937c46c97fa4996cda65956437a9 (patch)
tree18d5ed9da23efbdf90e4b2c3b4b5839444758528 /include/linux
parent2e8f4c2b2bb12fc3d40762f1bb778e95c6ddbc93 (diff)
downloadlinux-8fc6056dcf79937c46c97fa4996cda65956437a9.tar.xz
f2fs: fix to detect potential corrupted nid in free_nid_list
As reported, on-disk footer.ino and footer.nid is the same and out-of-range, let's add sanity check on f2fs_alloc_nid() to detect any potential corruption in free_nid_list. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux')
-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 2f8b8bfc0e73..6afb4a13b81d 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -79,6 +79,7 @@ enum stop_cp_reason {
STOP_CP_REASON_FLUSH_FAIL,
STOP_CP_REASON_NO_SEGMENT,
STOP_CP_REASON_CORRUPTED_FREE_BITMAP,
+ STOP_CP_REASON_CORRUPTED_NID,
STOP_CP_REASON_MAX,
};