ubd: open the backing files in ubd_add
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Feb 2024 07:24:17 +0000 (08:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Feb 2024 21:21:15 +0000 (14:21 -0700)
commitfb5d1d389c9e78d68f1f71f926d6251017579f5b
tree9a47957fc30b8b74942309a8261f14d52b0076ae
parentf3c17dcc43e207e4fba511e9e63d52f7098ad6f3
ubd: open the backing files in ubd_add

Opening the backing device only when the block device is opened is
a bit weird as no one configures block devices to not use them.
Opend them at add time, close them at remove time and remove the
now superflous opened counter as remove can simply check for
disk_openers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Richard Weinberger <richard@nod.at>
Link: https://lore.kernel.org/r/20240222072417.3773131-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/um/drivers/ubd_kern.c