aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorzhangyi (F) <[email protected]>2020-09-24 07:33:33 +0000
committerTheodore Ts'o <[email protected]>2020-10-18 14:37:14 +0000
commit2d069c0889ef0decda7af6ecbdc63b680b767749 (patch)
tree11795ab514648fd4e5f814420e8ff4793215a6ba /fs/ext4/ialloc.c
parentext4: introduce new metadata buffer read helpers (diff)
downloadkernel-2d069c0889ef0decda7af6ecbdc63b680b767749.tar.gz
kernel-2d069c0889ef0decda7af6ecbdc63b680b767749.zip
ext4: use common helpers in all places reading metadata buffers
Revome all open codes that read metadata buffers, switch to use ext4_read_bh_*() common helpers. Signed-off-by: zhangyi (F) <[email protected]> Suggested-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 20cda952c621..33c0fc0197ce 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -188,12 +188,8 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
/*
* submit the buffer_head for reading
*/
- clear_buffer_verified(bh);
trace_ext4_load_inode_bitmap(sb, block_group);
- bh->b_end_io = ext4_end_bitmap_read;
- get_bh(bh);
- submit_bh(REQ_OP_READ, REQ_META | REQ_PRIO, bh);
- wait_on_buffer(bh);
+ ext4_read_bh(bh, REQ_META | REQ_PRIO, ext4_end_bitmap_read);
ext4_simulate_fail_bh(sb, bh, EXT4_SIM_IBITMAP_EIO);
if (!buffer_uptodate(bh)) {
put_bh(bh);