summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-04 10:49:43 +0200
committerKevin Wolf <kwolf@redhat.com>2016-10-07 13:34:07 +0200
commit818bbc86c9f9c47f67d11c0a068116c4333fd0ba (patch)
tree6a03a0be1ed95378de3118a8590e206352e7977b /block
parente902754e3d0890945ddcc1b33748ed73762ddb8d (diff)
downloadqemu-818bbc86c9f9c47f67d11c0a068116c4333fd0ba.zip
block: use bdrv_add_before_write_notifier
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>
Diffstat (limited to 'block')
-rw-r--r--block/write-threshold.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/write-threshold.c b/block/write-threshold.c
index cc2ca71835..0bd1a01c86 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,