Skip to content

Commit

Permalink
f2fs-tools: cleanup is_sit_bitmap_set
Browse files Browse the repository at this point in the history
Remove redundant function definition of is_sit_bitmap_set() and
export it.

Signed-off-by: Sheng Yong <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Sheng Yong authored and Jaegeuk Kim committed Jul 25, 2024
1 parent b8a7013 commit 8916de7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fsck/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ static int dump_filesystem(struct f2fs_sb_info *sbi, struct node_info *ni,
return 0;
}

static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
{
struct seg_entry *se;
u32 offset;
Expand Down
12 changes: 0 additions & 12 deletions fsck/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,6 @@ int fsck_chk_node_blk(struct f2fs_sb_info *sbi, struct f2fs_inode *inode,
return -EINVAL;
}

static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr)
{
struct seg_entry *se;
u32 offset;

se = get_seg_entry(sbi, GET_SEGNO(sbi, blk_addr));
offset = OFFSET_IN_SEG(sbi, blk_addr);

return f2fs_test_bit(offset,
(const char *)se->cur_valid_map) != 0;
}

int fsck_chk_root_inode(struct f2fs_sb_info *sbi)
{
struct f2fs_node *node_blk;
Expand Down
2 changes: 1 addition & 1 deletion fsck/fsck.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ extern int dump_node(struct f2fs_sb_info *, nid_t, int, char *, int, int, char *
extern int dump_info_from_blkaddr(struct f2fs_sb_info *, u32);
extern unsigned int start_bidx_of_node(unsigned int, struct f2fs_node *);
extern void dump_node_scan_disk(struct f2fs_sb_info *sbi, nid_t nid);

extern bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr);

/* defrag.c */
int f2fs_defragment(struct f2fs_sb_info *, u64, u64, u64, int);
Expand Down

0 comments on commit 8916de7

Please sign in to comment.