erofs: kill __submit_bio()
As Christoph pointed out [1], "
Why is there __submit_bio which really just obsfucates
what is going on? Also why is __submit_bio using
bio_set_op_attrs instead of opencode it as the comment
right next to it asks you to? "
Let's use submit_bio directly instead.
[1] https://lore.kernel.org/r/20190830162812.GA10694@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190904020912.63925-18-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 21ade32..3010fa3 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1258,7 +1258,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,
if (bio && force_submit) {
submit_bio_retry:
- __submit_bio(bio, REQ_OP_READ, 0);
+ submit_bio(bio);
bio = NULL;
}
@@ -1270,6 +1270,8 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,
bio->bi_iter.bi_sector = (sector_t)(first_index + i) <<
LOG_SECTORS_PER_BLOCK;
bio->bi_private = bi_private;
+ bio->bi_opf = REQ_OP_READ;
+
++nr_bios;
}
@@ -1290,7 +1292,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,
} while (owned_head != Z_EROFS_PCLUSTER_TAIL);
if (bio)
- __submit_bio(bio, REQ_OP_READ, 0);
+ submit_bio(bio);
if (postsubmit_is_all_bypassed(q, nr_bios, force_fg))
return true;