summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2024-04-10 02:34:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-12 12:39:11 +0300
commitfe0c337203db5cbcaf2bb336d9c22933448e203d (patch)
treeeae0463763c895169934f87c0e4d73f5de0f5c4a /fs
parentee36ecde58a2da28a0bc97d0f4c395601330375e (diff)
downloadlinux-fe0c337203db5cbcaf2bb336d9c22933448e203d.tar.xz
f2fs: write missing last sum blk of file pinning section
[ Upstream commit b084403cfc3295b59a1b6bcc94efaf870fc3c2c9 ] While do not allocating a new section in advance for file pinning area, I missed that we should write the sum block for the last segment of a file pinning section. Fixes: 9703d69d9d15 ("f2fs: support file pinning for zoned devices") Signed-off-by: Daeho Jeong <daehojeong@google.com> Reviewed-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 'fs')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 4fd76e867e0a..6474b7338e81 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3559,6 +3559,8 @@ int f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
if (segment_full) {
if (type == CURSEG_COLD_DATA_PINNED &&
!((curseg->segno + 1) % sbi->segs_per_sec)) {
+ write_sum_page(sbi, curseg->sum_blk,
+ GET_SUM_BLOCK(sbi, curseg->segno));
reset_curseg_fields(curseg);
goto skip_new_segment;
}