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 | |
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')
-rw-r--r-- | fs/nfs/callback.c | 2 | ||||
-rw-r--r-- | fs/nfs/callback_proc.c | 4 | ||||
-rw-r--r-- | fs/nfs/delegation.c | 24 | ||||
-rw-r--r-- | fs/nfs/delegation.h | 10 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 12 | ||||
-rw-r--r-- | fs/nfs/nfs4_fs.h | 30 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 32 | ||||
-rw-r--r-- | fs/nfs/nfs4renewd.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 50 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 18 | ||||
-rw-r--r-- | fs/nfs/super.c | 4 |
11 files changed, 97 insertions, 97 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index b1f7dc415392..1b596b6d9dc2 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -167,7 +167,7 @@ void nfs_callback_down(void) | |||
167 | static int nfs_callback_authenticate(struct svc_rqst *rqstp) | 167 | static int nfs_callback_authenticate(struct svc_rqst *rqstp) |
168 | { | 168 | { |
169 | struct in_addr *addr = &rqstp->rq_addr.sin_addr; | 169 | struct in_addr *addr = &rqstp->rq_addr.sin_addr; |
170 | struct nfs4_client *clp; | 170 | struct nfs_client *clp; |
171 | 171 | ||
172 | /* Don't talk to strangers */ | 172 | /* Don't talk to strangers */ |
173 | clp = nfs4_find_client(addr); | 173 | clp = nfs4_find_client(addr); |
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 7719483ecdfc..55d6e2ec157f 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res) | 16 | unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res) |
17 | { | 17 | { |
18 | struct nfs4_client *clp; | 18 | struct nfs_client *clp; |
19 | struct nfs_delegation *delegation; | 19 | struct nfs_delegation *delegation; |
20 | struct nfs_inode *nfsi; | 20 | struct nfs_inode *nfsi; |
21 | struct inode *inode; | 21 | struct inode *inode; |
@@ -56,7 +56,7 @@ out: | |||
56 | 56 | ||
57 | unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy) | 57 | unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy) |
58 | { | 58 | { |
59 | struct nfs4_client *clp; | 59 | struct nfs_client *clp; |
60 | struct inode *inode; | 60 | struct inode *inode; |
61 | unsigned res; | 61 | unsigned res; |
62 | 62 | ||
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 9540a316c05e..5a1105c258bd 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -114,7 +114,7 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st | |||
114 | */ | 114 | */ |
115 | int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) | 115 | int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) |
116 | { | 116 | { |
117 | struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; | 117 | struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state; |
118 | struct nfs_inode *nfsi = NFS_I(inode); | 118 | struct nfs_inode *nfsi = NFS_I(inode); |
119 | struct nfs_delegation *delegation; | 119 | struct nfs_delegation *delegation; |
120 | int status = 0; | 120 | int status = 0; |
@@ -176,7 +176,7 @@ static void nfs_msync_inode(struct inode *inode) | |||
176 | */ | 176 | */ |
177 | int __nfs_inode_return_delegation(struct inode *inode) | 177 | int __nfs_inode_return_delegation(struct inode *inode) |
178 | { | 178 | { |
179 | struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; | 179 | struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state; |
180 | struct nfs_inode *nfsi = NFS_I(inode); | 180 | struct nfs_inode *nfsi = NFS_I(inode); |
181 | struct nfs_delegation *delegation; | 181 | struct nfs_delegation *delegation; |
182 | int res = 0; | 182 | int res = 0; |
@@ -208,7 +208,7 @@ int __nfs_inode_return_delegation(struct inode *inode) | |||
208 | */ | 208 | */ |
209 | void nfs_return_all_delegations(struct super_block *sb) | 209 | void nfs_return_all_delegations(struct super_block *sb) |
210 | { | 210 | { |
211 | struct nfs4_client *clp = NFS_SB(sb)->nfs4_state; | 211 | struct nfs_client *clp = NFS_SB(sb)->nfs4_state; |
212 | struct nfs_delegation *delegation; | 212 | struct nfs_delegation *delegation; |
213 | struct inode *inode; | 213 | struct inode *inode; |
214 | 214 | ||
@@ -232,7 +232,7 @@ restart: | |||
232 | 232 | ||
233 | int nfs_do_expire_all_delegations(void *ptr) | 233 | int nfs_do_expire_all_delegations(void *ptr) |
234 | { | 234 | { |
235 | struct nfs4_client *clp = ptr; | 235 | struct nfs_client *clp = ptr; |
236 | struct nfs_delegation *delegation; | 236 | struct nfs_delegation *delegation; |
237 | struct inode *inode; | 237 | struct inode *inode; |
238 | 238 | ||
@@ -258,7 +258,7 @@ out: | |||
258 | module_put_and_exit(0); | 258 | module_put_and_exit(0); |
259 | } | 259 | } |
260 | 260 | ||
261 | void nfs_expire_all_delegations(struct nfs4_client *clp) | 261 | void nfs_expire_all_delegations(struct nfs_client *clp) |
262 | { | 262 | { |
263 | struct task_struct *task; | 263 | struct task_struct *task; |
264 | 264 | ||
@@ -276,7 +276,7 @@ void nfs_expire_all_delegations(struct nfs4_client *clp) | |||
276 | /* | 276 | /* |
277 | * Return all delegations following an NFS4ERR_CB_PATH_DOWN error. | 277 | * Return all delegations following an NFS4ERR_CB_PATH_DOWN error. |
278 | */ | 278 | */ |
279 | void nfs_handle_cb_pathdown(struct nfs4_client *clp) | 279 | void nfs_handle_cb_pathdown(struct nfs_client *clp) |
280 | { | 280 | { |
281 | struct nfs_delegation *delegation; | 281 | struct nfs_delegation *delegation; |
282 | struct inode *inode; | 282 | struct inode *inode; |
@@ -299,7 +299,7 @@ restart: | |||
299 | 299 | ||
300 | struct recall_threadargs { | 300 | struct recall_threadargs { |
301 | struct inode *inode; | 301 | struct inode *inode; |
302 | struct nfs4_client *clp; | 302 | struct nfs_client *clp; |
303 | const nfs4_stateid *stateid; | 303 | const nfs4_stateid *stateid; |
304 | 304 | ||
305 | struct completion started; | 305 | struct completion started; |
@@ -310,7 +310,7 @@ static int recall_thread(void *data) | |||
310 | { | 310 | { |
311 | struct recall_threadargs *args = (struct recall_threadargs *)data; | 311 | struct recall_threadargs *args = (struct recall_threadargs *)data; |
312 | struct inode *inode = igrab(args->inode); | 312 | struct inode *inode = igrab(args->inode); |
313 | struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; | 313 | struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state; |
314 | struct nfs_inode *nfsi = NFS_I(inode); | 314 | struct nfs_inode *nfsi = NFS_I(inode); |
315 | struct nfs_delegation *delegation; | 315 | struct nfs_delegation *delegation; |
316 | 316 | ||
@@ -371,7 +371,7 @@ out_module_put: | |||
371 | /* | 371 | /* |
372 | * Retrieve the inode associated with a delegation | 372 | * Retrieve the inode associated with a delegation |
373 | */ | 373 | */ |
374 | struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle) | 374 | struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle) |
375 | { | 375 | { |
376 | struct nfs_delegation *delegation; | 376 | struct nfs_delegation *delegation; |
377 | struct inode *res = NULL; | 377 | struct inode *res = NULL; |
@@ -389,7 +389,7 @@ struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nf | |||
389 | /* | 389 | /* |
390 | * Mark all delegations as needing to be reclaimed | 390 | * Mark all delegations as needing to be reclaimed |
391 | */ | 391 | */ |
392 | void nfs_delegation_mark_reclaim(struct nfs4_client *clp) | 392 | void nfs_delegation_mark_reclaim(struct nfs_client *clp) |
393 | { | 393 | { |
394 | struct nfs_delegation *delegation; | 394 | struct nfs_delegation *delegation; |
395 | spin_lock(&clp->cl_lock); | 395 | spin_lock(&clp->cl_lock); |
@@ -401,7 +401,7 @@ void nfs_delegation_mark_reclaim(struct nfs4_client *clp) | |||
401 | /* | 401 | /* |
402 | * Reap all unclaimed delegations after reboot recovery is done | 402 | * Reap all unclaimed delegations after reboot recovery is done |
403 | */ | 403 | */ |
404 | void nfs_delegation_reap_unclaimed(struct nfs4_client *clp) | 404 | void nfs_delegation_reap_unclaimed(struct nfs_client *clp) |
405 | { | 405 | { |
406 | struct nfs_delegation *delegation, *n; | 406 | struct nfs_delegation *delegation, *n; |
407 | LIST_HEAD(head); | 407 | LIST_HEAD(head); |
@@ -423,7 +423,7 @@ void nfs_delegation_reap_unclaimed(struct nfs4_client *clp) | |||
423 | 423 | ||
424 | int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode) | 424 | int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode) |
425 | { | 425 | { |
426 | struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; | 426 | struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state; |
427 | struct nfs_inode *nfsi = NFS_I(inode); | 427 | struct nfs_inode *nfsi = NFS_I(inode); |
428 | struct nfs_delegation *delegation; | 428 | struct nfs_delegation *delegation; |
429 | int res = 0; | 429 | int res = 0; |
diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h index 3858694652fa..2cfd4b24c7fe 100644 --- a/fs/nfs/delegation.h +++ b/fs/nfs/delegation.h | |||
@@ -29,13 +29,13 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st | |||
29 | int __nfs_inode_return_delegation(struct inode *inode); | 29 | int __nfs_inode_return_delegation(struct inode *inode); |
30 | int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); | 30 | int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); |
31 | 31 | ||
32 | struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle); | 32 | struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); |
33 | void nfs_return_all_delegations(struct super_block *sb); | 33 | void nfs_return_all_delegations(struct super_block *sb); |
34 | void nfs_expire_all_delegations(struct nfs4_client *clp); | 34 | void nfs_expire_all_delegations(struct nfs_client *clp); |
35 | void nfs_handle_cb_pathdown(struct nfs4_client *clp); | 35 | void nfs_handle_cb_pathdown(struct nfs_client *clp); |
36 | 36 | ||
37 | void nfs_delegation_mark_reclaim(struct nfs4_client *clp); | 37 | void nfs_delegation_mark_reclaim(struct nfs_client *clp); |
38 | void nfs_delegation_reap_unclaimed(struct nfs4_client *clp); | 38 | void nfs_delegation_reap_unclaimed(struct nfs_client *clp); |
39 | 39 | ||
40 | /* NFSv4 delegation-related procedures */ | 40 | /* NFSv4 delegation-related procedures */ |
41 | int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid); | 41 | int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid); |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 873deb96a6cd..d05148ec9414 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -109,7 +109,7 @@ static struct rpc_pipe_ops idmap_upcall_ops = { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | void | 111 | void |
112 | nfs_idmap_new(struct nfs4_client *clp) | 112 | nfs_idmap_new(struct nfs_client *clp) |
113 | { | 113 | { |
114 | struct idmap *idmap; | 114 | struct idmap *idmap; |
115 | 115 | ||
@@ -138,7 +138,7 @@ nfs_idmap_new(struct nfs4_client *clp) | |||
138 | } | 138 | } |
139 | 139 | ||
140 | void | 140 | void |
141 | nfs_idmap_delete(struct nfs4_client *clp) | 141 | nfs_idmap_delete(struct nfs_client *clp) |
142 | { | 142 | { |
143 | struct idmap *idmap = clp->cl_idmap; | 143 | struct idmap *idmap = clp->cl_idmap; |
144 | 144 | ||
@@ -491,27 +491,27 @@ static unsigned int fnvhash32(const void *buf, size_t buflen) | |||
491 | return (hash); | 491 | return (hash); |
492 | } | 492 | } |
493 | 493 | ||
494 | int nfs_map_name_to_uid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid) | 494 | int nfs_map_name_to_uid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid) |
495 | { | 495 | { |
496 | struct idmap *idmap = clp->cl_idmap; | 496 | struct idmap *idmap = clp->cl_idmap; |
497 | 497 | ||
498 | return nfs_idmap_id(idmap, &idmap->idmap_user_hash, name, namelen, uid); | 498 | return nfs_idmap_id(idmap, &idmap->idmap_user_hash, name, namelen, uid); |
499 | } | 499 | } |
500 | 500 | ||
501 | int nfs_map_group_to_gid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid) | 501 | int nfs_map_group_to_gid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid) |
502 | { | 502 | { |
503 | struct idmap *idmap = clp->cl_idmap; | 503 | struct idmap *idmap = clp->cl_idmap; |
504 | 504 | ||
505 | return nfs_idmap_id(idmap, &idmap->idmap_group_hash, name, namelen, uid); | 505 | return nfs_idmap_id(idmap, &idmap->idmap_group_hash, name, namelen, uid); |
506 | } | 506 | } |
507 | 507 | ||
508 | int nfs_map_uid_to_name(struct nfs4_client *clp, __u32 uid, char *buf) | 508 | int nfs_map_uid_to_name(struct nfs_client *clp, __u32 uid, char *buf) |
509 | { | 509 | { |
510 | struct idmap *idmap = clp->cl_idmap; | 510 | struct idmap *idmap = clp->cl_idmap; |
511 | 511 | ||
512 | return nfs_idmap_name(idmap, &idmap->idmap_user_hash, uid, buf); | 512 | return nfs_idmap_name(idmap, &idmap->idmap_user_hash, uid, buf); |
513 | } | 513 | } |
514 | int nfs_map_gid_to_group(struct nfs4_client *clp, __u32 uid, char *buf) | 514 | int nfs_map_gid_to_group(struct nfs_client *clp, __u32 uid, char *buf) |
515 | { | 515 | { |
516 | struct idmap *idmap = clp->cl_idmap; | 516 | struct idmap *idmap = clp->cl_idmap; |
517 | 517 | ||
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 9a102860df37..4e334cb48498 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -43,9 +43,9 @@ enum nfs4_client_state { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * The nfs4_client identifies our client state to the server. | 46 | * The nfs_client identifies our client state to the server. |
47 | */ | 47 | */ |
48 | struct nfs4_client { | 48 | struct nfs_client { |
49 | struct list_head cl_servers; /* Global list of servers */ | 49 | struct list_head cl_servers; /* Global list of servers */ |
50 | struct in_addr cl_addr; /* Server identifier */ | 50 | struct in_addr cl_addr; /* Server identifier */ |
51 | u64 cl_clientid; /* constant */ | 51 | u64 cl_clientid; /* constant */ |
@@ -127,7 +127,7 @@ static inline void nfs_confirm_seqid(struct nfs_seqid_counter *seqid, int status | |||
127 | struct nfs4_state_owner { | 127 | struct nfs4_state_owner { |
128 | spinlock_t so_lock; | 128 | spinlock_t so_lock; |
129 | struct list_head so_list; /* per-clientid list of state_owners */ | 129 | struct list_head so_list; /* per-clientid list of state_owners */ |
130 | struct nfs4_client *so_client; | 130 | struct nfs_client *so_client; |
131 | u32 so_id; /* 32-bit identifier, unique */ | 131 | u32 so_id; /* 32-bit identifier, unique */ |
132 | atomic_t so_count; | 132 | atomic_t so_count; |
133 | 133 | ||
@@ -210,10 +210,10 @@ extern ssize_t nfs4_listxattr(struct dentry *, char *, size_t); | |||
210 | 210 | ||
211 | /* nfs4proc.c */ | 211 | /* nfs4proc.c */ |
212 | extern int nfs4_map_errors(int err); | 212 | extern int nfs4_map_errors(int err); |
213 | extern int nfs4_proc_setclientid(struct nfs4_client *, u32, unsigned short, struct rpc_cred *); | 213 | extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *); |
214 | extern int nfs4_proc_setclientid_confirm(struct nfs4_client *, struct rpc_cred *); | 214 | extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct rpc_cred *); |
215 | extern int nfs4_proc_async_renew(struct nfs4_client *, struct rpc_cred *); | 215 | extern int nfs4_proc_async_renew(struct nfs_client *, struct rpc_cred *); |
216 | extern int nfs4_proc_renew(struct nfs4_client *, struct rpc_cred *); | 216 | extern int nfs4_proc_renew(struct nfs_client *, struct rpc_cred *); |
217 | extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state); | 217 | extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state); |
218 | extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); | 218 | extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); |
219 | extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *); | 219 | extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *); |
@@ -231,19 +231,19 @@ extern const u32 nfs4_fsinfo_bitmap[2]; | |||
231 | extern const u32 nfs4_fs_locations_bitmap[2]; | 231 | extern const u32 nfs4_fs_locations_bitmap[2]; |
232 | 232 | ||
233 | /* nfs4renewd.c */ | 233 | /* nfs4renewd.c */ |
234 | extern void nfs4_schedule_state_renewal(struct nfs4_client *); | 234 | extern void nfs4_schedule_state_renewal(struct nfs_client *); |
235 | extern void nfs4_renewd_prepare_shutdown(struct nfs_server *); | 235 | extern void nfs4_renewd_prepare_shutdown(struct nfs_server *); |
236 | extern void nfs4_kill_renewd(struct nfs4_client *); | 236 | extern void nfs4_kill_renewd(struct nfs_client *); |
237 | extern void nfs4_renew_state(void *); | 237 | extern void nfs4_renew_state(void *); |
238 | 238 | ||
239 | /* nfs4state.c */ | 239 | /* nfs4state.c */ |
240 | extern void init_nfsv4_state(struct nfs_server *); | 240 | extern void init_nfsv4_state(struct nfs_server *); |
241 | extern void destroy_nfsv4_state(struct nfs_server *); | 241 | extern void destroy_nfsv4_state(struct nfs_server *); |
242 | extern struct nfs4_client *nfs4_get_client(struct in_addr *); | 242 | extern struct nfs_client *nfs4_get_client(struct in_addr *); |
243 | extern void nfs4_put_client(struct nfs4_client *clp); | 243 | extern void nfs4_put_client(struct nfs_client *clp); |
244 | extern struct nfs4_client *nfs4_find_client(struct in_addr *); | 244 | extern struct nfs_client *nfs4_find_client(struct in_addr *); |
245 | struct rpc_cred *nfs4_get_renew_cred(struct nfs4_client *clp); | 245 | struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp); |
246 | extern u32 nfs4_alloc_lockowner_id(struct nfs4_client *); | 246 | extern u32 nfs4_alloc_lockowner_id(struct nfs_client *); |
247 | 247 | ||
248 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); | 248 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); |
249 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); | 249 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); |
@@ -252,7 +252,7 @@ extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state | |||
252 | extern void nfs4_put_open_state(struct nfs4_state *); | 252 | extern void nfs4_put_open_state(struct nfs4_state *); |
253 | extern void nfs4_close_state(struct nfs4_state *, mode_t); | 253 | extern void nfs4_close_state(struct nfs4_state *, mode_t); |
254 | extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t); | 254 | extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t); |
255 | extern void nfs4_schedule_state_recovery(struct nfs4_client *); | 255 | extern void nfs4_schedule_state_recovery(struct nfs_client *); |
256 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); | 256 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); |
257 | extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); | 257 | extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); |
258 | extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t); | 258 | extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t); |
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 | ||
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 5d764d8e6d8a..208764069f61 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c | |||
@@ -61,7 +61,7 @@ | |||
61 | void | 61 | void |
62 | nfs4_renew_state(void *data) | 62 | nfs4_renew_state(void *data) |
63 | { | 63 | { |
64 | struct nfs4_client *clp = (struct nfs4_client *)data; | 64 | struct nfs_client *clp = (struct nfs_client *)data; |
65 | struct rpc_cred *cred; | 65 | struct rpc_cred *cred; |
66 | long lease, timeout; | 66 | long lease, timeout; |
67 | unsigned long last, now; | 67 | unsigned long last, now; |
@@ -108,7 +108,7 @@ out: | |||
108 | 108 | ||
109 | /* Must be called with clp->cl_sem locked for writes */ | 109 | /* Must be called with clp->cl_sem locked for writes */ |
110 | void | 110 | void |
111 | nfs4_schedule_state_renewal(struct nfs4_client *clp) | 111 | nfs4_schedule_state_renewal(struct nfs_client *clp) |
112 | { | 112 | { |
113 | long timeout; | 113 | long timeout; |
114 | 114 | ||
@@ -127,7 +127,7 @@ nfs4_schedule_state_renewal(struct nfs4_client *clp) | |||
127 | void | 127 | void |
128 | nfs4_renewd_prepare_shutdown(struct nfs_server *server) | 128 | nfs4_renewd_prepare_shutdown(struct nfs_server *server) |
129 | { | 129 | { |
130 | struct nfs4_client *clp = server->nfs4_state; | 130 | struct nfs_client *clp = server->nfs4_state; |
131 | 131 | ||
132 | if (!clp) | 132 | if (!clp) |
133 | return; | 133 | return; |
@@ -140,7 +140,7 @@ nfs4_renewd_prepare_shutdown(struct nfs_server *server) | |||
140 | 140 | ||
141 | /* Must be called with clp->cl_sem locked for writes */ | 141 | /* Must be called with clp->cl_sem locked for writes */ |
142 | void | 142 | void |
143 | nfs4_kill_renewd(struct nfs4_client *clp) | 143 | nfs4_kill_renewd(struct nfs_client *clp) |
144 | { | 144 | { |
145 | down_read(&clp->cl_sem); | 145 | down_read(&clp->cl_sem); |
146 | if (!list_empty(&clp->cl_superblocks)) { | 146 | if (!list_empty(&clp->cl_superblocks)) { |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 090a36b07a22..c0b6439f1f71 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -83,10 +83,10 @@ destroy_nfsv4_state(struct nfs_server *server) | |||
83 | * Since these are allocated/deallocated very rarely, we don't | 83 | * Since these are allocated/deallocated very rarely, we don't |
84 | * bother putting them in a slab cache... | 84 | * bother putting them in a slab cache... |
85 | */ | 85 | */ |
86 | static struct nfs4_client * | 86 | static struct nfs_client * |
87 | nfs4_alloc_client(struct in_addr *addr) | 87 | nfs4_alloc_client(struct in_addr *addr) |
88 | { | 88 | { |
89 | struct nfs4_client *clp; | 89 | struct nfs_client *clp; |
90 | 90 | ||
91 | if (nfs_callback_up() < 0) | 91 | if (nfs_callback_up() < 0) |
92 | return NULL; | 92 | return NULL; |
@@ -111,7 +111,7 @@ nfs4_alloc_client(struct in_addr *addr) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static void | 113 | static void |
114 | nfs4_free_client(struct nfs4_client *clp) | 114 | nfs4_free_client(struct nfs_client *clp) |
115 | { | 115 | { |
116 | struct nfs4_state_owner *sp; | 116 | struct nfs4_state_owner *sp; |
117 | 117 | ||
@@ -130,9 +130,9 @@ nfs4_free_client(struct nfs4_client *clp) | |||
130 | nfs_callback_down(); | 130 | nfs_callback_down(); |
131 | } | 131 | } |
132 | 132 | ||
133 | static struct nfs4_client *__nfs4_find_client(struct in_addr *addr) | 133 | static struct nfs_client *__nfs4_find_client(struct in_addr *addr) |
134 | { | 134 | { |
135 | struct nfs4_client *clp; | 135 | struct nfs_client *clp; |
136 | list_for_each_entry(clp, &nfs4_clientid_list, cl_servers) { | 136 | list_for_each_entry(clp, &nfs4_clientid_list, cl_servers) { |
137 | if (memcmp(&clp->cl_addr, addr, sizeof(clp->cl_addr)) == 0) { | 137 | if (memcmp(&clp->cl_addr, addr, sizeof(clp->cl_addr)) == 0) { |
138 | atomic_inc(&clp->cl_count); | 138 | atomic_inc(&clp->cl_count); |
@@ -142,19 +142,19 @@ static struct nfs4_client *__nfs4_find_client(struct in_addr *addr) | |||
142 | return NULL; | 142 | return NULL; |
143 | } | 143 | } |
144 | 144 | ||
145 | struct nfs4_client *nfs4_find_client(struct in_addr *addr) | 145 | struct nfs_client *nfs4_find_client(struct in_addr *addr) |
146 | { | 146 | { |
147 | struct nfs4_client *clp; | 147 | struct nfs_client *clp; |
148 | spin_lock(&state_spinlock); | 148 | spin_lock(&state_spinlock); |
149 | clp = __nfs4_find_client(addr); | 149 | clp = __nfs4_find_client(addr); |
150 | spin_unlock(&state_spinlock); | 150 | spin_unlock(&state_spinlock); |
151 | return clp; | 151 | return clp; |
152 | } | 152 | } |
153 | 153 | ||
154 | struct nfs4_client * | 154 | struct nfs_client * |
155 | nfs4_get_client(struct in_addr *addr) | 155 | nfs4_get_client(struct in_addr *addr) |
156 | { | 156 | { |
157 | struct nfs4_client *clp, *new = NULL; | 157 | struct nfs_client *clp, *new = NULL; |
158 | 158 | ||
159 | spin_lock(&state_spinlock); | 159 | spin_lock(&state_spinlock); |
160 | for (;;) { | 160 | for (;;) { |
@@ -180,7 +180,7 @@ nfs4_get_client(struct in_addr *addr) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | void | 182 | void |
183 | nfs4_put_client(struct nfs4_client *clp) | 183 | nfs4_put_client(struct nfs_client *clp) |
184 | { | 184 | { |
185 | if (!atomic_dec_and_lock(&clp->cl_count, &state_spinlock)) | 185 | if (!atomic_dec_and_lock(&clp->cl_count, &state_spinlock)) |
186 | return; | 186 | return; |
@@ -192,7 +192,7 @@ nfs4_put_client(struct nfs4_client *clp) | |||
192 | nfs4_free_client(clp); | 192 | nfs4_free_client(clp); |
193 | } | 193 | } |
194 | 194 | ||
195 | static int nfs4_init_client(struct nfs4_client *clp, struct rpc_cred *cred) | 195 | static int nfs4_init_client(struct nfs_client *clp, struct rpc_cred *cred) |
196 | { | 196 | { |
197 | int status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, | 197 | int status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, |
198 | nfs_callback_tcpport, cred); | 198 | nfs_callback_tcpport, cred); |
@@ -204,13 +204,13 @@ static int nfs4_init_client(struct nfs4_client *clp, struct rpc_cred *cred) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | u32 | 206 | u32 |
207 | nfs4_alloc_lockowner_id(struct nfs4_client *clp) | 207 | nfs4_alloc_lockowner_id(struct nfs_client *clp) |
208 | { | 208 | { |
209 | return clp->cl_lockowner_id ++; | 209 | return clp->cl_lockowner_id ++; |
210 | } | 210 | } |
211 | 211 | ||
212 | static struct nfs4_state_owner * | 212 | static struct nfs4_state_owner * |
213 | nfs4_client_grab_unused(struct nfs4_client *clp, struct rpc_cred *cred) | 213 | nfs4_client_grab_unused(struct nfs_client *clp, struct rpc_cred *cred) |
214 | { | 214 | { |
215 | struct nfs4_state_owner *sp = NULL; | 215 | struct nfs4_state_owner *sp = NULL; |
216 | 216 | ||
@@ -224,7 +224,7 @@ nfs4_client_grab_unused(struct nfs4_client *clp, struct rpc_cred *cred) | |||
224 | return sp; | 224 | return sp; |
225 | } | 225 | } |
226 | 226 | ||
227 | struct rpc_cred *nfs4_get_renew_cred(struct nfs4_client *clp) | 227 | struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp) |
228 | { | 228 | { |
229 | struct nfs4_state_owner *sp; | 229 | struct nfs4_state_owner *sp; |
230 | struct rpc_cred *cred = NULL; | 230 | struct rpc_cred *cred = NULL; |
@@ -238,7 +238,7 @@ struct rpc_cred *nfs4_get_renew_cred(struct nfs4_client *clp) | |||
238 | return cred; | 238 | return cred; |
239 | } | 239 | } |
240 | 240 | ||
241 | struct rpc_cred *nfs4_get_setclientid_cred(struct nfs4_client *clp) | 241 | struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp) |
242 | { | 242 | { |
243 | struct nfs4_state_owner *sp; | 243 | struct nfs4_state_owner *sp; |
244 | 244 | ||
@@ -251,7 +251,7 @@ struct rpc_cred *nfs4_get_setclientid_cred(struct nfs4_client *clp) | |||
251 | } | 251 | } |
252 | 252 | ||
253 | static struct nfs4_state_owner * | 253 | static struct nfs4_state_owner * |
254 | nfs4_find_state_owner(struct nfs4_client *clp, struct rpc_cred *cred) | 254 | nfs4_find_state_owner(struct nfs_client *clp, struct rpc_cred *cred) |
255 | { | 255 | { |
256 | struct nfs4_state_owner *sp, *res = NULL; | 256 | struct nfs4_state_owner *sp, *res = NULL; |
257 | 257 | ||
@@ -294,7 +294,7 @@ nfs4_alloc_state_owner(void) | |||
294 | void | 294 | void |
295 | nfs4_drop_state_owner(struct nfs4_state_owner *sp) | 295 | nfs4_drop_state_owner(struct nfs4_state_owner *sp) |
296 | { | 296 | { |
297 | struct nfs4_client *clp = sp->so_client; | 297 | struct nfs_client *clp = sp->so_client; |
298 | spin_lock(&clp->cl_lock); | 298 | spin_lock(&clp->cl_lock); |
299 | list_del_init(&sp->so_list); | 299 | list_del_init(&sp->so_list); |
300 | spin_unlock(&clp->cl_lock); | 300 | spin_unlock(&clp->cl_lock); |
@@ -306,7 +306,7 @@ nfs4_drop_state_owner(struct nfs4_state_owner *sp) | |||
306 | */ | 306 | */ |
307 | struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct rpc_cred *cred) | 307 | struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct rpc_cred *cred) |
308 | { | 308 | { |
309 | struct nfs4_client *clp = server->nfs4_state; | 309 | struct nfs_client *clp = server->nfs4_state; |
310 | struct nfs4_state_owner *sp, *new; | 310 | struct nfs4_state_owner *sp, *new; |
311 | 311 | ||
312 | get_rpccred(cred); | 312 | get_rpccred(cred); |
@@ -337,7 +337,7 @@ struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct | |||
337 | */ | 337 | */ |
338 | void nfs4_put_state_owner(struct nfs4_state_owner *sp) | 338 | void nfs4_put_state_owner(struct nfs4_state_owner *sp) |
339 | { | 339 | { |
340 | struct nfs4_client *clp = sp->so_client; | 340 | struct nfs_client *clp = sp->so_client; |
341 | struct rpc_cred *cred = sp->so_cred; | 341 | struct rpc_cred *cred = sp->so_cred; |
342 | 342 | ||
343 | if (!atomic_dec_and_lock(&sp->so_count, &clp->cl_lock)) | 343 | if (!atomic_dec_and_lock(&sp->so_count, &clp->cl_lock)) |
@@ -540,7 +540,7 @@ __nfs4_find_lock_state(struct nfs4_state *state, fl_owner_t fl_owner) | |||
540 | static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, fl_owner_t fl_owner) | 540 | static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, fl_owner_t fl_owner) |
541 | { | 541 | { |
542 | struct nfs4_lock_state *lsp; | 542 | struct nfs4_lock_state *lsp; |
543 | struct nfs4_client *clp = state->owner->so_client; | 543 | struct nfs_client *clp = state->owner->so_client; |
544 | 544 | ||
545 | lsp = kzalloc(sizeof(*lsp), GFP_KERNEL); | 545 | lsp = kzalloc(sizeof(*lsp), GFP_KERNEL); |
546 | if (lsp == NULL) | 546 | if (lsp == NULL) |
@@ -752,7 +752,7 @@ out: | |||
752 | 752 | ||
753 | static int reclaimer(void *); | 753 | static int reclaimer(void *); |
754 | 754 | ||
755 | static inline void nfs4_clear_recover_bit(struct nfs4_client *clp) | 755 | static inline void nfs4_clear_recover_bit(struct nfs_client *clp) |
756 | { | 756 | { |
757 | smp_mb__before_clear_bit(); | 757 | smp_mb__before_clear_bit(); |
758 | clear_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state); | 758 | clear_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state); |
@@ -764,7 +764,7 @@ static inline void nfs4_clear_recover_bit(struct nfs4_client *clp) | |||
764 | /* | 764 | /* |
765 | * State recovery routine | 765 | * State recovery routine |
766 | */ | 766 | */ |
767 | static void nfs4_recover_state(struct nfs4_client *clp) | 767 | static void nfs4_recover_state(struct nfs_client *clp) |
768 | { | 768 | { |
769 | struct task_struct *task; | 769 | struct task_struct *task; |
770 | 770 | ||
@@ -782,7 +782,7 @@ static void nfs4_recover_state(struct nfs4_client *clp) | |||
782 | /* | 782 | /* |
783 | * Schedule a state recovery attempt | 783 | * Schedule a state recovery attempt |
784 | */ | 784 | */ |
785 | void nfs4_schedule_state_recovery(struct nfs4_client *clp) | 785 | void nfs4_schedule_state_recovery(struct nfs_client *clp) |
786 | { | 786 | { |
787 | if (!clp) | 787 | if (!clp) |
788 | return; | 788 | return; |
@@ -879,7 +879,7 @@ out_err: | |||
879 | return status; | 879 | return status; |
880 | } | 880 | } |
881 | 881 | ||
882 | static void nfs4_state_mark_reclaim(struct nfs4_client *clp) | 882 | static void nfs4_state_mark_reclaim(struct nfs_client *clp) |
883 | { | 883 | { |
884 | struct nfs4_state_owner *sp; | 884 | struct nfs4_state_owner *sp; |
885 | struct nfs4_state *state; | 885 | struct nfs4_state *state; |
@@ -903,7 +903,7 @@ static void nfs4_state_mark_reclaim(struct nfs4_client *clp) | |||
903 | 903 | ||
904 | static int reclaimer(void *ptr) | 904 | static int reclaimer(void *ptr) |
905 | { | 905 | { |
906 | struct nfs4_client *clp = ptr; | 906 | struct nfs_client *clp = ptr; |
907 | struct nfs4_state_owner *sp; | 907 | struct nfs4_state_owner *sp; |
908 | struct nfs4_state_recovery_ops *ops; | 908 | struct nfs4_state_recovery_ops *ops; |
909 | struct rpc_cred *cred; | 909 | struct rpc_cred *cred; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 1dee6ef7e5a9..04748ab9ed55 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1160,7 +1160,7 @@ static int encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, con | |||
1160 | return 0; | 1160 | return 0; |
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | static int encode_renew(struct xdr_stream *xdr, const struct nfs4_client *client_stateid) | 1163 | static int encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid) |
1164 | { | 1164 | { |
1165 | uint32_t *p; | 1165 | uint32_t *p; |
1166 | 1166 | ||
@@ -1246,7 +1246,7 @@ static int encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclien | |||
1246 | return 0; | 1246 | return 0; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4_client *client_state) | 1249 | static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs_client *client_state) |
1250 | { | 1250 | { |
1251 | uint32_t *p; | 1251 | uint32_t *p; |
1252 | 1252 | ||
@@ -1945,7 +1945,7 @@ static int nfs4_xdr_enc_server_caps(struct rpc_rqst *req, uint32_t *p, const str | |||
1945 | /* | 1945 | /* |
1946 | * a RENEW request | 1946 | * a RENEW request |
1947 | */ | 1947 | */ |
1948 | static int nfs4_xdr_enc_renew(struct rpc_rqst *req, uint32_t *p, struct nfs4_client *clp) | 1948 | static int nfs4_xdr_enc_renew(struct rpc_rqst *req, uint32_t *p, struct nfs_client *clp) |
1949 | { | 1949 | { |
1950 | struct xdr_stream xdr; | 1950 | struct xdr_stream xdr; |
1951 | struct compound_hdr hdr = { | 1951 | struct compound_hdr hdr = { |
@@ -1975,7 +1975,7 @@ static int nfs4_xdr_enc_setclientid(struct rpc_rqst *req, uint32_t *p, struct nf | |||
1975 | /* | 1975 | /* |
1976 | * a SETCLIENTID_CONFIRM request | 1976 | * a SETCLIENTID_CONFIRM request |
1977 | */ | 1977 | */ |
1978 | static int nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req, uint32_t *p, struct nfs4_client *clp) | 1978 | static int nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req, uint32_t *p, struct nfs_client *clp) |
1979 | { | 1979 | { |
1980 | struct xdr_stream xdr; | 1980 | struct xdr_stream xdr; |
1981 | struct compound_hdr hdr = { | 1981 | struct compound_hdr hdr = { |
@@ -2132,7 +2132,7 @@ static int decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected) | |||
2132 | } | 2132 | } |
2133 | 2133 | ||
2134 | /* Dummy routine */ | 2134 | /* Dummy routine */ |
2135 | static int decode_ace(struct xdr_stream *xdr, void *ace, struct nfs4_client *clp) | 2135 | static int decode_ace(struct xdr_stream *xdr, void *ace, struct nfs_client *clp) |
2136 | { | 2136 | { |
2137 | uint32_t *p; | 2137 | uint32_t *p; |
2138 | unsigned int strlen; | 2138 | unsigned int strlen; |
@@ -2636,7 +2636,7 @@ static int decode_attr_nlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t | |||
2636 | return 0; | 2636 | return 0; |
2637 | } | 2637 | } |
2638 | 2638 | ||
2639 | static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_client *clp, int32_t *uid) | 2639 | static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *uid) |
2640 | { | 2640 | { |
2641 | uint32_t len, *p; | 2641 | uint32_t len, *p; |
2642 | 2642 | ||
@@ -2660,7 +2660,7 @@ static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nf | |||
2660 | return 0; | 2660 | return 0; |
2661 | } | 2661 | } |
2662 | 2662 | ||
2663 | static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_client *clp, int32_t *gid) | 2663 | static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *gid) |
2664 | { | 2664 | { |
2665 | uint32_t len, *p; | 2665 | uint32_t len, *p; |
2666 | 2666 | ||
@@ -3565,7 +3565,7 @@ static int decode_setattr(struct xdr_stream *xdr, struct nfs_setattrres *res) | |||
3565 | return 0; | 3565 | return 0; |
3566 | } | 3566 | } |
3567 | 3567 | ||
3568 | static int decode_setclientid(struct xdr_stream *xdr, struct nfs4_client *clp) | 3568 | static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp) |
3569 | { | 3569 | { |
3570 | uint32_t *p; | 3570 | uint32_t *p; |
3571 | uint32_t opnum; | 3571 | uint32_t opnum; |
@@ -4335,7 +4335,7 @@ static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, uint32_t *p, void *dummy) | |||
4335 | * a SETCLIENTID request | 4335 | * a SETCLIENTID request |
4336 | */ | 4336 | */ |
4337 | static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req, uint32_t *p, | 4337 | static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req, uint32_t *p, |
4338 | struct nfs4_client *clp) | 4338 | struct nfs_client *clp) |
4339 | { | 4339 | { |
4340 | struct xdr_stream xdr; | 4340 | struct xdr_stream xdr; |
4341 | struct compound_hdr hdr; | 4341 | struct compound_hdr hdr; |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 63497345806b..d03ede5b1aca 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1099,7 +1099,7 @@ static int nfs_clone_nfs_sb(struct file_system_type *fs_type, | |||
1099 | static struct rpc_clnt *nfs4_create_client(struct nfs_server *server, | 1099 | static struct rpc_clnt *nfs4_create_client(struct nfs_server *server, |
1100 | struct rpc_timeout *timeparms, int proto, rpc_authflavor_t flavor) | 1100 | struct rpc_timeout *timeparms, int proto, rpc_authflavor_t flavor) |
1101 | { | 1101 | { |
1102 | struct nfs4_client *clp; | 1102 | struct nfs_client *clp; |
1103 | struct rpc_xprt *xprt = NULL; | 1103 | struct rpc_xprt *xprt = NULL; |
1104 | struct rpc_clnt *clnt = NULL; | 1104 | struct rpc_clnt *clnt = NULL; |
1105 | int err = -EIO; | 1105 | int err = -EIO; |
@@ -1416,7 +1416,7 @@ static inline char *nfs4_dup_path(const struct dentry *dentry) | |||
1416 | static struct super_block *nfs4_clone_sb(struct nfs_server *server, struct nfs_clone_mount *data) | 1416 | static struct super_block *nfs4_clone_sb(struct nfs_server *server, struct nfs_clone_mount *data) |
1417 | { | 1417 | { |
1418 | const struct dentry *dentry = data->dentry; | 1418 | const struct dentry *dentry = data->dentry; |
1419 | struct nfs4_client *clp = server->nfs4_state; | 1419 | struct nfs_client *clp = server->nfs4_state; |
1420 | struct super_block *sb; | 1420 | struct super_block *sb; |
1421 | 1421 | ||
1422 | server->fsid = data->fattr->fsid; | 1422 | server->fsid = data->fattr->fsid; |