diff options
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r-- | include/linux/nfsd/nfsd.h | 8 | ||||
-rw-r--r-- | include/linux/nfsd/nfsfh.h | 15 | ||||
-rw-r--r-- | include/linux/nfsd/state.h | 1 | ||||
-rw-r--r-- | include/linux/nfsd/xdr.h | 4 | ||||
-rw-r--r-- | include/linux/nfsd/xdr3.h | 8 | ||||
-rw-r--r-- | include/linux/nfsd/xdr4.h | 40 |
6 files changed, 38 insertions, 38 deletions
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index edb54c3171b3..4b7c4b568f6d 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -52,8 +52,6 @@ | |||
52 | struct readdir_cd { | 52 | struct readdir_cd { |
53 | __be32 err; /* 0, nfserr, or nfserr_eof */ | 53 | __be32 err; /* 0, nfserr, or nfserr_eof */ |
54 | }; | 54 | }; |
55 | typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, | ||
56 | int, loff_t, ino_t, unsigned int); | ||
57 | typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); | 55 | typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); |
58 | 56 | ||
59 | extern struct svc_program nfsd_program; | 57 | extern struct svc_program nfsd_program; |
@@ -117,7 +115,7 @@ __be32 nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type, | |||
117 | int nfsd_truncate(struct svc_rqst *, struct svc_fh *, | 115 | int nfsd_truncate(struct svc_rqst *, struct svc_fh *, |
118 | unsigned long size); | 116 | unsigned long size); |
119 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, | 117 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, |
120 | loff_t *, struct readdir_cd *, encode_dent_fn); | 118 | loff_t *, struct readdir_cd *, filldir_t); |
121 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, | 119 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, |
122 | struct kstatfs *); | 120 | struct kstatfs *); |
123 | 121 | ||
@@ -275,12 +273,12 @@ static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh) | |||
275 | * we might process an operation with side effects, and be unable to | 273 | * we might process an operation with side effects, and be unable to |
276 | * tell the client that the operation succeeded. | 274 | * tell the client that the operation succeeded. |
277 | * | 275 | * |
278 | * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space | 276 | * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space |
279 | * needed to encode an "ordinary" _successful_ operation. (GETATTR, | 277 | * needed to encode an "ordinary" _successful_ operation. (GETATTR, |
280 | * READ, READDIR, and READLINK have their own buffer checks.) if we | 278 | * READ, READDIR, and READLINK have their own buffer checks.) if we |
281 | * fall below this level, we fail the next operation with NFS4ERR_RESOURCE. | 279 | * fall below this level, we fail the next operation with NFS4ERR_RESOURCE. |
282 | * | 280 | * |
283 | * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space | 281 | * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space |
284 | * needed to encode an operation which has failed with NFS4ERR_RESOURCE. | 282 | * needed to encode an operation which has failed with NFS4ERR_RESOURCE. |
285 | * care is taken to ensure that we never fall below this level for any | 283 | * care is taken to ensure that we never fall below this level for any |
286 | * reason. | 284 | * reason. |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index f3b51d62ec7d..d9c6c382165d 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -217,11 +217,7 @@ void fh_put(struct svc_fh *); | |||
217 | static __inline__ struct svc_fh * | 217 | static __inline__ struct svc_fh * |
218 | fh_copy(struct svc_fh *dst, struct svc_fh *src) | 218 | fh_copy(struct svc_fh *dst, struct svc_fh *src) |
219 | { | 219 | { |
220 | if (src->fh_dentry || src->fh_locked) { | 220 | WARN_ON(src->fh_dentry || src->fh_locked); |
221 | struct dentry *dentry = src->fh_dentry; | ||
222 | printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", | ||
223 | dentry->d_parent->d_name.name, dentry->d_name.name); | ||
224 | } | ||
225 | 221 | ||
226 | *dst = *src; | 222 | *dst = *src; |
227 | return dst; | 223 | return dst; |
@@ -300,10 +296,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) | |||
300 | dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", | 296 | dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", |
301 | SVCFH_fmt(fhp), fhp->fh_locked); | 297 | SVCFH_fmt(fhp), fhp->fh_locked); |
302 | 298 | ||
303 | if (!fhp->fh_dentry) { | 299 | BUG_ON(!dentry); |
304 | printk(KERN_ERR "fh_lock: fh not verified!\n"); | 300 | |
305 | return; | ||
306 | } | ||
307 | if (fhp->fh_locked) { | 301 | if (fhp->fh_locked) { |
308 | printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", | 302 | printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", |
309 | dentry->d_parent->d_name.name, dentry->d_name.name); | 303 | dentry->d_parent->d_name.name, dentry->d_name.name); |
@@ -328,8 +322,7 @@ fh_lock(struct svc_fh *fhp) | |||
328 | static inline void | 322 | static inline void |
329 | fh_unlock(struct svc_fh *fhp) | 323 | fh_unlock(struct svc_fh *fhp) |
330 | { | 324 | { |
331 | if (!fhp->fh_dentry) | 325 | BUG_ON(!fhp->fh_dentry); |
332 | printk(KERN_ERR "fh_unlock: fh not verified!\n"); | ||
333 | 326 | ||
334 | if (fhp->fh_locked) { | 327 | if (fhp->fh_locked) { |
335 | fill_post_wcc(fhp); | 328 | fill_post_wcc(fhp); |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index c3673f487e84..ab5c236bd9a7 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
@@ -273,7 +273,6 @@ struct nfs4_stateid { | |||
273 | ((err) != nfserr_stale_stateid) && \ | 273 | ((err) != nfserr_stale_stateid) && \ |
274 | ((err) != nfserr_bad_stateid)) | 274 | ((err) != nfserr_bad_stateid)) |
275 | 275 | ||
276 | extern __be32 nfsd4_renew(clientid_t *clid); | ||
277 | extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh, | 276 | extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh, |
278 | stateid_t *stateid, int flags, struct file **filp); | 277 | stateid_t *stateid, int flags, struct file **filp); |
279 | extern void nfs4_lock_state(void); | 278 | extern void nfs4_lock_state(void); |
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h index 877192d3ae79..67885d5e6e50 100644 --- a/include/linux/nfsd/xdr.h +++ b/include/linux/nfsd/xdr.h | |||
@@ -165,8 +165,8 @@ int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *); | |||
165 | int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *); | 165 | int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *); |
166 | int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *); | 166 | int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *); |
167 | 167 | ||
168 | int nfssvc_encode_entry(struct readdir_cd *, const char *name, | 168 | int nfssvc_encode_entry(void *, const char *name, |
169 | int namlen, loff_t offset, ino_t ino, unsigned int); | 169 | int namlen, loff_t offset, u64 ino, unsigned int); |
170 | 170 | ||
171 | int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); | 171 | int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); |
172 | 172 | ||
diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h index 79963867b0d7..89d9d6061a62 100644 --- a/include/linux/nfsd/xdr3.h +++ b/include/linux/nfsd/xdr3.h | |||
@@ -331,11 +331,11 @@ int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *, | |||
331 | struct nfsd3_attrstat *); | 331 | struct nfsd3_attrstat *); |
332 | int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *, | 332 | int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *, |
333 | struct nfsd3_fhandle_pair *); | 333 | struct nfsd3_fhandle_pair *); |
334 | int nfs3svc_encode_entry(struct readdir_cd *, const char *name, | 334 | int nfs3svc_encode_entry(void *, const char *name, |
335 | int namlen, loff_t offset, ino_t ino, | 335 | int namlen, loff_t offset, u64 ino, |
336 | unsigned int); | 336 | unsigned int); |
337 | int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, | 337 | int nfs3svc_encode_entry_plus(void *, const char *name, |
338 | int namlen, loff_t offset, ino_t ino, | 338 | int namlen, loff_t offset, u64 ino, |
339 | unsigned int); | 339 | unsigned int); |
340 | /* Helper functions for NFSv3 ACL code */ | 340 | /* Helper functions for NFSv3 ACL code */ |
341 | __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, | 341 | __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 45ca01b5f844..09799bcee0ac 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -44,6 +44,12 @@ | |||
44 | #define NFSD4_MAX_TAGLEN 128 | 44 | #define NFSD4_MAX_TAGLEN 128 |
45 | #define XDR_LEN(n) (((n) + 3) & ~3) | 45 | #define XDR_LEN(n) (((n) + 3) & ~3) |
46 | 46 | ||
47 | struct nfsd4_compound_state { | ||
48 | struct svc_fh current_fh; | ||
49 | struct svc_fh save_fh; | ||
50 | struct nfs4_stateowner *replay_owner; | ||
51 | }; | ||
52 | |||
47 | struct nfsd4_change_info { | 53 | struct nfsd4_change_info { |
48 | u32 atomic; | 54 | u32 atomic; |
49 | u32 before_ctime_sec; | 55 | u32 before_ctime_sec; |
@@ -430,35 +436,39 @@ __be32 nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
430 | struct dentry *dentry, __be32 *buffer, int *countp, | 436 | struct dentry *dentry, __be32 *buffer, int *countp, |
431 | u32 *bmval, struct svc_rqst *); | 437 | u32 *bmval, struct svc_rqst *); |
432 | extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp, | 438 | extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp, |
439 | struct nfsd4_compound_state *, | ||
433 | struct nfsd4_setclientid *setclid); | 440 | struct nfsd4_setclientid *setclid); |
434 | extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, | 441 | extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, |
442 | struct nfsd4_compound_state *, | ||
435 | struct nfsd4_setclientid_confirm *setclientid_confirm); | 443 | struct nfsd4_setclientid_confirm *setclientid_confirm); |
436 | extern __be32 nfsd4_process_open1(struct nfsd4_open *open); | 444 | extern __be32 nfsd4_process_open1(struct nfsd4_open *open); |
437 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, | 445 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, |
438 | struct svc_fh *current_fh, struct nfsd4_open *open); | 446 | struct svc_fh *current_fh, struct nfsd4_open *open); |
439 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, | 447 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, |
440 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, | 448 | struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc); |
441 | struct nfs4_stateowner **); | 449 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, |
442 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 450 | struct nfsd4_compound_state *, |
443 | struct nfsd4_close *close, | 451 | struct nfsd4_close *close); |
444 | struct nfs4_stateowner **replay_owner); | ||
445 | extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, | 452 | extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, |
446 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, | 453 | struct nfsd4_compound_state *, |
447 | struct nfs4_stateowner **replay_owner); | 454 | struct nfsd4_open_downgrade *od); |
448 | extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 455 | extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *, |
449 | struct nfsd4_lock *lock, | 456 | struct nfsd4_lock *lock); |
450 | struct nfs4_stateowner **replay_owner); | 457 | extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, |
451 | extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 458 | struct nfsd4_compound_state *, |
452 | struct nfsd4_lockt *lockt); | 459 | struct nfsd4_lockt *lockt); |
453 | extern __be32 nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 460 | extern __be32 nfsd4_locku(struct svc_rqst *rqstp, |
454 | struct nfsd4_locku *locku, | 461 | struct nfsd4_compound_state *, |
455 | struct nfs4_stateowner **replay_owner); | 462 | struct nfsd4_locku *locku); |
456 | extern __be32 | 463 | extern __be32 |
457 | nfsd4_release_lockowner(struct svc_rqst *rqstp, | 464 | nfsd4_release_lockowner(struct svc_rqst *rqstp, |
465 | struct nfsd4_compound_state *, | ||
458 | struct nfsd4_release_lockowner *rlockowner); | 466 | struct nfsd4_release_lockowner *rlockowner); |
459 | extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); | 467 | extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); |
460 | extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, | 468 | extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, |
461 | struct svc_fh *current_fh, struct nfsd4_delegreturn *dr); | 469 | struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr); |
470 | extern __be32 nfsd4_renew(struct svc_rqst *rqstp, | ||
471 | struct nfsd4_compound_state *, clientid_t *clid); | ||
462 | #endif | 472 | #endif |
463 | 473 | ||
464 | /* | 474 | /* |