diff options
author | Daeho Jeong <daehojeong@google.com> | 2023-04-07 01:11:04 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-04-14 02:37:57 +0300 |
commit | 1ac3d037bee9ac3c4ec4041aafb54c5dffd7e1d0 (patch) | |
tree | 19e4f152a705c4491a54183d6d88b2becfb31092 /fs/f2fs | |
parent | d94772154e524b329a168678836745d2773a6e02 (diff) | |
download | linux-1ac3d037bee9ac3c4ec4041aafb54c5dffd7e1d0.tar.xz |
f2fs: fix passing relative address when discard zones
We should not pass relative address in a zone to
__f2fs_issue_discard_zone().
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index fc0734e4fb92..84e2e558ea99 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4942,9 +4942,8 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type) "New zone for curseg[%d] is not yet discarded. " "Reset the zone: curseg[0x%x,0x%x]", type, cs->segno, cs->next_blkoff); - err = __f2fs_issue_discard_zone(sbi, zbd->bdev, - zone_sector >> log_sectors_per_block, - zone.len >> log_sectors_per_block); + err = __f2fs_issue_discard_zone(sbi, zbd->bdev, cs_zone_block, + zone.len >> log_sectors_per_block); if (err) { f2fs_err(sbi, "Discard zone failed: %s (errno=%d)", zbd->path, err); |