OSDN Git Service

swim: add helper for disk cleanup
authorLuis Chamberlain <mcgrof@kernel.org>
Mon, 27 Sep 2021 22:02:56 +0000 (15:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:37 +0000 (14:41 -0600)
commit4e9abe72530a2baf5f80d60e8d0bcdb84964d2e4
tree78173b2e5545d67aced29974c63aee9faf4f273e
parentb76a30c254d987b4ae7d47415081121d4c0a7423
swim: add helper for disk cleanup

Disk cleanup can be shared between exit and bringup. Use a
helper to do the work required. The only functional change at
this point is we're being overly paraoid on exit to check for
a null disk as well now, and this should be safe.

We'll later expand on this, this change just makes subsequent
changes easier to read.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210927220302.1073499-9-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/swim.c