ext4: rename ext4_set_bits to mb_set_bits

ext4_set_bits() should actually be mb_set_bits() for uniform API naming
convention.
This is via below cmd -

grep -nr "ext4_set_bits" fs/ext4/ | cut -d ":" -f 1 | xargs sed -i 's/ext4_set_bits/mb_set_bits/g'

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/f1f6ece1405b76a7a987e9145d1adfaf71e30695.1644992610.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Ritesh Harjani 2022-02-16 12:32:47 +05:30 committed by Theodore Ts'o
parent dbaafbadc5
commit 123e3016ee
3 changed files with 10 additions and 10 deletions

View File

@ -1279,7 +1279,7 @@ struct ext4_inode_info {
#define ext4_find_next_zero_bit find_next_zero_bit_le #define ext4_find_next_zero_bit find_next_zero_bit_le
#define ext4_find_next_bit find_next_bit_le #define ext4_find_next_bit find_next_bit_le
extern void ext4_set_bits(void *bm, int cur, int len); extern void mb_set_bits(void *bm, int cur, int len);
/* /*
* Maximal mount counts between two filesystem checks * Maximal mount counts between two filesystem checks

View File

@ -1689,7 +1689,7 @@ static int mb_test_and_clear_bits(void *bm, int cur, int len)
return zero_bit; return zero_bit;
} }
void ext4_set_bits(void *bm, int cur, int len) void mb_set_bits(void *bm, int cur, int len)
{ {
__u32 *addr; __u32 *addr;
@ -1996,7 +1996,7 @@ static int mb_mark_used(struct ext4_buddy *e4b, struct ext4_free_extent *ex)
mb_set_largest_free_order(e4b->bd_sb, e4b->bd_info); mb_set_largest_free_order(e4b->bd_sb, e4b->bd_info);
mb_update_avg_fragment_size(e4b->bd_sb, e4b->bd_info); mb_update_avg_fragment_size(e4b->bd_sb, e4b->bd_info);
ext4_set_bits(e4b->bd_bitmap, ex->fe_start, len0); mb_set_bits(e4b->bd_bitmap, ex->fe_start, len0);
mb_check_buddy(e4b); mb_check_buddy(e4b);
return ret; return ret;
@ -3825,7 +3825,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
* We leak some of the blocks here. * We leak some of the blocks here.
*/ */
ext4_lock_group(sb, ac->ac_b_ex.fe_group); ext4_lock_group(sb, ac->ac_b_ex.fe_group);
ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
ac->ac_b_ex.fe_len); ac->ac_b_ex.fe_len);
ext4_unlock_group(sb, ac->ac_b_ex.fe_group); ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
@ -3844,7 +3844,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
} }
} }
#endif #endif
ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
ac->ac_b_ex.fe_len); ac->ac_b_ex.fe_len);
if (ext4_has_group_desc_csum(sb) && if (ext4_has_group_desc_csum(sb) &&
(gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) { (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) {
@ -3939,7 +3939,7 @@ void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block,
clen_changed = clen - already; clen_changed = clen - already;
if (state) if (state)
ext4_set_bits(bitmap_bh->b_data, blkoff, clen); mb_set_bits(bitmap_bh->b_data, blkoff, clen);
else else
mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen); mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen);
if (ext4_has_group_desc_csum(sb) && if (ext4_has_group_desc_csum(sb) &&
@ -4459,7 +4459,7 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
while (n) { while (n) {
entry = rb_entry(n, struct ext4_free_data, efd_node); entry = rb_entry(n, struct ext4_free_data, efd_node);
ext4_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count); mb_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
n = rb_next(n); n = rb_next(n);
} }
return; return;
@ -4500,7 +4500,7 @@ void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
if (unlikely(len == 0)) if (unlikely(len == 0))
continue; continue;
BUG_ON(groupnr != group); BUG_ON(groupnr != group);
ext4_set_bits(bitmap, start, len); mb_set_bits(bitmap, start, len);
preallocated += len; preallocated += len;
} }
mb_debug(sb, "preallocated %d for group %u\n", preallocated, group); mb_debug(sb, "preallocated %d for group %u\n", preallocated, group);

View File

@ -483,7 +483,7 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle,
} }
ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n", ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n",
first_cluster, first_cluster - start, count2); first_cluster, first_cluster - start, count2);
ext4_set_bits(bh->b_data, first_cluster - start, count2); mb_set_bits(bh->b_data, first_cluster - start, count2);
err = ext4_handle_dirty_metadata(handle, NULL, bh); err = ext4_handle_dirty_metadata(handle, NULL, bh);
brelse(bh); brelse(bh);
@ -632,7 +632,7 @@ handle_bb:
if (overhead != 0) { if (overhead != 0) {
ext4_debug("mark backup superblock %#04llx (+0)\n", ext4_debug("mark backup superblock %#04llx (+0)\n",
start); start);
ext4_set_bits(bh->b_data, 0, mb_set_bits(bh->b_data, 0,
EXT4_NUM_B2C(sbi, overhead)); EXT4_NUM_B2C(sbi, overhead));
} }
ext4_mark_bitmap_end(EXT4_B2C(sbi, group_data[i].blocks_count), ext4_mark_bitmap_end(EXT4_B2C(sbi, group_data[i].blocks_count),