aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-16 09:52:27 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-22 13:24:02 -0400
commitc48f4f3541e67881c9eb7c46e052f5ece48ef530 (patch)
tree99e99c9ebff6dcf9da430b9e1654582138a2b1de /fs/nfs/nfs4state.c
parent97dc135947181a6670949a480da56c3ebf8d3715 (diff)
NFSv41: Convert the various reboot recovery ops etc to minor version ops
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 4538c56a7f05..c3c6b8aeb209 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1122,8 +1122,7 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp)
1122 if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) 1122 if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))
1123 return; 1123 return;
1124 1124
1125 nfs4_reclaim_complete(clp, 1125 nfs4_reclaim_complete(clp, clp->cl_mvops->reboot_recovery_ops);
1126 nfs4_reboot_recovery_ops[clp->cl_minorversion]);
1127 1126
1128 for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) { 1127 for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) {
1129 sp = rb_entry(pos, struct nfs4_state_owner, so_client_node); 1128 sp = rb_entry(pos, struct nfs4_state_owner, so_client_node);
@@ -1213,8 +1212,8 @@ restart:
1213static int nfs4_check_lease(struct nfs_client *clp) 1212static int nfs4_check_lease(struct nfs_client *clp)
1214{ 1213{
1215 struct rpc_cred *cred; 1214 struct rpc_cred *cred;
1216 struct nfs4_state_maintenance_ops *ops = 1215 const struct nfs4_state_maintenance_ops *ops =
1217 nfs4_state_renewal_ops[clp->cl_minorversion]; 1216 clp->cl_mvops->state_renewal_ops;
1218 int status = -NFS4ERR_EXPIRED; 1217 int status = -NFS4ERR_EXPIRED;
1219 1218
1220 /* Is the client already known to have an expired lease? */ 1219 /* Is the client already known to have an expired lease? */
@@ -1237,8 +1236,8 @@ out:
1237static int nfs4_reclaim_lease(struct nfs_client *clp) 1236static int nfs4_reclaim_lease(struct nfs_client *clp)
1238{ 1237{
1239 struct rpc_cred *cred; 1238 struct rpc_cred *cred;
1240 struct nfs4_state_recovery_ops *ops = 1239 const struct nfs4_state_recovery_ops *ops =
1241 nfs4_reboot_recovery_ops[clp->cl_minorversion]; 1240 clp->cl_mvops->reboot_recovery_ops;
1242 int status = -ENOENT; 1241 int status = -ENOENT;
1243 1242
1244 cred = ops->get_clid_cred(clp); 1243 cred = ops->get_clid_cred(clp);
@@ -1446,7 +1445,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
1446 /* First recover reboot state... */ 1445 /* First recover reboot state... */
1447 if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) { 1446 if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
1448 status = nfs4_do_reclaim(clp, 1447 status = nfs4_do_reclaim(clp,
1449 nfs4_reboot_recovery_ops[clp->cl_minorversion]); 1448 clp->cl_mvops->reboot_recovery_ops);
1450 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || 1449 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) ||
1451 test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) 1450 test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
1452 continue; 1451 continue;
@@ -1460,7 +1459,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
1460 /* Now recover expired state... */ 1459 /* Now recover expired state... */
1461 if (test_and_clear_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) { 1460 if (test_and_clear_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) {
1462 status = nfs4_do_reclaim(clp, 1461 status = nfs4_do_reclaim(clp,
1463 nfs4_nograce_recovery_ops[clp->cl_minorversion]); 1462 clp->cl_mvops->nograce_recovery_ops);
1464 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || 1463 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) ||
1465 test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) || 1464 test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) ||
1466 test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) 1465 test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))