Chandra Seetharaman 8a57dfc6f9 dm: avoid destroying table in dm_any_congested
dm_any_congested() just checks for the DMF_BLOCK_IO and has no
code to make sure that suspend waits for dm_any_congested() to
complete.  This patch adds such a check.

Without it, a race can occur with dm_table_put() attempting to
destroying the table in the wrong thread, the one running
dm_any_congested() which is meant to be quick and return
immediately.

Two examples of problems:
1. Sleeping functions called from congested code, the caller
   of which holds a spin lock.
2. An ABBA deadlock between pdflush and multipathd. The two locks
   in contention are inode lock and kernel lock.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-11-13 23:39:14 +00:00
..
2006-01-01 22:21:50 +01:00
2007-10-20 02:01:11 +01:00
2005-04-16 15:20:36 -07:00
2008-10-21 17:45:03 +01:00
2008-10-21 17:44:59 +01:00
2008-10-21 17:44:59 +01:00
2008-10-21 17:44:59 +01:00
2008-10-21 17:44:59 +01:00
2008-11-13 23:39:06 +00:00
2008-11-13 23:38:56 +00:00
2007-10-20 02:01:07 +01:00
2007-10-20 02:01:26 +01:00
2008-10-21 17:44:59 +01:00
2008-10-21 17:44:57 +01:00
2008-02-06 10:41:18 -08:00
2005-09-17 11:49:58 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2008-11-06 17:28:20 +11:00
2005-04-16 15:20:36 -07:00