zram: make zram_bio_discard more self-contained
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Apr 2023 17:14:45 +0000 (19:14 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:29:57 +0000 (16:29 -0700)
commit0120dd6e4e202e19a0e011e486fb2da40a5ea279
tree4792263bbe2ffbbd15e4c94bff8df74d8b51f1b9
parent9fe95babc7420722d39a1ded379027a1e1825d3a
zram: make zram_bio_discard more self-contained

Derive the index and offset variables inside the function, and complete
the bio directly in preparation for cleaning up the I/O path.

Link: https://lkml.kernel.org/r/20230411171459.567614-4-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c