OSDN Git Service

block: cleanup the memory stall accounting in submit_bio
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Apr 2020 11:27:54 +0000 (13:27 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 Apr 2020 15:33:26 +0000 (09:33 -0600)
commit760f83ea63a7b2c12b3b1e656b24cbb880b6b814
treed66373dc8dac91571a6ff854e4b6eedc7faeb69f
parent3fdd40861d800a4e1eb67c5158e8ab90076e2f93
block: cleanup the memory stall accounting in submit_bio

Instead of a convoluted chain just check for REQ_OP_READ directly,
and keep all the memory stall code together in a single unlikely
branch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c