diff options
author | Gao Xiang <gaoxiang25@huawei.com> | 2019-09-04 05:09:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-05 21:10:08 +0300 |
commit | 94e4e153b1c25a49b4953c424e6e2f66efb449f3 (patch) | |
tree | 1904226e84247a6742391a0a47702cc8cfc3d264 /fs/erofs/zdata.c | |
parent | e655b5b3a29c5a16056f13854ac3db5b39c0b804 (diff) | |
download | linux-94e4e153b1c25a49b4953c424e6e2f66efb449f3.tar.xz |
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>
Diffstat (limited to 'fs/erofs/zdata.c')
-rw-r--r-- | fs/erofs/zdata.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 21ade322cc81..3010fa3d1ac3 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1258,7 +1258,7 @@ repeat: if (bio && force_submit) { submit_bio_retry: - __submit_bio(bio, REQ_OP_READ, 0); + submit_bio(bio); bio = NULL; } @@ -1270,6 +1270,8 @@ submit_bio_retry: 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 @@ skippage: } 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; |