diff options
author | David Howells <dhowells@redhat.com> | 2006-08-22 20:06:08 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-22 23:24:31 -0400 |
commit | adfa6f980bd46974e6b32b22dd0c45e3f52063f4 (patch) | |
tree | 7dbc86985faa0fce0e73103979262c1593ea3a3b /fs/nfs/nfs4proc.c | |
parent | 5ae1fbce142b67bf59e15fb1af96e88a96abde7b (diff) |
NFS: Rename struct nfs4_client to struct nfs_client
Rename struct nfs4_client to struct nfs_client so that it can become the basis
for a general client record for NFS2 and NFS3 in addition to NFS4.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index b14145b7b87f..168f3ffb059f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -64,7 +64,7 @@ static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinf | |||
64 | static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *); | 64 | static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *); |
65 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); | 65 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); |
66 | static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception); | 66 | static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception); |
67 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp); | 67 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp); |
68 | 68 | ||
69 | /* Prevent leaks of NFSv4 errors into userland */ | 69 | /* Prevent leaks of NFSv4 errors into userland */ |
70 | int nfs4_map_errors(int err) | 70 | int nfs4_map_errors(int err) |
@@ -195,7 +195,7 @@ static void nfs4_setup_readdir(u64 cookie, u32 *verifier, struct dentry *dentry, | |||
195 | 195 | ||
196 | static void renew_lease(const struct nfs_server *server, unsigned long timestamp) | 196 | static void renew_lease(const struct nfs_server *server, unsigned long timestamp) |
197 | { | 197 | { |
198 | struct nfs4_client *clp = server->nfs4_state; | 198 | struct nfs_client *clp = server->nfs4_state; |
199 | spin_lock(&clp->cl_lock); | 199 | spin_lock(&clp->cl_lock); |
200 | if (time_before(clp->cl_last_renewal,timestamp)) | 200 | if (time_before(clp->cl_last_renewal,timestamp)) |
201 | clp->cl_last_renewal = timestamp; | 201 | clp->cl_last_renewal = timestamp; |
@@ -792,7 +792,7 @@ out: | |||
792 | 792 | ||
793 | int nfs4_recover_expired_lease(struct nfs_server *server) | 793 | int nfs4_recover_expired_lease(struct nfs_server *server) |
794 | { | 794 | { |
795 | struct nfs4_client *clp = server->nfs4_state; | 795 | struct nfs_client *clp = server->nfs4_state; |
796 | 796 | ||
797 | if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) | 797 | if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) |
798 | nfs4_schedule_state_recovery(clp); | 798 | nfs4_schedule_state_recovery(clp); |
@@ -867,7 +867,7 @@ static int _nfs4_open_delegated(struct inode *inode, int flags, struct rpc_cred | |||
867 | { | 867 | { |
868 | struct nfs_delegation *delegation; | 868 | struct nfs_delegation *delegation; |
869 | struct nfs_server *server = NFS_SERVER(inode); | 869 | struct nfs_server *server = NFS_SERVER(inode); |
870 | struct nfs4_client *clp = server->nfs4_state; | 870 | struct nfs_client *clp = server->nfs4_state; |
871 | struct nfs_inode *nfsi = NFS_I(inode); | 871 | struct nfs_inode *nfsi = NFS_I(inode); |
872 | struct nfs4_state_owner *sp = NULL; | 872 | struct nfs4_state_owner *sp = NULL; |
873 | struct nfs4_state *state = NULL; | 873 | struct nfs4_state *state = NULL; |
@@ -953,7 +953,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st | |||
953 | struct nfs4_state_owner *sp; | 953 | struct nfs4_state_owner *sp; |
954 | struct nfs4_state *state = NULL; | 954 | struct nfs4_state *state = NULL; |
955 | struct nfs_server *server = NFS_SERVER(dir); | 955 | struct nfs_server *server = NFS_SERVER(dir); |
956 | struct nfs4_client *clp = server->nfs4_state; | 956 | struct nfs_client *clp = server->nfs4_state; |
957 | struct nfs4_opendata *opendata; | 957 | struct nfs4_opendata *opendata; |
958 | int status; | 958 | int status; |
959 | 959 | ||
@@ -2521,7 +2521,7 @@ static void nfs4_proc_commit_setup(struct nfs_write_data *data, int how) | |||
2521 | */ | 2521 | */ |
2522 | static void nfs4_renew_done(struct rpc_task *task, void *data) | 2522 | static void nfs4_renew_done(struct rpc_task *task, void *data) |
2523 | { | 2523 | { |
2524 | struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp; | 2524 | struct nfs_client *clp = (struct nfs_client *)task->tk_msg.rpc_argp; |
2525 | unsigned long timestamp = (unsigned long)data; | 2525 | unsigned long timestamp = (unsigned long)data; |
2526 | 2526 | ||
2527 | if (task->tk_status < 0) { | 2527 | if (task->tk_status < 0) { |
@@ -2543,7 +2543,7 @@ static const struct rpc_call_ops nfs4_renew_ops = { | |||
2543 | .rpc_call_done = nfs4_renew_done, | 2543 | .rpc_call_done = nfs4_renew_done, |
2544 | }; | 2544 | }; |
2545 | 2545 | ||
2546 | int nfs4_proc_async_renew(struct nfs4_client *clp, struct rpc_cred *cred) | 2546 | int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred) |
2547 | { | 2547 | { |
2548 | struct rpc_message msg = { | 2548 | struct rpc_message msg = { |
2549 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], | 2549 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], |
@@ -2555,7 +2555,7 @@ int nfs4_proc_async_renew(struct nfs4_client *clp, struct rpc_cred *cred) | |||
2555 | &nfs4_renew_ops, (void *)jiffies); | 2555 | &nfs4_renew_ops, (void *)jiffies); |
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | int nfs4_proc_renew(struct nfs4_client *clp, struct rpc_cred *cred) | 2558 | int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred) |
2559 | { | 2559 | { |
2560 | struct rpc_message msg = { | 2560 | struct rpc_message msg = { |
2561 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], | 2561 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], |
@@ -2791,7 +2791,7 @@ static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen | |||
2791 | static int | 2791 | static int |
2792 | nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) | 2792 | nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) |
2793 | { | 2793 | { |
2794 | struct nfs4_client *clp = server->nfs4_state; | 2794 | struct nfs_client *clp = server->nfs4_state; |
2795 | 2795 | ||
2796 | if (!clp || task->tk_status >= 0) | 2796 | if (!clp || task->tk_status >= 0) |
2797 | return 0; | 2797 | return 0; |
@@ -2828,7 +2828,7 @@ static int nfs4_wait_bit_interruptible(void *word) | |||
2828 | return 0; | 2828 | return 0; |
2829 | } | 2829 | } |
2830 | 2830 | ||
2831 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp) | 2831 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp) |
2832 | { | 2832 | { |
2833 | sigset_t oldset; | 2833 | sigset_t oldset; |
2834 | int res; | 2834 | int res; |
@@ -2871,7 +2871,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) | |||
2871 | */ | 2871 | */ |
2872 | int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) | 2872 | int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) |
2873 | { | 2873 | { |
2874 | struct nfs4_client *clp = server->nfs4_state; | 2874 | struct nfs_client *clp = server->nfs4_state; |
2875 | int ret = errorcode; | 2875 | int ret = errorcode; |
2876 | 2876 | ||
2877 | exception->retry = 0; | 2877 | exception->retry = 0; |
@@ -2898,7 +2898,7 @@ int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct | |||
2898 | return nfs4_map_errors(ret); | 2898 | return nfs4_map_errors(ret); |
2899 | } | 2899 | } |
2900 | 2900 | ||
2901 | int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) | 2901 | int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) |
2902 | { | 2902 | { |
2903 | nfs4_verifier sc_verifier; | 2903 | nfs4_verifier sc_verifier; |
2904 | struct nfs4_setclientid setclientid = { | 2904 | struct nfs4_setclientid setclientid = { |
@@ -2945,7 +2945,7 @@ int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short p | |||
2945 | return status; | 2945 | return status; |
2946 | } | 2946 | } |
2947 | 2947 | ||
2948 | static int _nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) | 2948 | static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) |
2949 | { | 2949 | { |
2950 | struct nfs_fsinfo fsinfo; | 2950 | struct nfs_fsinfo fsinfo; |
2951 | struct rpc_message msg = { | 2951 | struct rpc_message msg = { |
@@ -2969,7 +2969,7 @@ static int _nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cr | |||
2969 | return status; | 2969 | return status; |
2970 | } | 2970 | } |
2971 | 2971 | ||
2972 | int nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) | 2972 | int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) |
2973 | { | 2973 | { |
2974 | long timeout; | 2974 | long timeout; |
2975 | int err; | 2975 | int err; |
@@ -3106,7 +3106,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock | |||
3106 | { | 3106 | { |
3107 | struct inode *inode = state->inode; | 3107 | struct inode *inode = state->inode; |
3108 | struct nfs_server *server = NFS_SERVER(inode); | 3108 | struct nfs_server *server = NFS_SERVER(inode); |
3109 | struct nfs4_client *clp = server->nfs4_state; | 3109 | struct nfs_client *clp = server->nfs4_state; |
3110 | struct nfs_lockt_args arg = { | 3110 | struct nfs_lockt_args arg = { |
3111 | .fh = NFS_FH(inode), | 3111 | .fh = NFS_FH(inode), |
3112 | .fl = request, | 3112 | .fl = request, |
@@ -3513,7 +3513,7 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request | |||
3513 | 3513 | ||
3514 | static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) | 3514 | static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) |
3515 | { | 3515 | { |
3516 | struct nfs4_client *clp = state->owner->so_client; | 3516 | struct nfs_client *clp = state->owner->so_client; |
3517 | unsigned char fl_flags = request->fl_flags; | 3517 | unsigned char fl_flags = request->fl_flags; |
3518 | int status; | 3518 | int status; |
3519 | 3519 | ||