]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
f2fs: fix to update upper_p in __get_secs_required() correctly
authorChao Yu <chao@kernel.org>
Thu, 24 Jul 2025 08:01:42 +0000 (16:01 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Jul 2025 16:36:20 +0000 (16:36 +0000)
Commit 1acd73edbbfe ("f2fs: fix to account dirty data in __get_secs_required()")
missed to calculate upper_p w/ data_secs, fix it.

Fixes: 1acd73edbbfe ("f2fs: fix to account dirty data in __get_secs_required()")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.h

index d2c73f64113459eebe016594eba012b7082a991c..2123645cf1756ec28bb4c8c0e0840d061a193e63 100644 (file)
@@ -678,7 +678,7 @@ static inline void __get_secs_required(struct f2fs_sb_info *sbi,
        if (lower_p)
                *lower_p = node_secs + dent_secs + data_secs;
        if (upper_p)
-               *upper_p = node_secs + dent_secs +
+               *upper_p = node_secs + dent_secs + data_secs +
                        (node_blocks ? 1 : 0) + (dent_blocks ? 1 : 0) +
                        (data_blocks ? 1 : 0);
        if (curseg_p)