aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2024-04-16 00:56:33 +0000
committerMike Snitzer <[email protected]>2024-04-16 15:32:07 +0000
commit48ef0ba12e6b77a1ce5d09c580c38855b090ae7c (patch)
treeecfdef82e52f49202ae28fd6e34d980faa2acd84 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
parentdm vdo murmurhash: remove unneeded semicolon (diff)
downloadkernel-48ef0ba12e6b77a1ce5d09c580c38855b090ae7c.tar.gz
kernel-48ef0ba12e6b77a1ce5d09c580c38855b090ae7c.zip
dm: restore synchronous close of device mapper block device
'dmsetup remove' and 'dmsetup remove_all' require synchronous bdev release. Otherwise dm_lock_for_deletion() may return -EBUSY if the open count is > 0, because the open count is dropped in dm_blk_close() which occurs after fput() completes. So if dm_blk_close() is delayed because of asynchronous fput(), this device mapper device is skipped during remove, which is a regression. Fix the issue by using __fput_sync(). Also, DM device removal has long supported being made asynchronous by setting the DMF_DEFERRED_REMOVE flag on the DM device. So leverage using async fput() in close_table_device() if DMF_DEFERRED_REMOVE flag is set. Reported-by: Zhong Changhui <[email protected]> Fixes: a28d893eb327 ("md: port block device access to file") Suggested-by: Christian Brauner <[email protected]> Signed-off-by: Ming Lei <[email protected]> [snitzer: editted commit header, use fput() if DMF_DEFERRED_REMOVE set] Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions