* [f2fs-dev] [PATCH] f2fs: change return value of reserved_segments to unsigned int
@ 2020-09-16 8:00 Xiaojun Wang
2020-09-17 8:22 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Xiaojun Wang @ 2020-09-16 8:00 UTC (permalink / raw)
To: yuchao0, jaegeuk, linux-f2fs-devel
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>
---
fs/f2fs/segment.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 752b177073b2..f28836a9903e 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -500,7 +500,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;
}
@@ -532,7 +532,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)
--
2.25.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: change return value of reserved_segments to unsigned int
2020-09-16 8:00 [f2fs-dev] [PATCH] f2fs: change return value of reserved_segments to unsigned int Xiaojun Wang
@ 2020-09-17 8:22 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2020-09-17 8:22 UTC (permalink / raw)
To: Xiaojun Wang, jaegeuk, linux-f2fs-devel
On 2020/9/16 16:00, Xiaojun Wang wrote:
> 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>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-17 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 8:00 [f2fs-dev] [PATCH] f2fs: change return value of reserved_segments to unsigned int Xiaojun Wang
2020-09-17 8:22 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.