]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: use bdrv_add_before_write_notifier
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Oct 2016 08:49:43 +0000 (10:49 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 7 Oct 2016 11:34:07 +0000 (13:34 +0200)
Register the notifier using the specific API for block devices.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/write-threshold.c

index cc2ca71835e98de8badbc5ac5e18079f4187a1b8..0bd1a01c860289024079d06840093e5c3ee4e33c 100644 (file)
@@ -76,8 +76,7 @@ static int coroutine_fn before_write_notify(NotifierWithReturn *notifier,
 static void write_threshold_register_notifier(BlockDriverState *bs)
 {
     bs->write_threshold_notifier.notify = before_write_notify;
-    notifier_with_return_list_add(&bs->before_write_notifiers,
-                                  &bs->write_threshold_notifier);
+    bdrv_add_before_write_notifier(bs, &bs->write_threshold_notifier);
 }
 
 static void write_threshold_update(BlockDriverState *bs,