summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
authorXiaojun Wang <wangxiaojun11@huawei.com>2020-09-16 16:00:46 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-09-29 01:48:33 -0700
commit4470eb28731102e465d562f38d07fdf0796a58b0 (patch)
treeecc53282f41c58f5380d3ea1313a9b567427e938 /fs/f2fs/segment.h
parentc8eb702484ed5badb2b654f2c9d086e43a00b954 (diff)
f2fs: change return value of reserved_segments to unsigned int
The type of SM_I(sbi)->reserved_segments is unsigned int, so change the return value to unsigned int. The type cast can be removed in reserved_sections as a result. Signed-off-by: Xiaojun Wang <wangxiaojun11@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 47b888ad913b..f5b1883eda7a 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -524,7 +524,7 @@ static inline unsigned int free_segments(struct f2fs_sb_info *sbi)
return FREE_I(sbi)->free_segments;
}
-static inline int reserved_segments(struct f2fs_sb_info *sbi)
+static inline unsigned int reserved_segments(struct f2fs_sb_info *sbi)
{
return SM_I(sbi)->reserved_segments;
}
@@ -556,7 +556,7 @@ static inline int overprovision_segments(struct f2fs_sb_info *sbi)
static inline int reserved_sections(struct f2fs_sb_info *sbi)
{
- return GET_SEC_FROM_SEG(sbi, (unsigned int)reserved_segments(sbi));
+ return GET_SEC_FROM_SEG(sbi, reserved_segments(sbi));
}
static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi)