]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dm cache: move wake_waker() from free_migrations() to where it is needed
authorJoe Thornber <ejt@redhat.com>
Thu, 30 Jul 2015 08:29:40 +0000 (09:29 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 12 Aug 2015 15:32:20 +0000 (11:32 -0400)
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>
drivers/md/dm-cache-target.c

index 1fe93cfea7d309a659d79fe2b953b5f2dbe7b466..8cef66b332431f4cb7340b6e1bff48936dfa7be6 100644 (file)
@@ -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)