]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dm cache: fix writethrough mode quiescing in cache_map
authorMike Snitzer <snitzer@redhat.com>
Thu, 1 May 2014 20:14:24 +0000 (16:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:12 +0000 (10:28 -0700)
commit 131cd131a9ff63d4b84f3fe15073a2984ac30066 upstream.

Commit 2ee57d58735 ("dm cache: add passthrough mode") inadvertently
removed the deferred set reference that was taken in cache_map()'s
writethrough mode support.  Restore taking this reference.

This issue was found with code inspection.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-target.c

index b82b58f0bb8544ec587374229fda90f903725f46..9306e0bcb5647b047b9b5bddd50dde28baa7238f 100644 (file)
@@ -2506,6 +2506,7 @@ static int cache_map(struct dm_target *ti, struct bio *bio)
 
                } else {
                        inc_hit_counter(cache, bio);
+                       pb->all_io_entry = dm_deferred_entry_inc(cache->all_io_ds);
 
                        if (bio_data_dir(bio) == WRITE && writethrough_mode(&cache->features) &&
                            !is_dirty(cache, lookup_result.cblock))