diff options
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/cache.c | 2 | ||||
-rw-r--r-- | fs/coda/cnode.c | 3 | ||||
-rw-r--r-- | fs/coda/coda_int.h | 13 | ||||
-rw-r--r-- | fs/coda/dir.c | 5 | ||||
-rw-r--r-- | fs/coda/file.c | 4 | ||||
-rw-r--r-- | fs/coda/inode.c | 4 | ||||
-rw-r--r-- | fs/coda/pioctl.c | 2 | ||||
-rw-r--r-- | fs/coda/psdev.c | 11 |
8 files changed, 28 insertions, 16 deletions
diff --git a/fs/coda/cache.c b/fs/coda/cache.c index c607d923350a..5d0527133266 100644 --- a/fs/coda/cache.c +++ b/fs/coda/cache.c | |||
@@ -51,7 +51,7 @@ void coda_cache_clear_all(struct super_block *sb) | |||
51 | struct coda_sb_info *sbi; | 51 | struct coda_sb_info *sbi; |
52 | 52 | ||
53 | sbi = coda_sbp(sb); | 53 | sbi = coda_sbp(sb); |
54 | if (!sbi) BUG(); | 54 | BUG_ON(!sbi); |
55 | 55 | ||
56 | atomic_inc(&permission_epoch); | 56 | atomic_inc(&permission_epoch); |
57 | } | 57 | } |
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 23aeef5aa814..4c9fecbfa91f 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c | |||
@@ -120,8 +120,7 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, | |||
120 | 120 | ||
121 | cii = ITOC(inode); | 121 | cii = ITOC(inode); |
122 | 122 | ||
123 | if (!coda_fideq(&cii->c_fid, oldfid)) | 123 | BUG_ON(!coda_fideq(&cii->c_fid, oldfid)); |
124 | BUG(); | ||
125 | 124 | ||
126 | /* replace fid and rehash inode */ | 125 | /* replace fid and rehash inode */ |
127 | /* XXX we probably need to hold some lock here! */ | 126 | /* XXX we probably need to hold some lock here! */ |
diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h new file mode 100644 index 000000000000..9e6338fea514 --- /dev/null +++ b/fs/coda/coda_int.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _CODA_INT_ | ||
2 | #define _CODA_INT_ | ||
3 | |||
4 | extern struct file_system_type coda_fs_type; | ||
5 | |||
6 | void coda_destroy_inodecache(void); | ||
7 | int coda_init_inodecache(void); | ||
8 | int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, | ||
9 | int datasync); | ||
10 | |||
11 | #endif /* _CODA_INT_ */ | ||
12 | |||
13 | |||
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 8f1a517f8b4e..71f2ea632e53 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/coda_cache.h> | 27 | #include <linux/coda_cache.h> |
28 | #include <linux/coda_proc.h> | 28 | #include <linux/coda_proc.h> |
29 | 29 | ||
30 | #include "coda_int.h" | ||
31 | |||
30 | /* dir inode-ops */ | 32 | /* dir inode-ops */ |
31 | static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd); | 33 | static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd); |
32 | static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); | 34 | static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); |
@@ -50,7 +52,6 @@ static int coda_dentry_delete(struct dentry *); | |||
50 | /* support routines */ | 52 | /* support routines */ |
51 | static int coda_venus_readdir(struct file *filp, filldir_t filldir, | 53 | static int coda_venus_readdir(struct file *filp, filldir_t filldir, |
52 | void *dirent, struct dentry *dir); | 54 | void *dirent, struct dentry *dir); |
53 | int coda_fsync(struct file *, struct dentry *dentry, int datasync); | ||
54 | 55 | ||
55 | /* same as fs/bad_inode.c */ | 56 | /* same as fs/bad_inode.c */ |
56 | static int coda_return_EIO(void) | 57 | static int coda_return_EIO(void) |
@@ -81,7 +82,7 @@ struct inode_operations coda_dir_inode_operations = | |||
81 | .setattr = coda_setattr, | 82 | .setattr = coda_setattr, |
82 | }; | 83 | }; |
83 | 84 | ||
84 | struct file_operations coda_dir_operations = { | 85 | const struct file_operations coda_dir_operations = { |
85 | .llseek = generic_file_llseek, | 86 | .llseek = generic_file_llseek, |
86 | .read = generic_read_dir, | 87 | .read = generic_read_dir, |
87 | .readdir = coda_readdir, | 88 | .readdir = coda_readdir, |
diff --git a/fs/coda/file.c b/fs/coda/file.c index 30b4630bd735..7c2642431fa5 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/coda_psdev.h> | 24 | #include <linux/coda_psdev.h> |
25 | #include <linux/coda_proc.h> | 25 | #include <linux/coda_proc.h> |
26 | 26 | ||
27 | #include "coda_int.h" | ||
28 | |||
27 | /* if CODA_STORE fails with EOPNOTSUPP, venus clearly doesn't support | 29 | /* if CODA_STORE fails with EOPNOTSUPP, venus clearly doesn't support |
28 | * CODA_STORE/CODA_RELEASE and we fall back on using the CODA_CLOSE upcall */ | 30 | * CODA_STORE/CODA_RELEASE and we fall back on using the CODA_CLOSE upcall */ |
29 | static int use_coda_close; | 31 | static int use_coda_close; |
@@ -286,7 +288,7 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | |||
286 | return err; | 288 | return err; |
287 | } | 289 | } |
288 | 290 | ||
289 | struct file_operations coda_file_operations = { | 291 | const struct file_operations coda_file_operations = { |
290 | .llseek = generic_file_llseek, | 292 | .llseek = generic_file_llseek, |
291 | .read = coda_file_read, | 293 | .read = coda_file_read, |
292 | .write = coda_file_write, | 294 | .write = coda_file_write, |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 04a73fb4848f..ada1a81df6bd 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/coda_fs_i.h> | 31 | #include <linux/coda_fs_i.h> |
32 | #include <linux/coda_cache.h> | 32 | #include <linux/coda_cache.h> |
33 | 33 | ||
34 | #include "coda_int.h" | ||
35 | |||
34 | /* VFS super_block ops */ | 36 | /* VFS super_block ops */ |
35 | static void coda_clear_inode(struct inode *); | 37 | static void coda_clear_inode(struct inode *); |
36 | static void coda_put_super(struct super_block *); | 38 | static void coda_put_super(struct super_block *); |
@@ -69,7 +71,7 @@ int coda_init_inodecache(void) | |||
69 | { | 71 | { |
70 | coda_inode_cachep = kmem_cache_create("coda_inode_cache", | 72 | coda_inode_cachep = kmem_cache_create("coda_inode_cache", |
71 | sizeof(struct coda_inode_info), | 73 | sizeof(struct coda_inode_info), |
72 | 0, SLAB_RECLAIM_ACCOUNT, | 74 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
73 | init_once, NULL); | 75 | init_once, NULL); |
74 | if (coda_inode_cachep == NULL) | 76 | if (coda_inode_cachep == NULL) |
75 | return -ENOMEM; | 77 | return -ENOMEM; |
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c index 127714936c66..214822be87bd 100644 --- a/fs/coda/pioctl.c +++ b/fs/coda/pioctl.c | |||
@@ -36,7 +36,7 @@ struct inode_operations coda_ioctl_inode_operations = | |||
36 | .setattr = coda_setattr, | 36 | .setattr = coda_setattr, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct file_operations coda_ioctl_operations = { | 39 | const struct file_operations coda_ioctl_operations = { |
40 | .owner = THIS_MODULE, | 40 | .owner = THIS_MODULE, |
41 | .ioctl = coda_pioctl, | 41 | .ioctl = coda_pioctl, |
42 | }; | 42 | }; |
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 6a3df88accfe..6c6771db36da 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -48,12 +48,9 @@ | |||
48 | #include <linux/coda_psdev.h> | 48 | #include <linux/coda_psdev.h> |
49 | #include <linux/coda_proc.h> | 49 | #include <linux/coda_proc.h> |
50 | 50 | ||
51 | #define upc_free(r) kfree(r) | 51 | #include "coda_int.h" |
52 | 52 | ||
53 | /* | 53 | #define upc_free(r) kfree(r) |
54 | * Coda stuff | ||
55 | */ | ||
56 | extern struct file_system_type coda_fs_type; | ||
57 | 54 | ||
58 | /* statistics */ | 55 | /* statistics */ |
59 | int coda_hard; /* allows signals during upcalls */ | 56 | int coda_hard; /* allows signals during upcalls */ |
@@ -345,7 +342,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) | |||
345 | } | 342 | } |
346 | 343 | ||
347 | 344 | ||
348 | static struct file_operations coda_psdev_fops = { | 345 | static const struct file_operations coda_psdev_fops = { |
349 | .owner = THIS_MODULE, | 346 | .owner = THIS_MODULE, |
350 | .read = coda_psdev_read, | 347 | .read = coda_psdev_read, |
351 | .write = coda_psdev_write, | 348 | .write = coda_psdev_write, |
@@ -394,8 +391,6 @@ out: | |||
394 | MODULE_AUTHOR("Peter J. Braam <braam@cs.cmu.edu>"); | 391 | MODULE_AUTHOR("Peter J. Braam <braam@cs.cmu.edu>"); |
395 | MODULE_LICENSE("GPL"); | 392 | MODULE_LICENSE("GPL"); |
396 | 393 | ||
397 | extern int coda_init_inodecache(void); | ||
398 | extern void coda_destroy_inodecache(void); | ||
399 | static int __init init_coda(void) | 394 | static int __init init_coda(void) |
400 | { | 395 | { |
401 | int status; | 396 | int status; |