diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 7010440cb64c..d016504fad4b 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1199,7 +1199,8 @@ static int move_data_block(struct inode *inode, block_t bidx, } if (f2fs_is_pinned_file(inode)) { - f2fs_pin_file_control(inode, true); + if (gc_type == FG_GC) + f2fs_pin_file_control(inode, true); err = -EAGAIN; goto out; }