@@ -747,6 +747,7 @@ int coroutine_fn bdrv_co_delete_file(BlockDriverState *bs, Error **errp)
IO_CODE();
assert(bs != NULL);
+ assert_bdrv_graph_readable();
if (!bs->drv) {
error_setg(errp, "Block node '%s' is not opened", bs->filename);
@@ -681,7 +681,7 @@ struct BlockDriver {
*/
int coroutine_fn (*bdrv_co_flush)(BlockDriverState *bs);
- /* Delete a created file. */
+ /* Delete a created file. Called with graph rdlock taken. */
int coroutine_fn (*bdrv_co_delete_file)(BlockDriverState *bs,
Error **errp);
The only callers are other callback functions that already run with the graph rdlock taken. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> --- block.c | 1 + include/block/block_int-common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)