mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
f2fs: clean up the unused variable additional_reserved_segments
additional_reserved_segments was introduced by commit300a842937
("f2fs: fix to reserve space for IO align feature"), and its initialization was deleted by commit87161a2b0a
("f2fs: deprecate io_bits"). Signed-off-by: LongPing Wei <weilongping@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
cffaa0976f
commit
1df2bc3c82
3 changed files with 2 additions and 6 deletions
|
@ -1064,7 +1064,6 @@ struct f2fs_sm_info {
|
||||||
unsigned int segment_count; /* total # of segments */
|
unsigned int segment_count; /* total # of segments */
|
||||||
unsigned int main_segments; /* # of segments in main area */
|
unsigned int main_segments; /* # of segments in main area */
|
||||||
unsigned int reserved_segments; /* # of reserved segments */
|
unsigned int reserved_segments; /* # of reserved segments */
|
||||||
unsigned int additional_reserved_segments;/* reserved segs for IO align feature */
|
|
||||||
unsigned int ovp_segments; /* # of overprovision segments */
|
unsigned int ovp_segments; /* # of overprovision segments */
|
||||||
|
|
||||||
/* a threshold to reclaim prefree segments */
|
/* a threshold to reclaim prefree segments */
|
||||||
|
|
|
@ -522,8 +522,7 @@ static inline unsigned int free_segments(struct f2fs_sb_info *sbi)
|
||||||
|
|
||||||
static inline unsigned 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;
|
||||||
SM_I(sbi)->additional_reserved_segments;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int free_sections(struct f2fs_sb_info *sbi)
|
static inline unsigned int free_sections(struct f2fs_sb_info *sbi)
|
||||||
|
|
|
@ -501,9 +501,7 @@ out:
|
||||||
if (a->struct_type == RESERVED_BLOCKS) {
|
if (a->struct_type == RESERVED_BLOCKS) {
|
||||||
spin_lock(&sbi->stat_lock);
|
spin_lock(&sbi->stat_lock);
|
||||||
if (t > (unsigned long)(sbi->user_block_count -
|
if (t > (unsigned long)(sbi->user_block_count -
|
||||||
F2FS_OPTION(sbi).root_reserved_blocks -
|
F2FS_OPTION(sbi).root_reserved_blocks)) {
|
||||||
SEGS_TO_BLKS(sbi,
|
|
||||||
SM_I(sbi)->additional_reserved_segments))) {
|
|
||||||
spin_unlock(&sbi->stat_lock);
|
spin_unlock(&sbi->stat_lock);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue