]> git.baikalelectronics.ru Git - kernel.git/commit
dm: fix handling of multiple internal suspends
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 8 Jan 2015 23:52:26 +0000 (18:52 -0500)
committerMike Snitzer <snitzer@redhat.com>
Sat, 24 Jan 2015 19:50:08 +0000 (14:50 -0500)
commit072be45f624ffc279de4c8c788b7c5907dd2b327
treed51619d0d63ab934cee6cda089531de56ed0e283
parent945f0ae86685c38d2305f10609afceaad078d348
dm: fix handling of multiple internal suspends

Commit b8492b05ce ("dm: enhance internal suspend and resume interface")
attempted to handle multiple internal suspends on the same device, but
it did that incorrectly.  When these functions are called in this order
on the same device the device is no longer suspended, but it should be:
dm_internal_suspend_noflush
dm_internal_suspend_noflush
dm_internal_resume

Fix this bug by maintaining an 'internal_suspend_count' and resuming
the device when this count drops to zero.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c