zbd: simplify zbd_close_zone()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 14 Dec 2021 01:24:08 +0000 (10:24 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 Dec 2021 13:48:14 +0000 (06:48 -0700)
commita23411bb2e1c7de1e97c505ca2ec7270a35f7be1
treea8697f4ce286715201a12a7929e7302d6c9c0bab
parent139d8dc666e5e4a05eaa9f5e603fc3453c5fe43f
zbd: simplify zbd_close_zone()

Change the interface of zbd_close_zone() to directly use a pointer to a
zone information structure as all callers already have this information.
Also do nothing for zones that are not marked as open instead of
figuring out this fact by searching the array of open zones.

No functional changes.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20211214012413.464798-8-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c