dm snapshot: use true/false for bool variable
Fixes coccicheck warning: drivers/md/dm-snap.c:1064:3-18: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-snap.c:1152:1-16: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-snap.c:1317:1-16: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
67b92d979b
commit
1d1dda8ca8
@ -1061,7 +1061,7 @@ static void snapshot_merge_next_chunks(struct dm_snapshot *s)
|
|||||||
DMERR("Read error in exception store: "
|
DMERR("Read error in exception store: "
|
||||||
"shutting down merge");
|
"shutting down merge");
|
||||||
down_write(&s->lock);
|
down_write(&s->lock);
|
||||||
s->merge_failed = 1;
|
s->merge_failed = true;
|
||||||
up_write(&s->lock);
|
up_write(&s->lock);
|
||||||
}
|
}
|
||||||
goto shut;
|
goto shut;
|
||||||
@ -1149,7 +1149,7 @@ static void merge_callback(int read_err, unsigned long write_err, void *context)
|
|||||||
|
|
||||||
shut:
|
shut:
|
||||||
down_write(&s->lock);
|
down_write(&s->lock);
|
||||||
s->merge_failed = 1;
|
s->merge_failed = true;
|
||||||
b = __release_queued_bios_after_merge(s);
|
b = __release_queued_bios_after_merge(s);
|
||||||
up_write(&s->lock);
|
up_write(&s->lock);
|
||||||
error_bios(b);
|
error_bios(b);
|
||||||
@ -1314,7 +1314,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
|||||||
INIT_LIST_HEAD(&s->list);
|
INIT_LIST_HEAD(&s->list);
|
||||||
spin_lock_init(&s->pe_lock);
|
spin_lock_init(&s->pe_lock);
|
||||||
s->state_bits = 0;
|
s->state_bits = 0;
|
||||||
s->merge_failed = 0;
|
s->merge_failed = false;
|
||||||
s->first_merging_chunk = 0;
|
s->first_merging_chunk = 0;
|
||||||
s->num_merging_chunks = 0;
|
s->num_merging_chunks = 0;
|
||||||
bio_list_init(&s->bios_queued_during_merge);
|
bio_list_init(&s->bios_queued_during_merge);
|
||||||
|
Loading…
Reference in New Issue
Block a user