From: Ronnie Sahlberg Date: Tue, 31 Dec 2013 23:16:02 +0000 (-0800) Subject: Change rpc_nfs_commit to rpc_nfs3_commit X-Git-Tag: upstream/1.9.6^2~150 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1a5636ffa79cb5a32988fe4001e8ceba07abbc13;hp=b701254d4082e17c1eeabceeeff2f414ee52356d;p=deb_libnfs.git Change rpc_nfs_commit to rpc_nfs3_commit --- diff --git a/lib/libnfs.c b/lib/libnfs.c index 30366cb..ebf7ae1 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -1712,6 +1712,7 @@ static void nfs_fsync_cb(struct rpc_context *rpc, int status, void *command_data int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data) { struct nfs_cb_data *data; + struct COMMIT3args args; data = malloc(sizeof(struct nfs_cb_data)); if (data == NULL) { @@ -1723,7 +1724,10 @@ int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, voi data->cb = cb; data->private_data = private_data; - if (rpc_nfs_commit_async(nfs->rpc, nfs_fsync_cb, &nfsfh->fh, data) != 0) { + args.file = nfsfh->fh; + args.offset = 0; + args.count = 0; + if (rpc_nfs3_commit_async(nfs->rpc, nfs_fsync_cb, &args, data) != 0) { rpc_set_error(nfs->rpc, "RPC error: Failed to send COMMIT call for %s", data->path); data->cb(-ENOMEM, nfs, rpc_get_error(nfs->rpc), data->private_data); free_nfs_cb_data(data);