block: cleanup the VM accounting in submit_bio
authorChristoph Hellwig <hch@lst.de>
Mon, 16 May 2022 06:36:54 +0000 (08:36 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 May 2022 17:37:50 +0000 (11:37 -0600)
commita3e7689bfaae031177ebbb257d5a704b47236044
tree00ec0c499da452e088fd9350295cbce4f4c6dd42
parent5d2ae14276e698c76fa0c8ce870103f343b38263
block: cleanup the VM accounting in submit_bio

submit_bio uses some extremely convoluted checks and confusing comments
to only account REQ_OP_READ/REQ_OP_WRITE comments.  Just switch to the
plain obvious checks instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220516063654.2782792-1-hch@lst.de
[axboe: fixup WRITE -> REQ_OP_WRITE]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c