diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 1202028676ea..b38ab17da93c 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4812,8 +4812,12 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi, break; } - // The write pointer matches with the valid blocks - if (last_valid_block + 1 == wp_block) + /* + * The write pointer matches with the valid blocks or + * already points to the end of the zone. + */ + if ((last_valid_block + 1 == wp_block) || + (zone->wp == zone->start + zone->len)) return 0; if (last_valid_block + 1 == zone_block) {