@@ -1708,12 +1708,12 @@ bdrv_open_driver(BlockDriverState *bs, BlockDriver *drv, const char *node_name,
17081708open_failed :
17091709 bs -> drv = NULL ;
17101710
1711- bdrv_graph_wrlock (NULL );
1711+ bdrv_graph_wrlock ();
17121712 if (bs -> file != NULL ) {
17131713 bdrv_unref_child (bs , bs -> file );
17141714 assert (!bs -> file );
17151715 }
1716- bdrv_graph_wrunlock (NULL );
1716+ bdrv_graph_wrunlock ();
17171717
17181718 g_free (bs -> opaque );
17191719 bs -> opaque = NULL ;
@@ -3575,9 +3575,9 @@ int bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
35753575
35763576 bdrv_ref (drain_bs );
35773577 bdrv_drained_begin (drain_bs );
3578- bdrv_graph_wrlock (backing_hd );
3578+ bdrv_graph_wrlock ();
35793579 ret = bdrv_set_backing_hd_drained (bs , backing_hd , errp );
3580- bdrv_graph_wrunlock (backing_hd );
3580+ bdrv_graph_wrunlock ();
35813581 bdrv_drained_end (drain_bs );
35823582 bdrv_unref (drain_bs );
35833583
@@ -3790,13 +3790,13 @@ BdrvChild *bdrv_open_child(const char *filename,
37903790 return NULL ;
37913791 }
37923792
3793- bdrv_graph_wrlock (NULL );
3793+ bdrv_graph_wrlock ();
37943794 ctx = bdrv_get_aio_context (bs );
37953795 aio_context_acquire (ctx );
37963796 child = bdrv_attach_child (parent , bs , bdref_key , child_class , child_role ,
37973797 errp );
37983798 aio_context_release (ctx );
3799- bdrv_graph_wrunlock (NULL );
3799+ bdrv_graph_wrunlock ();
38003800
38013801 return child ;
38023802}
@@ -4650,9 +4650,9 @@ int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp)
46504650 aio_context_release (ctx );
46514651 }
46524652
4653- bdrv_graph_wrlock (NULL );
4653+ bdrv_graph_wrlock ();
46544654 tran_commit (tran );
4655- bdrv_graph_wrunlock (NULL );
4655+ bdrv_graph_wrunlock ();
46564656
46574657 QTAILQ_FOREACH_REVERSE (bs_entry , bs_queue , entry ) {
46584658 BlockDriverState * bs = bs_entry -> state .bs ;
@@ -4669,9 +4669,9 @@ int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp)
46694669 goto cleanup ;
46704670
46714671abort :
4672- bdrv_graph_wrlock (NULL );
4672+ bdrv_graph_wrlock ();
46734673 tran_abort (tran );
4674- bdrv_graph_wrunlock (NULL );
4674+ bdrv_graph_wrunlock ();
46754675
46764676 QTAILQ_FOREACH_SAFE (bs_entry , bs_queue , entry , next ) {
46774677 if (bs_entry -> prepared ) {
@@ -4852,12 +4852,12 @@ bdrv_reopen_parse_file_or_backing(BDRVReopenState *reopen_state,
48524852 }
48534853
48544854 bdrv_graph_rdunlock_main_loop ();
4855- bdrv_graph_wrlock (new_child_bs );
4855+ bdrv_graph_wrlock ();
48564856
48574857 ret = bdrv_set_file_or_backing_noperm (bs , new_child_bs , is_backing ,
48584858 tran , errp );
48594859
4860- bdrv_graph_wrunlock_ctx ( ctx );
4860+ bdrv_graph_wrunlock ( );
48614861
48624862 if (old_ctx != ctx ) {
48634863 aio_context_release (ctx );
@@ -5209,14 +5209,14 @@ static void bdrv_close(BlockDriverState *bs)
52095209 bs -> drv = NULL ;
52105210 }
52115211
5212- bdrv_graph_wrlock (bs );
5212+ bdrv_graph_wrlock ();
52135213 QLIST_FOREACH_SAFE (child , & bs -> children , next , next ) {
52145214 bdrv_unref_child (bs , child );
52155215 }
52165216
52175217 assert (!bs -> backing );
52185218 assert (!bs -> file );
5219- bdrv_graph_wrunlock (bs );
5219+ bdrv_graph_wrunlock ();
52205220
52215221 g_free (bs -> opaque );
52225222 bs -> opaque = NULL ;
@@ -5509,9 +5509,9 @@ int bdrv_drop_filter(BlockDriverState *bs, Error **errp)
55095509 bdrv_graph_rdunlock_main_loop ();
55105510
55115511 bdrv_drained_begin (child_bs );
5512- bdrv_graph_wrlock (bs );
5512+ bdrv_graph_wrlock ();
55135513 ret = bdrv_replace_node_common (bs , child_bs , true, true, errp );
5514- bdrv_graph_wrunlock (bs );
5514+ bdrv_graph_wrunlock ();
55155515 bdrv_drained_end (child_bs );
55165516
55175517 return ret ;
@@ -5561,7 +5561,7 @@ int bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top,
55615561 aio_context_acquire (old_context );
55625562 new_context = NULL ;
55635563
5564- bdrv_graph_wrlock (bs_top );
5564+ bdrv_graph_wrlock ();
55655565
55665566 child = bdrv_attach_child_noperm (bs_new , bs_top , "backing" ,
55675567 & child_of_bds , bdrv_backing_role (bs_new ),
@@ -5593,7 +5593,7 @@ int bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top,
55935593 tran_finalize (tran , ret );
55945594
55955595 bdrv_refresh_limits (bs_top , NULL , NULL );
5596- bdrv_graph_wrunlock (bs_top );
5596+ bdrv_graph_wrunlock ();
55975597
55985598 bdrv_drained_end (bs_top );
55995599 bdrv_drained_end (bs_new );
@@ -5620,7 +5620,7 @@ int bdrv_replace_child_bs(BdrvChild *child, BlockDriverState *new_bs,
56205620 bdrv_ref (old_bs );
56215621 bdrv_drained_begin (old_bs );
56225622 bdrv_drained_begin (new_bs );
5623- bdrv_graph_wrlock (new_bs );
5623+ bdrv_graph_wrlock ();
56245624
56255625 bdrv_replace_child_tran (child , new_bs , tran );
56265626
@@ -5631,7 +5631,7 @@ int bdrv_replace_child_bs(BdrvChild *child, BlockDriverState *new_bs,
56315631
56325632 tran_finalize (tran , ret );
56335633
5634- bdrv_graph_wrunlock (new_bs );
5634+ bdrv_graph_wrunlock ();
56355635 bdrv_drained_end (old_bs );
56365636 bdrv_drained_end (new_bs );
56375637 bdrv_unref (old_bs );
@@ -5718,9 +5718,9 @@ BlockDriverState *bdrv_insert_node(BlockDriverState *bs, QDict *options,
57185718 bdrv_ref (bs );
57195719 bdrv_drained_begin (bs );
57205720 bdrv_drained_begin (new_node_bs );
5721- bdrv_graph_wrlock (new_node_bs );
5721+ bdrv_graph_wrlock ();
57225722 ret = bdrv_replace_node (bs , new_node_bs , errp );
5723- bdrv_graph_wrunlock (new_node_bs );
5723+ bdrv_graph_wrunlock ();
57245724 bdrv_drained_end (new_node_bs );
57255725 bdrv_drained_end (bs );
57265726 bdrv_unref (bs );
@@ -5975,7 +5975,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
59755975
59765976 bdrv_ref (top );
59775977 bdrv_drained_begin (base );
5978- bdrv_graph_wrlock (base );
5978+ bdrv_graph_wrlock ();
59795979
59805980 if (!top -> drv || !base -> drv ) {
59815981 goto exit_wrlock ;
@@ -6015,7 +6015,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
60156015 * That's a FIXME.
60166016 */
60176017 bdrv_replace_node_common (top , base , false, false, & local_err );
6018- bdrv_graph_wrunlock (base );
6018+ bdrv_graph_wrunlock ();
60196019
60206020 if (local_err ) {
60216021 error_report_err (local_err );
@@ -6052,7 +6052,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
60526052 goto exit ;
60536053
60546054exit_wrlock :
6055- bdrv_graph_wrunlock (base );
6055+ bdrv_graph_wrunlock ();
60566056exit :
60576057 bdrv_drained_end (base );
60586058 bdrv_unref (top );
0 commit comments