Skip to content

Commit

Permalink
dm cache: use cell_defer() boolean argument consistently
Browse files Browse the repository at this point in the history
Fix a few cell_defer() calls that weren't passing a bool.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Heinz Mauelshagen authored and Mike Snitzer committed Nov 9, 2013
1 parent 4cb3e1d commit 80f659f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/md/dm-cache-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,13 @@ static void migration_failure(struct dm_cache_migration *mg)
DMWARN_LIMIT("demotion failed; couldn't copy block");
policy_force_mapping(cache->policy, mg->new_oblock, mg->old_oblock);

cell_defer(cache, mg->old_ocell, mg->promote ? 0 : 1);
cell_defer(cache, mg->old_ocell, mg->promote ? false : true);
if (mg->promote)
cell_defer(cache, mg->new_ocell, 1);
cell_defer(cache, mg->new_ocell, true);
} else {
DMWARN_LIMIT("promotion failed; couldn't copy block");
policy_remove_mapping(cache->policy, mg->new_oblock);
cell_defer(cache, mg->new_ocell, 1);
cell_defer(cache, mg->new_ocell, true);
}

cleanup_migration(mg);
Expand Down Expand Up @@ -828,7 +828,7 @@ static void migration_success_post_commit(struct dm_cache_migration *mg)
return;

} else if (mg->demote) {
cell_defer(cache, mg->old_ocell, mg->promote ? 0 : 1);
cell_defer(cache, mg->old_ocell, mg->promote ? false : true);

if (mg->promote) {
mg->demote = false;
Expand Down

0 comments on commit 80f659f

Please sign in to comment.