[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/21] block: Make bdrv_close() static
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH 08/21] block: Make bdrv_close() static |
Date: |
Mon, 26 Jan 2015 14:27:35 -0500 |
There are no users of bdrv_close() left, except for one of bdrv_open()'s
failure paths, bdrv_close_all() and bdrv_delete(), and that is good.
Make bdrv_close() static so nobody makes the mistake of directly using
bdrv_close() again.
Signed-off-by: Max Reitz <address@hidden>
---
block.c | 4 +++-
include/block/block.h | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 0c6ab96..0cd6457 100644
--- a/block.c
+++ b/block.c
@@ -107,6 +107,8 @@ static int use_bdrv_whitelist;
static NotifierList close_all_notifiers =
NOTIFIER_LIST_INITIALIZER(close_all_notifiers);
+static void bdrv_close(BlockDriverState *bs);
+
#ifdef _WIN32
static int is_windows_drive_prefix(const char *filename)
{
@@ -1850,7 +1852,7 @@ void bdrv_reopen_abort(BDRVReopenState *reopen_state)
}
-void bdrv_close(BlockDriverState *bs)
+static void bdrv_close(BlockDriverState *bs)
{
BdrvAioNotifier *ban, *ban_next;
diff --git a/include/block/block.h b/include/block/block.h
index 2b7b3d6..6688920 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -191,7 +191,6 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state,
BlockReopenQueue *queue, Error **errp);
void bdrv_reopen_commit(BDRVReopenState *reopen_state);
void bdrv_reopen_abort(BDRVReopenState *reopen_state);
-void bdrv_close(BlockDriverState *bs);
int bdrv_read(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors);
int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
--
2.1.0
- [Qemu-devel] [PATCH 00/20] block: Rework bdrv_close_all(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 06/21] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 07/21] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() callers, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 08/21] block: Make bdrv_close() static,
Max Reitz <=
- [Qemu-devel] [PATCH 03/21] block: Add bdrv_close_all() notifiers, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 09/21] block: Add blk_name_taken(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 04/21] block: Add bdrv_close_all() handlers, Max Reitz, 2015/01/26