aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-05-09 05:33:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:50 -0400
commit416351f28d2b31d15ff73e9aff699b2163704c95 (patch)
tree4b43838415b2cb95dfc66f9bc5fdb36b0f245e6c /fs/afs/internal.h
parentef71c15c46a053818f7e69098ebb052b31ffa56b (diff)
AFS: AFS fixups
Make some miscellaneous changes to the AFS filesystem: (1) Assert RCU barriers on module exit to make sure RCU has finished with callbacks in this module. (2) Correctly handle the AFS server returning a zero-length read. (3) Split out data zapping calls into one function (afs_zap_data). (4) Rename some afs_file_*() functions to afs_*() where they apply to non-regular files too. (5) Be consistent about the presentation of volume ID:vnode ID in debugging output. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index d90c158cd934..9feb5c59d8fc 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -433,10 +433,6 @@ extern const struct file_operations afs_file_operations;
433extern int afs_open(struct inode *, struct file *); 433extern int afs_open(struct inode *, struct file *);
434extern int afs_release(struct inode *, struct file *); 434extern int afs_release(struct inode *, struct file *);
435 435
436#ifdef AFS_CACHING_SUPPORT
437extern int afs_cache_get_page_cookie(struct page *, struct cachefs_page **);
438#endif
439
440/* 436/*
441 * fsclient.c 437 * fsclient.c
442 */ 438 */
@@ -474,10 +470,9 @@ extern int afs_fs_rename(struct afs_server *, struct key *,
474extern struct inode *afs_iget(struct super_block *, struct key *, 470extern struct inode *afs_iget(struct super_block *, struct key *,
475 struct afs_fid *, struct afs_file_status *, 471 struct afs_fid *, struct afs_file_status *,
476 struct afs_callback *); 472 struct afs_callback *);
473extern void afs_zap_data(struct afs_vnode *);
477extern int afs_validate(struct afs_vnode *, struct key *); 474extern int afs_validate(struct afs_vnode *, struct key *);
478extern int afs_inode_getattr(struct vfsmount *, struct dentry *, 475extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
479 struct kstat *);
480extern void afs_zap_permits(struct rcu_head *);
481extern void afs_clear_inode(struct inode *); 476extern void afs_clear_inode(struct inode *);
482 477
483/* 478/*
@@ -533,6 +528,7 @@ extern int afs_extract_data(struct afs_call *, struct sk_buff *, bool, void *,
533 */ 528 */
534extern void afs_clear_permits(struct afs_vnode *); 529extern void afs_clear_permits(struct afs_vnode *);
535extern void afs_cache_permit(struct afs_vnode *, struct key *, long); 530extern void afs_cache_permit(struct afs_vnode *, struct key *, long);
531extern void afs_zap_permits(struct rcu_head *);
536extern struct key *afs_request_key(struct afs_cell *); 532extern struct key *afs_request_key(struct afs_cell *);
537extern int afs_permission(struct inode *, int, struct nameidata *); 533extern int afs_permission(struct inode *, int, struct nameidata *);
538 534
@@ -726,6 +722,21 @@ do { \
726 } \ 722 } \
727} while(0) 723} while(0)
728 724
725#define ASSERTRANGE(L, OP1, N, OP2, H) \
726do { \
727 if (unlikely(!((L) OP1 (N)) || !((N) OP2 (H)))) { \
728 printk(KERN_ERR "\n"); \
729 printk(KERN_ERR "AFS: Assertion failed\n"); \
730 printk(KERN_ERR "%lu "#OP1" %lu "#OP2" %lu is false\n", \
731 (unsigned long)(L), (unsigned long)(N), \
732 (unsigned long)(H)); \
733 printk(KERN_ERR "0x%lx "#OP1" 0x%lx "#OP2" 0x%lx is false\n", \
734 (unsigned long)(L), (unsigned long)(N), \
735 (unsigned long)(H)); \
736 BUG(); \
737 } \
738} while(0)
739
729#define ASSERTIF(C, X) \ 740#define ASSERTIF(C, X) \
730do { \ 741do { \
731 if (unlikely((C) && !(X))) { \ 742 if (unlikely((C) && !(X))) { \
@@ -758,6 +769,10 @@ do { \
758do { \ 769do { \
759} while(0) 770} while(0)
760 771
772#define ASSERTRANGE(L, OP1, N, OP2, H) \
773do { \
774} while(0)
775
761#define ASSERTIF(C, X) \ 776#define ASSERTIF(C, X) \
762do { \ 777do { \
763} while(0) 778} while(0)