Commit ff919946 authored by Mike Snitzer's avatar Mike Snitzer

dm vdo: fix sparse 'warning: Using plain integer as NULL pointer'

Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarSusan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent 3fa8e6ec
......@@ -732,18 +732,18 @@ static void close_chapters(void *arg)
static void stop_chapter_writer(struct chapter_writer *writer)
{
struct thread *writer_thread = 0;
struct thread *writer_thread = NULL;
uds_lock_mutex(&writer->mutex);
if (writer->thread != 0) {
if (writer->thread != NULL) {
writer_thread = writer->thread;
writer->thread = 0;
writer->thread = NULL;
writer->stop = true;
uds_broadcast_cond(&writer->cond);
}
uds_unlock_mutex(&writer->mutex);
if (writer_thread != 0)
if (writer_thread != NULL)
uds_join_threads(writer_thread);
}
......
......@@ -889,7 +889,8 @@ int vdo_synchronous_flush(struct vdo *vdo)
int result;
struct bio bio;
bio_init(&bio, vdo_get_backing_device(vdo), 0, 0, REQ_OP_WRITE | REQ_PREFLUSH);
bio_init(&bio, vdo_get_backing_device(vdo), NULL, 0,
REQ_OP_WRITE | REQ_PREFLUSH);
submit_bio_wait(&bio);
result = blk_status_to_errno(bio.bi_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment