]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix to do sanity check for sb/cp fields correctly
authorChao Yu <chao@kernel.org>
Fri, 6 Aug 2021 00:04:37 +0000 (08:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:41:49 +0000 (13:41 +0200)
commitecb9e4e641d7f79ac4bfb0317b43ec87104db317
treecfd40585c079c281a0b4633c5e0a0e537da31c8e
parentdb2e92ad494be5bee36ca61012e8faad876e47fc
f2fs: fix to do sanity check for sb/cp fields correctly

commit 65ddf6564843890a58ee3b18bb46ce67d96333fb upstream.

This patch fixes below problems of sb/cp sanity check:
- in sanity_check_raw_superi(), it missed to consider log header
blocks while cp_payload check.
- in f2fs_sanity_check_ckpt(), it missed to check nat_bits_blocks.

Cc: <stable@kernel.org>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/super.c