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) <yi.zhang@huawei.com>
Suggested-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200924073337.861472-4-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
zhangyi (F)
2020-09-24 15:33:33 +08:00
committed by Theodore Ts'o
parent fa491b14cd
commit 2d069c0889
9 changed files with 36 additions and 54 deletions

View File

@@ -1245,7 +1245,7 @@ static struct buffer_head *ext4_get_bitmap(struct super_block *sb, __u64 block)
if (unlikely(!bh))
return NULL;
if (!bh_uptodate_or_lock(bh)) {
if (bh_submit_read(bh) < 0) {
if (ext4_read_bh(bh, 0, NULL) < 0) {
brelse(bh);
return NULL;
}