summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2010-08-12 04:13:55 +0100
committerAlasdair G Kergon <agk@redhat.com>2010-08-12 04:13:55 +0100
commit98f332855effef02aeb738e4d62e9a5b903c52fd (patch)
treeb10d7f632022415ddb047c2bacbaa1f861a76161 /drivers/md/dm.h
parentabdc568b0540bec6d3e0afebac496adef1189b77 (diff)
downloadlinux-98f332855effef02aeb738e4d62e9a5b903c52fd.tar.gz
linux-98f332855effef02aeb738e4d62e9a5b903c52fd.tar.bz2
linux-98f332855effef02aeb738e4d62e9a5b903c52fd.zip
dm ioctl: release _hash_lock between devices in remove_all
This patch changes dm_hash_remove_all() to release _hash_lock when removing a device. After removing the device, dm_hash_remove_all() takes _hash_lock and searches the hash from scratch again. This patch is a preparation for the next patch, which changes device deletion code to wait for md reference to be 0. Without this patch, the wait in the next patch may cause AB-BA deadlock: CPU0 CPU1 ----------------------------------------------------------------------- dm_hash_remove_all() down_write(_hash_lock) table_status() md = find_device() dm_get(md) <increment md->holders> dm_get_live_or_inactive_table() dm_get_inactive_table() down_write(_hash_lock) <in the md deletion code> <wait for md->holders to be 0> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.h')
0 files changed, 0 insertions, 0 deletions