]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
f2fs: remove unused parameters
authorliuderong <liuderong@oppo.com>
Wed, 11 Sep 2024 02:40:20 +0000 (10:40 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Sep 2024 14:42:03 +0000 (14:42 +0000)
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>
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/segment.h

index 9a226d36a36c88f74383a1ff15161e24c991922f..33f5449dc22d50d77b87e87798f659cee39611fd 100644 (file)
@@ -3780,8 +3780,7 @@ void f2fs_destroy_segment_manager_caches(void);
 int f2fs_rw_hint_to_seg_type(struct f2fs_sb_info *sbi, enum rw_hint hint);
 enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi,
                        enum page_type type, enum temp_type temp);
-unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
-                       unsigned int segno);
+unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi);
 unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
                        unsigned int segno);
 
index d3e3104c4492b9fb26df3cac46cfaea3a12f0794..2903c4c4a76cd0d7ca79002d817845b6e993eab3 100644 (file)
@@ -368,7 +368,7 @@ static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno)
        unsigned char age = 0;
        unsigned char u;
        unsigned int i;
-       unsigned int usable_segs_per_sec = f2fs_usable_segs_in_sec(sbi, segno);
+       unsigned int usable_segs_per_sec = f2fs_usable_segs_in_sec(sbi);
 
        for (i = 0; i < usable_segs_per_sec; i++)
                mtime += get_seg_entry(sbi, start + i)->mtime;
@@ -1745,7 +1745,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
                 */
                if (f2fs_sb_has_blkzoned(sbi))
                        sec_end_segno -= SEGS_PER_SEC(sbi) -
-                                       f2fs_usable_segs_in_sec(sbi, segno);
+                                       f2fs_usable_segs_in_sec(sbi);
 
                if (gc_type == BG_GC || one_time) {
                        unsigned int window_granularity =
@@ -1938,7 +1938,7 @@ retry:
 
        total_freed += seg_freed;
 
-       if (seg_freed == f2fs_usable_segs_in_sec(sbi, segno)) {
+       if (seg_freed == f2fs_usable_segs_in_sec(sbi)) {
                sec_freed++;
                total_sec_freed++;
        }
index b7c1ca51ea32455fa0ec9e5b43c30cef9c7ccd38..1766254279d24c8fe498cb150f63120dcb847aea 100644 (file)
@@ -5422,8 +5422,7 @@ unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
        return BLKS_PER_SEG(sbi);
 }
 
-unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
-                                       unsigned int segno)
+unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi)
 {
        if (f2fs_sb_has_blkzoned(sbi))
                return CAP_SEGS_PER_SEC(sbi);
index 43db2d3e8c859464f5d1d1a35ba7140339c8b108..71adb4a43bec53eda625d87f8be539abf07b0031 100644 (file)
@@ -431,7 +431,7 @@ static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno)
        unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
        unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
        unsigned int next;
-       unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi, segno);
+       unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
 
        spin_lock(&free_i->segmap_lock);
        clear_bit(segno, free_i->free_segmap);
@@ -465,7 +465,7 @@ static inline void __set_test_and_free(struct f2fs_sb_info *sbi,
        unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
        unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
        unsigned int next;
-       unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi, segno);
+       unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
 
        spin_lock(&free_i->segmap_lock);
        if (test_and_clear_bit(segno, free_i->free_segmap)) {