Commit 8e69514f2981d85108c2bd220ff8e188c0c27cdb
1 parent
29fba38b79
Exists in
master
and in
7 other branches
nfs41: support minorversion 1 for nfs4_check_lease
[moved nfs4_get_renew_cred related changes to "nfs41: introduce get_state_renewal_cred"] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Showing 3 changed files with 6 additions and 1 deletions Side-by-side Diff
fs/nfs/nfs4_fs.h
... | ... | @@ -182,6 +182,7 @@ |
182 | 182 | |
183 | 183 | struct nfs4_state_maintenance_ops { |
184 | 184 | int (*sched_state_renewal)(struct nfs_client *, struct rpc_cred *); |
185 | + int (*renew_lease)(struct nfs_client *, struct rpc_cred *); | |
185 | 186 | }; |
186 | 187 | |
187 | 188 | extern const struct dentry_operations nfs4_dentry_operations; |
fs/nfs/nfs4proc.c
... | ... | @@ -4795,11 +4795,13 @@ |
4795 | 4795 | |
4796 | 4796 | struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { |
4797 | 4797 | .sched_state_renewal = nfs4_proc_async_renew, |
4798 | + .renew_lease = nfs4_proc_renew, | |
4798 | 4799 | }; |
4799 | 4800 | |
4800 | 4801 | #if defined(CONFIG_NFS_V4_1) |
4801 | 4802 | struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = { |
4802 | 4803 | .sched_state_renewal = nfs41_proc_async_sequence, |
4804 | + .renew_lease = nfs4_proc_sequence, | |
4803 | 4805 | }; |
4804 | 4806 | #endif |
4805 | 4807 |
fs/nfs/nfs4state.c
... | ... | @@ -1083,6 +1083,8 @@ |
1083 | 1083 | static int nfs4_check_lease(struct nfs_client *clp) |
1084 | 1084 | { |
1085 | 1085 | struct rpc_cred *cred; |
1086 | + struct nfs4_state_maintenance_ops *ops = | |
1087 | + nfs4_state_renewal_ops[clp->cl_minorversion]; | |
1086 | 1088 | int status = -NFS4ERR_EXPIRED; |
1087 | 1089 | |
1088 | 1090 | /* Is the client already known to have an expired lease? */ |
... | ... | @@ -1094,7 +1096,7 @@ |
1094 | 1096 | if (cred == NULL) |
1095 | 1097 | goto out; |
1096 | 1098 | } |
1097 | - status = nfs4_proc_renew(clp, cred); | |
1099 | + status = ops->renew_lease(clp, cred); | |
1098 | 1100 | put_rpccred(cred); |
1099 | 1101 | out: |
1100 | 1102 | nfs4_recovery_handle_error(clp, status); |