summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2023-06-12 16:32:03 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2023-06-26 06:07:10 -0700
commitc9667b19e2cf13735fe2620f9d97b788897cd4af (patch)
tree20b736bcf89dc2881090ba11df48c699fb6d0409 /fs/f2fs/segment.c
parentac1ee161dec5801d9bbd874ef69cd0ff1e8053b6 (diff)
downloadlinux-stable-c9667b19e2cf13735fe2620f9d97b788897cd4af.tar.gz
linux-stable-c9667b19e2cf13735fe2620f9d97b788897cd4af.tar.bz2
linux-stable-c9667b19e2cf13735fe2620f9d97b788897cd4af.zip
f2fs: check zone write pointer points to the end of zone
We don't need to report an issue, when the zone write pointer already points to the end of the zone, since the zone mismatch is already taken care. Signed-off-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 0c0c033c4bdd..8c7af8b4fc47 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4888,8 +4888,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) {