diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
commit | a215aa7b9ab3759c047201199fba64d3042d7f13 (patch) | |
tree | bca37493d9b2233450e6d3ffced1261d0e4f71fe /fs/nfs/nfs4state.c | |
parent | d31199a77ef606f1d06894385f1852181ba6136b (diff) |
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 3e2f19b04c06..940cf7c070af 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1138,16 +1138,14 @@ static void nfs4_reclaim_complete(struct nfs_client *clp, | |||
1138 | (void)ops->reclaim_complete(clp); | 1138 | (void)ops->reclaim_complete(clp); |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp) | 1141 | static int nfs4_state_clear_reclaim_reboot(struct nfs_client *clp) |
1142 | { | 1142 | { |
1143 | struct nfs4_state_owner *sp; | 1143 | struct nfs4_state_owner *sp; |
1144 | struct rb_node *pos; | 1144 | struct rb_node *pos; |
1145 | struct nfs4_state *state; | 1145 | struct nfs4_state *state; |
1146 | 1146 | ||
1147 | if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) | 1147 | if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) |
1148 | return; | 1148 | return 0; |
1149 | |||
1150 | nfs4_reclaim_complete(clp, clp->cl_mvops->reboot_recovery_ops); | ||
1151 | 1149 | ||
1152 | for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) { | 1150 | for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) { |
1153 | sp = rb_entry(pos, struct nfs4_state_owner, so_client_node); | 1151 | sp = rb_entry(pos, struct nfs4_state_owner, so_client_node); |
@@ -1161,6 +1159,14 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp) | |||
1161 | } | 1159 | } |
1162 | 1160 | ||
1163 | nfs_delegation_reap_unclaimed(clp); | 1161 | nfs_delegation_reap_unclaimed(clp); |
1162 | return 1; | ||
1163 | } | ||
1164 | |||
1165 | static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp) | ||
1166 | { | ||
1167 | if (!nfs4_state_clear_reclaim_reboot(clp)) | ||
1168 | return; | ||
1169 | nfs4_reclaim_complete(clp, clp->cl_mvops->reboot_recovery_ops); | ||
1164 | } | 1170 | } |
1165 | 1171 | ||
1166 | static void nfs_delegation_clear_all(struct nfs_client *clp) | 1172 | static void nfs_delegation_clear_all(struct nfs_client *clp) |
@@ -1187,7 +1193,7 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error) | |||
1187 | case -NFS4ERR_STALE_CLIENTID: | 1193 | case -NFS4ERR_STALE_CLIENTID: |
1188 | case -NFS4ERR_LEASE_MOVED: | 1194 | case -NFS4ERR_LEASE_MOVED: |
1189 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); | 1195 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); |
1190 | nfs4_state_end_reclaim_reboot(clp); | 1196 | nfs4_state_clear_reclaim_reboot(clp); |
1191 | nfs4_state_start_reclaim_reboot(clp); | 1197 | nfs4_state_start_reclaim_reboot(clp); |
1192 | break; | 1198 | break; |
1193 | case -NFS4ERR_EXPIRED: | 1199 | case -NFS4ERR_EXPIRED: |