diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-10-01 18:43:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-01 19:11:11 -0400 |
commit | 828c09509b9695271bcbdc53e9fc9a6a737148d2 (patch) | |
tree | 072ffad6f02db7bf4095e07e2b90247cfa042998 /fs | |
parent | 1c4115e595dec42aa0e81ba47ef46e35b34ed428 (diff) |
const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.h | 2 | ||||
-rw-r--r-- | fs/btrfs/file.c | 2 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 4 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfsctl.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/dir.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/file.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/mdt.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/nilfs.h | 4 | ||||
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/netdebug.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdebug.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 2 | ||||
-rw-r--r-- | fs/omfs/dir.c | 2 | ||||
-rw-r--r-- | fs/omfs/file.c | 2 | ||||
-rw-r--r-- | fs/omfs/omfs.h | 4 |
16 files changed, 23 insertions, 23 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 80599b4e42bd..4484eb3408af 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2326,7 +2326,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync); | |||
2326 | int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, | 2326 | int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, |
2327 | int skip_pinned); | 2327 | int skip_pinned); |
2328 | int btrfs_check_file(struct btrfs_root *root, struct inode *inode); | 2328 | int btrfs_check_file(struct btrfs_root *root, struct inode *inode); |
2329 | extern struct file_operations btrfs_file_operations; | 2329 | extern const struct file_operations btrfs_file_operations; |
2330 | int btrfs_drop_extents(struct btrfs_trans_handle *trans, | 2330 | int btrfs_drop_extents(struct btrfs_trans_handle *trans, |
2331 | struct btrfs_root *root, struct inode *inode, | 2331 | struct btrfs_root *root, struct inode *inode, |
2332 | u64 start, u64 end, u64 locked_end, | 2332 | u64 start, u64 end, u64 locked_end, |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index a3492a3ad96b..9ed17dbe5c6e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1196,7 +1196,7 @@ static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1196 | return 0; | 1196 | return 0; |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | struct file_operations btrfs_file_operations = { | 1199 | const struct file_operations btrfs_file_operations = { |
1200 | .llseek = generic_file_llseek, | 1200 | .llseek = generic_file_llseek, |
1201 | .read = do_sync_read, | 1201 | .read = do_sync_read, |
1202 | .aio_read = generic_file_aio_read, | 1202 | .aio_read = generic_file_aio_read, |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e9b76bcd1c12..b9fe06d751c0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -62,7 +62,7 @@ static const struct inode_operations btrfs_special_inode_operations; | |||
62 | static const struct inode_operations btrfs_file_inode_operations; | 62 | static const struct inode_operations btrfs_file_inode_operations; |
63 | static const struct address_space_operations btrfs_aops; | 63 | static const struct address_space_operations btrfs_aops; |
64 | static const struct address_space_operations btrfs_symlink_aops; | 64 | static const struct address_space_operations btrfs_symlink_aops; |
65 | static struct file_operations btrfs_dir_file_operations; | 65 | static const struct file_operations btrfs_dir_file_operations; |
66 | static struct extent_io_ops btrfs_extent_io_ops; | 66 | static struct extent_io_ops btrfs_extent_io_ops; |
67 | 67 | ||
68 | static struct kmem_cache *btrfs_inode_cachep; | 68 | static struct kmem_cache *btrfs_inode_cachep; |
@@ -5544,7 +5544,7 @@ static const struct inode_operations btrfs_dir_ro_inode_operations = { | |||
5544 | .permission = btrfs_permission, | 5544 | .permission = btrfs_permission, |
5545 | }; | 5545 | }; |
5546 | 5546 | ||
5547 | static struct file_operations btrfs_dir_file_operations = { | 5547 | static const struct file_operations btrfs_dir_file_operations = { |
5548 | .llseek = generic_file_llseek, | 5548 | .llseek = generic_file_llseek, |
5549 | .read = generic_read_dir, | 5549 | .read = generic_read_dir, |
5550 | .readdir = btrfs_real_readdir, | 5550 | .readdir = btrfs_real_readdir, |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 761af77491f5..b0ab5219becb 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -770,7 +770,7 @@ static int jbd2_seq_info_release(struct inode *inode, struct file *file) | |||
770 | return seq_release(inode, file); | 770 | return seq_release(inode, file); |
771 | } | 771 | } |
772 | 772 | ||
773 | static struct file_operations jbd2_seq_info_fops = { | 773 | static const struct file_operations jbd2_seq_info_fops = { |
774 | .owner = THIS_MODULE, | 774 | .owner = THIS_MODULE, |
775 | .open = jbd2_seq_info_open, | 775 | .open = jbd2_seq_info_open, |
776 | .read = seq_read, | 776 | .read = seq_read, |
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 00388d2a3c99..5c01fc148ce8 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -176,7 +176,7 @@ static const struct file_operations exports_operations = { | |||
176 | extern int nfsd_pool_stats_open(struct inode *inode, struct file *file); | 176 | extern int nfsd_pool_stats_open(struct inode *inode, struct file *file); |
177 | extern int nfsd_pool_stats_release(struct inode *inode, struct file *file); | 177 | extern int nfsd_pool_stats_release(struct inode *inode, struct file *file); |
178 | 178 | ||
179 | static struct file_operations pool_stats_operations = { | 179 | static const struct file_operations pool_stats_operations = { |
180 | .open = nfsd_pool_stats_open, | 180 | .open = nfsd_pool_stats_open, |
181 | .read = seq_read, | 181 | .read = seq_read, |
182 | .llseek = seq_lseek, | 182 | .llseek = seq_lseek, |
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index 1a4fa04cf071..e097099bfc8f 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c | |||
@@ -697,7 +697,7 @@ not_empty: | |||
697 | return 0; | 697 | return 0; |
698 | } | 698 | } |
699 | 699 | ||
700 | struct file_operations nilfs_dir_operations = { | 700 | const struct file_operations nilfs_dir_operations = { |
701 | .llseek = generic_file_llseek, | 701 | .llseek = generic_file_llseek, |
702 | .read = generic_read_dir, | 702 | .read = generic_read_dir, |
703 | .readdir = nilfs_readdir, | 703 | .readdir = nilfs_readdir, |
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c index 7d7b4983dee3..30292df443ce 100644 --- a/fs/nilfs2/file.c +++ b/fs/nilfs2/file.c | |||
@@ -134,7 +134,7 @@ static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
134 | * We have mostly NULL's here: the current defaults are ok for | 134 | * We have mostly NULL's here: the current defaults are ok for |
135 | * the nilfs filesystem. | 135 | * the nilfs filesystem. |
136 | */ | 136 | */ |
137 | struct file_operations nilfs_file_operations = { | 137 | const struct file_operations nilfs_file_operations = { |
138 | .llseek = generic_file_llseek, | 138 | .llseek = generic_file_llseek, |
139 | .read = do_sync_read, | 139 | .read = do_sync_read, |
140 | .write = do_sync_write, | 140 | .write = do_sync_write, |
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index b18c4998f8d0..f6326112d647 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -433,7 +433,7 @@ static const struct address_space_operations def_mdt_aops = { | |||
433 | }; | 433 | }; |
434 | 434 | ||
435 | static const struct inode_operations def_mdt_iops; | 435 | static const struct inode_operations def_mdt_iops; |
436 | static struct file_operations def_mdt_fops; | 436 | static const struct file_operations def_mdt_fops; |
437 | 437 | ||
438 | /* | 438 | /* |
439 | * NILFS2 uses pseudo inodes for meta data files such as DAT, cpfile, sufile, | 439 | * NILFS2 uses pseudo inodes for meta data files such as DAT, cpfile, sufile, |
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index bad7368782d0..4da6f67e9a91 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -294,9 +294,9 @@ void nilfs_clear_gcdat_inode(struct the_nilfs *); | |||
294 | /* | 294 | /* |
295 | * Inodes and files operations | 295 | * Inodes and files operations |
296 | */ | 296 | */ |
297 | extern struct file_operations nilfs_dir_operations; | 297 | extern const struct file_operations nilfs_dir_operations; |
298 | extern const struct inode_operations nilfs_file_inode_operations; | 298 | extern const struct inode_operations nilfs_file_inode_operations; |
299 | extern struct file_operations nilfs_file_operations; | 299 | extern const struct file_operations nilfs_file_operations; |
300 | extern const struct address_space_operations nilfs_aops; | 300 | extern const struct address_space_operations nilfs_aops; |
301 | extern const struct inode_operations nilfs_dir_inode_operations; | 301 | extern const struct inode_operations nilfs_dir_inode_operations; |
302 | extern const struct inode_operations nilfs_special_inode_operations; | 302 | extern const struct inode_operations nilfs_special_inode_operations; |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 09cc25d04611..c452d116b892 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -966,7 +966,7 @@ static ssize_t o2hb_debug_read(struct file *file, char __user *buf, | |||
966 | } | 966 | } |
967 | #endif /* CONFIG_DEBUG_FS */ | 967 | #endif /* CONFIG_DEBUG_FS */ |
968 | 968 | ||
969 | static struct file_operations o2hb_debug_fops = { | 969 | static const struct file_operations o2hb_debug_fops = { |
970 | .open = o2hb_debug_open, | 970 | .open = o2hb_debug_open, |
971 | .release = o2hb_debug_release, | 971 | .release = o2hb_debug_release, |
972 | .read = o2hb_debug_read, | 972 | .read = o2hb_debug_read, |
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index cfb2be708abe..da794bc07a6c 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c | |||
@@ -207,7 +207,7 @@ static int nst_fop_release(struct inode *inode, struct file *file) | |||
207 | return seq_release_private(inode, file); | 207 | return seq_release_private(inode, file); |
208 | } | 208 | } |
209 | 209 | ||
210 | static struct file_operations nst_seq_fops = { | 210 | static const struct file_operations nst_seq_fops = { |
211 | .open = nst_fop_open, | 211 | .open = nst_fop_open, |
212 | .read = seq_read, | 212 | .read = seq_read, |
213 | .llseek = seq_lseek, | 213 | .llseek = seq_lseek, |
@@ -388,7 +388,7 @@ static int sc_fop_release(struct inode *inode, struct file *file) | |||
388 | return seq_release_private(inode, file); | 388 | return seq_release_private(inode, file); |
389 | } | 389 | } |
390 | 390 | ||
391 | static struct file_operations sc_seq_fops = { | 391 | static const struct file_operations sc_seq_fops = { |
392 | .open = sc_fop_open, | 392 | .open = sc_fop_open, |
393 | .read = seq_read, | 393 | .read = seq_read, |
394 | .llseek = seq_lseek, | 394 | .llseek = seq_lseek, |
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index ca46002ec10e..42b0bad7a612 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c | |||
@@ -478,7 +478,7 @@ bail: | |||
478 | return -ENOMEM; | 478 | return -ENOMEM; |
479 | } | 479 | } |
480 | 480 | ||
481 | static struct file_operations debug_purgelist_fops = { | 481 | static const struct file_operations debug_purgelist_fops = { |
482 | .open = debug_purgelist_open, | 482 | .open = debug_purgelist_open, |
483 | .release = debug_buffer_release, | 483 | .release = debug_buffer_release, |
484 | .read = debug_buffer_read, | 484 | .read = debug_buffer_read, |
@@ -538,7 +538,7 @@ bail: | |||
538 | return -ENOMEM; | 538 | return -ENOMEM; |
539 | } | 539 | } |
540 | 540 | ||
541 | static struct file_operations debug_mle_fops = { | 541 | static const struct file_operations debug_mle_fops = { |
542 | .open = debug_mle_open, | 542 | .open = debug_mle_open, |
543 | .release = debug_buffer_release, | 543 | .release = debug_buffer_release, |
544 | .read = debug_buffer_read, | 544 | .read = debug_buffer_read, |
@@ -741,7 +741,7 @@ static int debug_lockres_release(struct inode *inode, struct file *file) | |||
741 | return seq_release_private(inode, file); | 741 | return seq_release_private(inode, file); |
742 | } | 742 | } |
743 | 743 | ||
744 | static struct file_operations debug_lockres_fops = { | 744 | static const struct file_operations debug_lockres_fops = { |
745 | .open = debug_lockres_open, | 745 | .open = debug_lockres_open, |
746 | .release = debug_lockres_release, | 746 | .release = debug_lockres_release, |
747 | .read = seq_read, | 747 | .read = seq_read, |
@@ -925,7 +925,7 @@ bail: | |||
925 | return -ENOMEM; | 925 | return -ENOMEM; |
926 | } | 926 | } |
927 | 927 | ||
928 | static struct file_operations debug_state_fops = { | 928 | static const struct file_operations debug_state_fops = { |
929 | .open = debug_state_open, | 929 | .open = debug_state_open, |
930 | .release = debug_buffer_release, | 930 | .release = debug_buffer_release, |
931 | .read = debug_buffer_read, | 931 | .read = debug_buffer_read, |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 4cc3c890a2cd..c0e48aeebb1c 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -373,7 +373,7 @@ static ssize_t ocfs2_debug_read(struct file *file, char __user *buf, | |||
373 | } | 373 | } |
374 | #endif /* CONFIG_DEBUG_FS */ | 374 | #endif /* CONFIG_DEBUG_FS */ |
375 | 375 | ||
376 | static struct file_operations ocfs2_osb_debug_fops = { | 376 | static const struct file_operations ocfs2_osb_debug_fops = { |
377 | .open = ocfs2_osb_debug_open, | 377 | .open = ocfs2_osb_debug_open, |
378 | .release = ocfs2_debug_release, | 378 | .release = ocfs2_debug_release, |
379 | .read = ocfs2_debug_read, | 379 | .read = ocfs2_debug_read, |
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c index 3680bae335b5..b42d62419034 100644 --- a/fs/omfs/dir.c +++ b/fs/omfs/dir.c | |||
@@ -498,7 +498,7 @@ const struct inode_operations omfs_dir_inops = { | |||
498 | .rmdir = omfs_rmdir, | 498 | .rmdir = omfs_rmdir, |
499 | }; | 499 | }; |
500 | 500 | ||
501 | struct file_operations omfs_dir_operations = { | 501 | const struct file_operations omfs_dir_operations = { |
502 | .read = generic_read_dir, | 502 | .read = generic_read_dir, |
503 | .readdir = omfs_readdir, | 503 | .readdir = omfs_readdir, |
504 | .llseek = generic_file_llseek, | 504 | .llseek = generic_file_llseek, |
diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 4845fbb18e6e..399487c09364 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c | |||
@@ -322,7 +322,7 @@ static sector_t omfs_bmap(struct address_space *mapping, sector_t block) | |||
322 | return generic_block_bmap(mapping, block, omfs_get_block); | 322 | return generic_block_bmap(mapping, block, omfs_get_block); |
323 | } | 323 | } |
324 | 324 | ||
325 | struct file_operations omfs_file_operations = { | 325 | const struct file_operations omfs_file_operations = { |
326 | .llseek = generic_file_llseek, | 326 | .llseek = generic_file_llseek, |
327 | .read = do_sync_read, | 327 | .read = do_sync_read, |
328 | .write = do_sync_write, | 328 | .write = do_sync_write, |
diff --git a/fs/omfs/omfs.h b/fs/omfs/omfs.h index df71039945ac..ebe2fdbe535e 100644 --- a/fs/omfs/omfs.h +++ b/fs/omfs/omfs.h | |||
@@ -44,14 +44,14 @@ extern int omfs_allocate_range(struct super_block *sb, int min_request, | |||
44 | extern int omfs_clear_range(struct super_block *sb, u64 block, int count); | 44 | extern int omfs_clear_range(struct super_block *sb, u64 block, int count); |
45 | 45 | ||
46 | /* dir.c */ | 46 | /* dir.c */ |
47 | extern struct file_operations omfs_dir_operations; | 47 | extern const struct file_operations omfs_dir_operations; |
48 | extern const struct inode_operations omfs_dir_inops; | 48 | extern const struct inode_operations omfs_dir_inops; |
49 | extern int omfs_make_empty(struct inode *inode, struct super_block *sb); | 49 | extern int omfs_make_empty(struct inode *inode, struct super_block *sb); |
50 | extern int omfs_is_bad(struct omfs_sb_info *sbi, struct omfs_header *header, | 50 | extern int omfs_is_bad(struct omfs_sb_info *sbi, struct omfs_header *header, |
51 | u64 fsblock); | 51 | u64 fsblock); |
52 | 52 | ||
53 | /* file.c */ | 53 | /* file.c */ |
54 | extern struct file_operations omfs_file_operations; | 54 | extern const struct file_operations omfs_file_operations; |
55 | extern const struct inode_operations omfs_file_inops; | 55 | extern const struct inode_operations omfs_file_inops; |
56 | extern const struct address_space_operations omfs_aops; | 56 | extern const struct address_space_operations omfs_aops; |
57 | extern void omfs_make_empty_table(struct buffer_head *bh, int offset); | 57 | extern void omfs_make_empty_table(struct buffer_head *bh, int offset); |