Skip to content

Commit 2af583a

Browse files
liuderongJaegeuk Kim
authored andcommitted
f2fs: remove unused parameters
Remove unused parameter segno from f2fs_usable_segs_in_sec. Signed-off-by: liuderong <liuderong@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 65a6ce4 commit 2af583a

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

fs/f2fs/f2fs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3780,8 +3780,7 @@ void f2fs_destroy_segment_manager_caches(void);
37803780
int f2fs_rw_hint_to_seg_type(struct f2fs_sb_info *sbi, enum rw_hint hint);
37813781
enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi,
37823782
enum page_type type, enum temp_type temp);
3783-
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
3784-
unsigned int segno);
3783+
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi);
37853784
unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
37863785
unsigned int segno);
37873786

fs/f2fs/gc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno)
368368
unsigned char age = 0;
369369
unsigned char u;
370370
unsigned int i;
371-
unsigned int usable_segs_per_sec = f2fs_usable_segs_in_sec(sbi, segno);
371+
unsigned int usable_segs_per_sec = f2fs_usable_segs_in_sec(sbi);
372372

373373
for (i = 0; i < usable_segs_per_sec; i++)
374374
mtime += get_seg_entry(sbi, start + i)->mtime;
@@ -1745,7 +1745,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
17451745
*/
17461746
if (f2fs_sb_has_blkzoned(sbi))
17471747
sec_end_segno -= SEGS_PER_SEC(sbi) -
1748-
f2fs_usable_segs_in_sec(sbi, segno);
1748+
f2fs_usable_segs_in_sec(sbi);
17491749

17501750
if (gc_type == BG_GC || one_time) {
17511751
unsigned int window_granularity =
@@ -1938,7 +1938,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control)
19381938

19391939
total_freed += seg_freed;
19401940

1941-
if (seg_freed == f2fs_usable_segs_in_sec(sbi, segno)) {
1941+
if (seg_freed == f2fs_usable_segs_in_sec(sbi)) {
19421942
sec_freed++;
19431943
total_sec_freed++;
19441944
}

fs/f2fs/segment.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5422,8 +5422,7 @@ unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
54225422
return BLKS_PER_SEG(sbi);
54235423
}
54245424

5425-
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
5426-
unsigned int segno)
5425+
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi)
54275426
{
54285427
if (f2fs_sb_has_blkzoned(sbi))
54295428
return CAP_SEGS_PER_SEC(sbi);

fs/f2fs/segment.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno)
431431
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
432432
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
433433
unsigned int next;
434-
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi, segno);
434+
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
435435

436436
spin_lock(&free_i->segmap_lock);
437437
clear_bit(segno, free_i->free_segmap);
@@ -465,7 +465,7 @@ static inline void __set_test_and_free(struct f2fs_sb_info *sbi,
465465
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
466466
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
467467
unsigned int next;
468-
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi, segno);
468+
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
469469

470470
spin_lock(&free_i->segmap_lock);
471471
if (test_and_clear_bit(segno, free_i->free_segmap)) {

0 commit comments

Comments
 (0)