]> 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)
commit4a608c17fd8e985cf4889825843a87758f66ce26
treed51619d0d63ab934cee6cda089531de56ed0e283
parentca75db01414168aab624cf5bb51c73dfad4c54cb
dm: fix handling of multiple internal suspends

Commit d475dff29a ("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