From 5940c705a620fe2598e067d48f61bdc8b43f8e4a Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 31 Dec 2013 15:37:40 -0800 Subject: [PATCH] Change rpc_nfs_rename to rpc_nfs3_rename --- lib/libnfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libnfs.c b/lib/libnfs.c index e916e75..cdb709c 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -3623,13 +3623,18 @@ static void nfs_rename_cb(struct rpc_context *rpc, int status, void *command_dat static int nfs_rename_continue_2_internal(struct nfs_context *nfs, struct nfs_cb_data *data) { struct nfs_rename_data *rename_data = data->continue_data; + RENAME3args args; /* steal the filehandle */ rename_data->newdir.data.data_len = data->fh.data.data_len; rename_data->newdir.data.data_val = data->fh.data.data_val; data->fh.data.data_val = NULL; - if (rpc_nfs_rename_async(nfs->rpc, nfs_rename_cb, &rename_data->olddir, rename_data->oldobject, &rename_data->newdir, rename_data->newobject, data) != 0) { + args.from.dir = rename_data->olddir; + args.from.name = rename_data->oldobject; + args.to.dir = rename_data->newdir; + args.to.name = rename_data->newobject; + if (rpc_nfs3_rename_async(nfs->rpc, nfs_rename_cb, &args, data) != 0) { rpc_set_error(nfs->rpc, "RPC error: Failed to send RENAME call for %s", data->path); data->cb(-ENOMEM, nfs, rpc_get_error(nfs->rpc), data->private_data); free_nfs_cb_data(data); -- 2.34.1