summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-07-30 08:29:40 (GMT)
committerMike Snitzer <snitzer@redhat.com>2015-08-12 15:32:20 (GMT)
commite44b6a5a3c711c1ada4cf7135bf9dbf860caffd2 (patch)
treedcd60dc8ed4d022ea3fc7b1829010d4203098c41 /drivers/md
parent8c747fd0c3f514233afaca98139c03cca2cf2d2f (diff)
downloadlinux-e44b6a5a3c711c1ada4cf7135bf9dbf860caffd2.tar.xz
dm cache: move wake_waker() from free_migrations() to where it is needed
This stops spurious wake ups from calls to prealloc_free_structs(). Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-cache-target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1fe93cf..8cef66b 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -424,7 +424,6 @@ static void free_migration(struct dm_cache_migration *mg)
wake_up(&cache->migration_wait);
mempool_free(mg, cache->migration_pool);
- wake_worker(cache);
}
static int prealloc_data_structs(struct cache *cache, struct prealloc *p)
@@ -1125,6 +1124,7 @@ static void free_io_migration(struct dm_cache_migration *mg)
{
dec_io_migrations(mg->cache);
free_migration(mg);
+ wake_worker(mg->cache);
}
static void migration_failure(struct dm_cache_migration *mg)
@@ -1361,6 +1361,7 @@ static void issue_discard(struct dm_cache_migration *mg)
bio_endio(bio, 0);
cell_defer(mg->cache, mg->new_ocell, false);
free_migration(mg);
+ wake_worker(mg->cache);
}
static void issue_copy_or_discard(struct dm_cache_migration *mg)