From: Paolo Bonzini <pbonz...@redhat.com> Register the notifier using the specific API for block devices.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> --- block/write-threshold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/write-threshold.c b/block/write-threshold.c index cc2ca71..0bd1a01 100644 --- a/block/write-threshold.c +++ b/block/write-threshold.c @@ -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, -- 1.8.3.1