]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: forcibly migrate to secure space for zoned device file pinning
authorDaeho Jeong <daehojeong@google.com>
Thu, 12 Sep 2024 16:59:58 +0000 (09:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:03:45 +0000 (12:03 +0200)
[ Upstream commit 5cc69a27abfa91abbb39fc584f82d6c867b60f47 ]

We need to migrate data blocks even though it is full to secure space
for zoned device file pinning.

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>
fs/f2fs/gc.c

index a59fec64eccfb0148448ebf16913b3a3b0a68b48..938249e7819e4ed4c0e5d925cdb19e5d207e0423 100644 (file)
@@ -2056,8 +2056,7 @@ int f2fs_gc_range(struct f2fs_sb_info *sbi,
                        .iroot = RADIX_TREE_INIT(gc_list.iroot, GFP_NOFS),
                };
 
-               do_garbage_collect(sbi, segno, &gc_list, FG_GC,
-                                               dry_run_sections == 0, false);
+               do_garbage_collect(sbi, segno, &gc_list, FG_GC, true, false);
                put_gc_inode(&gc_list);
 
                if (!dry_run && get_valid_blocks(sbi, segno, true))