Received: from eggs.gnu.org ([2001:4830:134:3::10]:36472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsVQd-0007QR-MC for qemu-devel@nongnu.org; Fri, 07 Oct 2016 09:43:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsVQc-0004H9-MI for qemu-devel@nongnu.org; Fri, 07 Oct 2016 09:43:11 -0400 From: Kevin Wolf Date: Fri, 7 Oct 2016 15:42:50 +0200 Message-Id: <1475847779-7336-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1475847779-7336-1-git-send-email-kwolf@redhat.com> References: <1475847779-7336-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 01/10] block: use bdrv_add_before_write_notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Paolo Bonzini Register the notifier using the specific API for block devices. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- 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