Commit 4470eb28 authored by Xiaojun Wang's avatar Xiaojun Wang Committed by Jaegeuk Kim

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: default avatarXiaojun Wang <wangxiaojun11@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent c8eb7024
...@@ -524,7 +524,7 @@ static inline unsigned int free_segments(struct f2fs_sb_info *sbi) ...@@ -524,7 +524,7 @@ static inline unsigned int free_segments(struct f2fs_sb_info *sbi)
return FREE_I(sbi)->free_segments; 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; return SM_I(sbi)->reserved_segments;
} }
...@@ -556,7 +556,7 @@ static inline int overprovision_segments(struct f2fs_sb_info *sbi) ...@@ -556,7 +556,7 @@ static inline int overprovision_segments(struct f2fs_sb_info *sbi)
static inline int reserved_sections(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) static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment