Export flush_dcache_page to modules.
[linux-2.6/linux-mips.git] / fs / afs / internal.h
blob9f0928f8c41a5fcacd5665df433dda7c28009f3d
1 /* internal.h: internal AFS stuff
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #ifndef AFS_INTERNAL_H
13 #define AFS_INTERNAL_H
15 #include <linux/version.h>
16 #include <linux/compiler.h>
17 #include <linux/kernel.h>
18 #include <linux/fs.h>
19 #include <linux/pagemap.h>
22 * debug tracing
24 #define kenter(FMT, a...) printk("==> %s("FMT")\n",__FUNCTION__ , ## a)
25 #define kleave(FMT, a...) printk("<== %s()"FMT"\n",__FUNCTION__ , ## a)
26 #define kdebug(FMT, a...) printk(FMT"\n" , ## a)
27 #define kproto(FMT, a...) printk("### "FMT"\n" , ## a)
28 #define knet(FMT, a...) printk(FMT"\n" , ## a)
30 #if 0
31 #define _enter(FMT, a...) kenter(FMT , ## a)
32 #define _leave(FMT, a...) kleave(FMT , ## a)
33 #define _debug(FMT, a...) kdebug(FMT , ## a)
34 #define _proto(FMT, a...) kproto(FMT , ## a)
35 #define _net(FMT, a...) knet(FMT , ## a)
36 #else
37 #define _enter(FMT, a...) do { } while(0)
38 #define _leave(FMT, a...) do { } while(0)
39 #define _debug(FMT, a...) do { } while(0)
40 #define _proto(FMT, a...) do { } while(0)
41 #define _net(FMT, a...) do { } while(0)
42 #endif
44 static inline void afs_discard_my_signals(void)
46 while (signal_pending(current)) {
47 siginfo_t sinfo;
49 spin_lock_irq(&current->sighand->siglock);
50 dequeue_signal(current,&current->blocked,&sinfo);
51 spin_unlock_irq(&current->sighand->siglock);
56 * cell.c
58 extern struct rw_semaphore afs_proc_cells_sem;
59 extern struct list_head afs_proc_cells;
62 * dir.c
64 extern struct inode_operations afs_dir_inode_operations;
65 extern struct file_operations afs_dir_file_operations;
68 * file.c
70 extern struct address_space_operations afs_fs_aops;
71 extern struct inode_operations afs_file_inode_operations;
72 extern struct file_operations afs_file_file_operations;
75 * inode.c
77 extern int afs_iget(struct super_block *sb, afs_fid_t *fid, struct inode **_inode);
78 extern int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
79 extern void afs_clear_inode(struct inode *inode);
82 * mntpt.c
84 extern struct inode_operations afs_mntpt_inode_operations;
85 extern struct file_operations afs_mntpt_file_operations;
87 extern int afs_mntpt_check_symlink(afs_vnode_t *vnode);
90 * super.c
92 extern int afs_fs_init(void);
93 extern void afs_fs_exit(void);
95 #define AFS_CB_HASH_COUNT (PAGE_SIZE/sizeof(struct list_head))
97 extern struct list_head afs_cb_hash_tbl[];
98 extern spinlock_t afs_cb_hash_lock;
100 #define afs_cb_hash(SRV,FID) \
101 afs_cb_hash_tbl[((unsigned long)(SRV) + (FID)->vid + (FID)->vnode + (FID)->unique) % \
102 AFS_CB_HASH_COUNT]
105 * proc.c
107 extern int afs_proc_init(void);
108 extern void afs_proc_cleanup(void);
109 extern int afs_proc_cell_setup(afs_cell_t *cell);
110 extern void afs_proc_cell_remove(afs_cell_t *cell);
112 #endif /* AFS_INTERNAL_H */