diff options
author | Zhiguo Niu <zhiguo.niu@unisoc.com> | 2024-03-01 16:25:54 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-03-04 09:52:51 -0800 |
commit | 28f66cc654039edff3e34200c3357d92a7c4d272 (patch) | |
tree | 8e39c00f834b8d05612cb3f317844433807de7fc /fs/f2fs/f2fs.h | |
parent | 36959d18c3cf09b3c12157c6950e18652067de77 (diff) | |
download | linux-28f66cc654039edff3e34200c3357d92a7c4d272.tar.gz linux-28f66cc654039edff3e34200c3357d92a7c4d272.tar.bz2 linux-28f66cc654039edff3e34200c3357d92a7c4d272.zip |
f2fs: fix to check return value __allocate_new_segment
__allocate_new_segment may return error when get_new_segment
fails, so its caller should check its return value.
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index db05fd02350a..433101223e7a 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3705,7 +3705,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type, unsigned int start, unsigned int end); int f2fs_allocate_new_section(struct f2fs_sb_info *sbi, int type, bool force); int f2fs_allocate_pinning_section(struct f2fs_sb_info *sbi); -void f2fs_allocate_new_segments(struct f2fs_sb_info *sbi); +int f2fs_allocate_new_segments(struct f2fs_sb_info *sbi); int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range); bool f2fs_exist_trim_candidates(struct f2fs_sb_info *sbi, struct cp_control *cpc); |