]> git.karo-electronics.de Git - linux-beck.git/commit
dm: return correct error code in dm_resume()'s retry loop
authorMinfei Huang <mnghuan@gmail.com>
Tue, 6 Sep 2016 08:00:29 +0000 (16:00 +0800)
committerMike Snitzer <snitzer@redhat.com>
Wed, 14 Sep 2016 17:56:38 +0000 (13:56 -0400)
commit8dc23658b7aaa8b6b0609c81c8ad75e98b612801
treefa802482524c9470f181cbc1d63e6a4c4bc28daf
parent2849450ad39d2e699fda2d5c6f41e05d87fd7004
dm: return correct error code in dm_resume()'s retry loop

dm_resume() will return success (0) rather than -EINVAL if
!dm_suspended_md() upon retry within dm_resume().

Reset the error code at the start of dm_resume()'s retry loop.
Also, remove a useless assignment at the end of dm_resume().

Fixes: ffcc393641 ("dm: enhance internal suspend and resume interface")
Cc: stable@vger.kernel.org # 3.19+
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c