shutdown: close DM block device before issuing DM_DEV_REMOVE ioctl
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 22 Nov 2024 20:47:40 +0000 (05:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 23 Nov 2024 08:31:36 +0000 (17:31 +0900)
commitb76730f3fe0e824db001b38c8ea848302be786ee
treef0d5ed96fc694492421485cc3e953141f7fcab6d
parent3dda236c5c5ec1f4a1c9c15f085d2df9bf63f13a
shutdown: close DM block device before issuing DM_DEV_REMOVE ioctl

Otherwise, the ioctl() may fail with EBUSY.

Follow-up for b4b66b26620bfaf5818c95d5cffafd85207694e7.
Hopefully fixes #35243.
src/shutdown/detach-dm.c