summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-01-31 23:30:37 +0400
committerMike Snitzer <snitzer@redhat.com>2014-02-17 20:00:05 +0400
commit80ae49aaed32af72630251eb06161b15cde15ac8 (patch)
tree02d587182910cb2b259803535ff772a7545f519a /drivers/md/dm-thin-metadata.c
parentc6eda5e81c4fcc77185117255c7419eda771f67f (diff)
downloadlinux-80ae49aaed32af72630251eb06161b15cde15ac8.tar.xz
dm cache: do not add migration to completed list before unhooking bio
When completing an overwrite bio, in overwrite_endio(), the associated migration should not be added to the 'completed_migrations' until the bio's fields are restored with dm_unhook_bio(). Otherwise, do_worker() can race to process 'completed_migrations' before dm_unhook_bio() -- so the bio's bi_end_io is incorrect. This is unlikely to cause any problems given the current code but should be fixed on the basis of correctness. Also, the cache's spinlock only needs to be held when manipulating the 'completed_migrations' list -- other changes don't need protection. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
0 files changed, 0 insertions, 0 deletions