summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-01-19 07:36:20 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2023-02-02 13:37:15 -0800
commit6392e9ff8bba228746e37b78b960de6de855fc9d (patch)
tree8dd4e89e1ed934b530d8d2e85ffcd8c6d56cdc88 /fs/f2fs/segment.h
parent5a4fed7cd97ac3d9708982d3801e132e2a36c126 (diff)
downloadlinux-6392e9ff8bba228746e37b78b960de6de855fc9d.tar.gz
linux-6392e9ff8bba228746e37b78b960de6de855fc9d.tar.bz2
linux-6392e9ff8bba228746e37b78b960de6de855fc9d.zip
f2fs: add a f2fs_curseg_valid_blocks helper
Add a helper to return the valid blocks on log and SSR segments, and replace the last two uses of curseg_blkoff with it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index ad6a9c19f46a..0f3f05cb8c29 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -710,12 +710,6 @@ static inline unsigned char curseg_alloc_type(struct f2fs_sb_info *sbi,
return curseg->alloc_type;
}
-static inline unsigned short curseg_blkoff(struct f2fs_sb_info *sbi, int type)
-{
- struct curseg_info *curseg = CURSEG_I(sbi, type);
- return curseg->next_blkoff;
-}
-
static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno)
{
f2fs_bug_on(sbi, segno > TOTAL_SEGS(sbi) - 1);