Skip to content

Commit 818bbc8

Browse files
bonzinikevmw
authored andcommitted
block: use bdrv_add_before_write_notifier
Register the notifier using the specific API for block devices. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent e902754 commit 818bbc8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/write-threshold.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ static int coroutine_fn before_write_notify(NotifierWithReturn *notifier,
7676
static void write_threshold_register_notifier(BlockDriverState *bs)
7777
{
7878
bs->write_threshold_notifier.notify = before_write_notify;
79-
notifier_with_return_list_add(&bs->before_write_notifiers,
80-
&bs->write_threshold_notifier);
79+
bdrv_add_before_write_notifier(bs, &bs->write_threshold_notifier);
8180
}
8281

8382
static void write_threshold_update(BlockDriverState *bs,

0 commit comments

Comments
 (0)