OSDN Git Service

dm thin metadata: fix a race when entering fail mode
authorJoe Thornber <ejt@redhat.com>
Thu, 11 Jun 2015 16:11:48 +0000 (17:11 +0100)
committerMike Snitzer <snitzer@redhat.com>
Thu, 11 Jun 2015 21:13:06 +0000 (17:13 -0400)
commitb1f11aff04cc86daa0757ada5deb669a92a8f0fb
tree53fe7654800e4e179b29fa98157fa3afa591e804
parentfd467696e8beb542144cd005ff96cd35fff41354
dm thin metadata: fix a race when entering fail mode

In dm_thin_find_block() the ->fail_io flag was checked outside the
metadata device's root_lock, causing dm_thin_find_block() to race with
the setting of this flag.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin-metadata.c