summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-10-19 12:17:29 -0700
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-10-19 13:58:30 -0700
commitd00c5d43866720963a265fa3129f3203cac35b8e (patch)
tree0121c93156007c7764a818cc70b6864614e40536 /fs/nfs/nfs4filelayout.c
parentb8ef70639b609c5d12c618f1d9ffae6ac13aebe3 (diff)
downloadop-kernel-dev-d00c5d43866720963a265fa3129f3203cac35b8e.zip
op-kernel-dev-d00c5d43866720963a265fa3129f3203cac35b8e.tar.gz
NFS: Get rid of nfs_restart_rpc()
It can trivially be replaced with rpc_restart_call_prepare. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 4c78c62..0911941 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -122,7 +122,6 @@ static int filelayout_async_handle_error(struct rpc_task *task,
static int filelayout_read_done_cb(struct rpc_task *task,
struct nfs_read_data *data)
{
- struct nfs_client *clp = data->ds_clp;
int reset = 0;
dprintk("%s DS read\n", __func__);
@@ -134,9 +133,8 @@ static int filelayout_read_done_cb(struct rpc_task *task,
if (reset) {
pnfs_set_lo_fail(data->lseg);
nfs4_reset_read(task, data);
- clp = NFS_SERVER(data->inode)->nfs_client;
}
- nfs_restart_rpc(task, clp);
+ rpc_restart_call_prepare(task);
return -EAGAIN;
}
@@ -203,17 +201,13 @@ static int filelayout_write_done_cb(struct rpc_task *task,
if (filelayout_async_handle_error(task, data->args.context->state,
data->ds_clp, &reset) == -EAGAIN) {
- struct nfs_client *clp;
-
dprintk("%s calling restart ds_clp %p ds_clp->cl_session %p\n",
__func__, data->ds_clp, data->ds_clp->cl_session);
if (reset) {
pnfs_set_lo_fail(data->lseg);
nfs4_reset_write(task, data);
- clp = NFS_SERVER(data->inode)->nfs_client;
- } else
- clp = data->ds_clp;
- nfs_restart_rpc(task, clp);
+ }
+ rpc_restart_call_prepare(task);
return -EAGAIN;
}
@@ -245,7 +239,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
prepare_to_resend_writes(data);
pnfs_set_lo_fail(data->lseg);
} else
- nfs_restart_rpc(task, data->ds_clp);
+ rpc_restart_call_prepare(task);
return -EAGAIN;
}
OpenPOWER on IntegriCloud