Commit 6840fadd authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: fix to update upper_p in __get_secs_required() correctly



Commit 1acd73ed ("f2fs: fix to account dirty data in __get_secs_required()")
missed to calculate upper_p w/ data_secs, fix it.

Fixes: 1acd73ed ("f2fs: fix to account dirty data in __get_secs_required()")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 40aa9e12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)