]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING
authorMike Snitzer <snitzer@redhat.com>
Tue, 2 Aug 2016 17:07:20 +0000 (13:07 -0400)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:09 +0000 (17:22 -0500)
commitafdd8029cdfb6ff32a118dab4edb7d584ea623ee
tree523fee77397635bd673b2dd1a122886aaabcf1ef
parentcf96a6c88c48687a85c81fbbb37e68db678cae81
dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING

Orabug: 25308142

[ Upstream commit eaf9a7361f47727b166688a9f2096854eef60fbe ]

Otherwise, there is potential for both DMF_SUSPENDED* and
DMF_NOFLUSH_SUSPENDING to not be set during dm_suspend() -- which is
definitely _not_ a valid state.

This fix, in conjuction with "dm rq: fix the starting and stopping of
blk-mq queues", addresses the potential for request-based DM multipath's
__multipath_map() to see !dm_noflush_suspending() during suspend.

Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
(cherry picked from commit 834ced1a13bdf510eae34d08bae1f1ae49b33141)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/md/dm.c