aboutsummaryrefslogtreecommitdiff
path: root/block/nfs.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-10-10 15:19:20 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-10-10 15:19:20 +0100
commit0f183e679d85fec74fc83f35f973cf8e56d97861 (patch)
tree24ab65457f2b67288502b78e6f179e4ed695171b /block/nfs.c
parenta20fd901afdb453b8afc578a7be14703c3a36300 (diff)
parent9c7f3fcae714925153c4c5ada086ca4fcf6bbbd8 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches # gpg: Signature made Mon 10 Oct 2016 12:33:14 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: dmg: Move libbz2 code to dmg-bz2.so module: Don't load the same module if requested multiple times scripts: Allow block module to not define BlockDriver block: Add qdev ID to DEVICE_TRAY_MOVED block-backend: Remember if attached device is non-qdev block: Add node name to BLOCK_IO_ERROR event block: Add bdrv_runtime_opts to query-command-line-options block: use aio_bh_schedule_oneshot async: add aio_bh_schedule_oneshot block: use bdrv_add_before_write_notifier Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/nfs.c')
-rw-r--r--block/nfs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/nfs.c b/block/nfs.c
index 8602a44211..c3db2ec58d 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -57,7 +57,6 @@ typedef struct NFSRPC {
QEMUIOVector *iov;
struct stat *st;
Coroutine *co;
- QEMUBH *bh;
NFSClient *client;
} NFSRPC;
@@ -103,7 +102,6 @@ static void nfs_co_generic_bh_cb(void *opaque)
{
NFSRPC *task = opaque;
task->complete = 1;
- qemu_bh_delete(task->bh);
qemu_coroutine_enter(task->co);
}
@@ -127,9 +125,8 @@ nfs_co_generic_cb(int ret, struct nfs_context *nfs, void *data,
error_report("NFS Error: %s", nfs_get_error(nfs));
}
if (task->co) {
- task->bh = aio_bh_new(task->client->aio_context,
- nfs_co_generic_bh_cb, task);
- qemu_bh_schedule(task->bh);
+ aio_bh_schedule_oneshot(task->client->aio_context,
+ nfs_co_generic_bh_cb, task);
} else {
task->complete = 1;
}