diff -u linux-2.4.37.4/arch/i386/kernel/apm.c linux-2.4.37.4/arch/i386/kernel/apm.c --- linux-2.4.37.4/arch/i386/kernel/apm.c 2009-07-26 20:36:22.839506837 -0400 +++ linux-2.4.37.4/arch/i386/kernel/apm.c 2009-07-26 12:41:45.631706848 -0400 @@ -1883,7 +1883,7 @@ __setup("apm=", apm_setup); #endif -static struct file_operations apm_bios_fops = { +static const struct file_operations apm_bios_fops = { owner: THIS_MODULE, read: do_read, poll: do_poll, diff -u linux-2.4.37.4/arch/i386/kernel/setup.c linux-2.4.37.4/arch/i386/kernel/setup.c --- linux-2.4.37.4/arch/i386/kernel/setup.c 2009-07-26 20:36:22.850110915 -0400 +++ linux-2.4.37.4/arch/i386/kernel/setup.c 2009-07-26 12:42:24.843368051 -0400 @@ -3168,7 +3168,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, diff -u linux-2.4.37.4/arch/ia64/ia32/binfmt_elf32.c linux-2.4.37.4/arch/ia64/ia32/binfmt_elf32.c --- linux-2.4.37.4/arch/ia64/ia32/binfmt_elf32.c 2009-07-26 20:36:22.856832674 -0400 +++ linux-2.4.37.4/arch/ia64/ia32/binfmt_elf32.c 2009-07-26 12:42:07.625422989 -0400 @@ -75,7 +75,7 @@ return pg; } -static struct vm_operations_struct ia32_shared_page_vm_ops = { +static const struct vm_operations_struct ia32_shared_page_vm_ops = { .nopage =ia32_install_shared_page }; diff -u linux-2.4.37.4/arch/ppc/mm/fault.c linux-2.4.37.4/arch/ppc/mm/fault.c --- linux-2.4.37.4/arch/ppc/mm/fault.c 2009-07-26 20:36:22.863801099 -0400 +++ linux-2.4.37.4/arch/ppc/mm/fault.c 2009-07-26 12:42:07.637469535 -0400 @@ -78,7 +78,7 @@ return page; } -static struct vm_operations_struct pax_vm_ops = { +static const struct vm_operations_struct pax_vm_ops = { .close = pax_syscall_close, .nopage = pax_syscall_nopage, }; diff -u linux-2.4.37.4/arch/sparc/mm/fault.c linux-2.4.37.4/arch/sparc/mm/fault.c --- linux-2.4.37.4/arch/sparc/mm/fault.c 2009-07-26 20:36:22.867091749 -0400 +++ linux-2.4.37.4/arch/sparc/mm/fault.c 2009-07-26 12:42:07.649202779 -0400 @@ -245,7 +245,7 @@ return page; } -static struct vm_operations_struct pax_vm_ops = { +static const struct vm_operations_struct pax_vm_ops = { .close = pax_emuplt_close, .nopage = pax_emuplt_nopage, }; diff -u linux-2.4.37.4/arch/sparc64/mm/fault.c linux-2.4.37.4/arch/sparc64/mm/fault.c --- linux-2.4.37.4/arch/sparc64/mm/fault.c 2009-07-26 20:36:22.870641498 -0400 +++ linux-2.4.37.4/arch/sparc64/mm/fault.c 2009-07-26 12:42:07.641393188 -0400 @@ -333,7 +333,7 @@ return page; } -static struct vm_operations_struct pax_vm_ops = { +static const struct vm_operations_struct pax_vm_ops = { .close = pax_emuplt_close, .nopage = pax_emuplt_nopage, }; diff -u linux-2.4.37.4/arch/x86_64/kernel/mtrr.c linux-2.4.37.4/arch/x86_64/kernel/mtrr.c --- linux-2.4.37.4/arch/x86_64/kernel/mtrr.c 2009-07-26 20:36:22.873983678 -0400 +++ linux-2.4.37.4/arch/x86_64/kernel/mtrr.c 2009-07-26 12:41:45.879813286 -0400 @@ -1211,7 +1211,7 @@ } -static struct file_operations mtrr_fops = { +static const struct file_operations mtrr_fops = { owner: THIS_MODULE, read: mtrr_read, write: mtrr_write, diff -u linux-2.4.37.4/drivers/char/mem.c linux-2.4.37.4/drivers/char/mem.c --- linux-2.4.37.4/drivers/char/mem.c 2009-07-26 20:36:22.890685274 -0400 +++ linux-2.4.37.4/drivers/char/mem.c 2009-07-26 13:19:34.686523375 -0400 @@ -620,7 +620,7 @@ return page; } -struct vm_operations_struct kmem_vm_ops = { +const struct vm_operations_struct kmem_vm_ops = { nopage: kmem_vm_nopage, }; @@ -671,7 +671,7 @@ #define read_full read_zero #define open_kmem open_mem -static struct file_operations mem_fops = { +static const struct file_operations mem_fops = { llseek: memory_lseek, read: read_mem, write: write_mem, @@ -679,7 +679,7 @@ open: open_mem, }; -static struct file_operations kmem_fops = { +static const struct file_operations kmem_fops = { llseek: memory_lseek, read: read_kmem, write: write_kmem, @@ -687,14 +687,14 @@ open: open_kmem, }; -static struct file_operations null_fops = { +static const struct file_operations null_fops = { llseek: null_lseek, read: read_null, write: write_null, }; #if defined(CONFIG_ISA) || !defined(__mc68000__) -static struct file_operations port_fops = { +static const struct file_operations port_fops = { llseek: memory_lseek, read: read_port, write: write_port, @@ -702,14 +702,14 @@ }; #endif -static struct file_operations zero_fops = { +static const struct file_operations zero_fops = { llseek: zero_lseek, read: read_zero, write: write_zero, mmap: mmap_zero, }; -static struct file_operations full_fops = { +static const struct file_operations full_fops = { llseek: full_lseek, read: read_full, write: write_full, @@ -764,7 +764,7 @@ unsigned short minor; char *name; umode_t mode; - struct file_operations *fops; + const struct file_operations *fops; } list[] = { /* list of minor devices */ {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, @@ -789,7 +789,7 @@ list[i].fops, NULL); } -static struct file_operations memory_fops = { +static const struct file_operations memory_fops = { open: memory_open, /* just a selector for the real open */ }; diff -u linux-2.4.37.4/drivers/char/random.c linux-2.4.37.4/drivers/char/random.c --- linux-2.4.37.4/drivers/char/random.c 2009-07-26 20:36:22.894084404 -0400 +++ linux-2.4.37.4/drivers/char/random.c 2009-07-26 12:41:46.262150742 -0400 @@ -1705,14 +1705,14 @@ } } -struct file_operations random_fops = { +const struct file_operations random_fops = { read: random_read, write: random_write, poll: random_poll, ioctl: random_ioctl, }; -struct file_operations urandom_fops = { +const struct file_operations urandom_fops = { read: urandom_read, write: random_write, ioctl: random_ioctl, diff -u linux-2.4.37.4/drivers/char/tty_io.c linux-2.4.37.4/drivers/char/tty_io.c --- linux-2.4.37.4/drivers/char/tty_io.c 2009-07-26 20:36:22.894084404 -0400 +++ linux-2.4.37.4/drivers/char/tty_io.c 2009-07-26 12:41:46.376018835 -0400 @@ -671,7 +671,7 @@ return cmd == TIOCSPGRP ? -ENOTTY : -EIO; } -static struct file_operations tty_fops = { +static const struct file_operations tty_fops = { llseek: no_llseek, read: tty_read, write: tty_write, @@ -682,7 +682,7 @@ fasync: tty_fasync, }; -static struct file_operations hung_up_tty_fops = { +static const struct file_operations hung_up_tty_fops = { llseek: no_llseek, read: hung_up_tty_read, write: hung_up_tty_write, diff -u linux-2.4.37.4/drivers/pci/proc.c linux-2.4.37.4/drivers/pci/proc.c --- linux-2.4.37.4/drivers/pci/proc.c 2009-07-26 20:36:22.897497677 -0400 +++ linux-2.4.37.4/drivers/pci/proc.c 2009-07-26 12:42:25.010724075 -0400 @@ -284,7 +284,7 @@ } #endif /* HAVE_PCI_MMAP */ -static struct file_operations proc_bus_pci_operations = { +static const struct file_operations proc_bus_pci_operations = { llseek: proc_bus_pci_lseek, read: proc_bus_pci_read, write: proc_bus_pci_write, @@ -364,7 +364,7 @@ return 0; } -static struct seq_operations proc_bus_pci_devices_op = { +static const struct seq_operations proc_bus_pci_devices_op = { start: pci_seq_start, next: pci_seq_next, stop: pci_seq_stop, @@ -524,7 +524,7 @@ return 0; } -static struct seq_operations proc_pci_op = { +static const struct seq_operations proc_pci_op = { start: pci_seq_start, next: pci_seq_next, stop: pci_seq_stop, @@ -535,7 +535,7 @@ { return seq_open(file, &proc_bus_pci_devices_op); } -static struct file_operations proc_bus_pci_dev_operations = { +static const struct file_operations proc_bus_pci_dev_operations = { open: proc_bus_pci_dev_open, read: seq_read, llseek: seq_lseek, @@ -545,7 +545,7 @@ { return seq_open(file, &proc_pci_op); } -static struct file_operations proc_pci_operations = { +static const struct file_operations proc_pci_operations = { open: proc_pci_open, read: seq_read, llseek: seq_lseek, diff -u linux-2.4.37.4/fs/binfmt_misc.c linux-2.4.37.4/fs/binfmt_misc.c --- linux-2.4.37.4/fs/binfmt_misc.c 2009-07-26 20:36:22.897497677 -0400 +++ linux-2.4.37.4/fs/binfmt_misc.c 2009-07-26 12:42:02.005813767 -0400 @@ -481,7 +481,7 @@ return count; } -static struct file_operations bm_entry_operations = { +static const struct file_operations bm_entry_operations = { read: bm_entry_read, write: bm_entry_write, }; @@ -540,7 +540,7 @@ return count; } -static struct file_operations bm_register_operations = { +static const struct file_operations bm_register_operations = { write: bm_register_write, }; @@ -589,7 +589,7 @@ return count; } -static struct file_operations bm_status_operations = { +static const struct file_operations bm_status_operations = { read: bm_status_read, write: bm_status_write, }; @@ -602,7 +602,7 @@ return NULL; } -static struct inode_operations bm_dir_inode_operations = { +static const struct inode_operations bm_dir_inode_operations = { lookup: bm_lookup, }; @@ -616,7 +616,7 @@ return 0; } -static struct super_operations s_ops = { +static const struct super_operations s_ops = { statfs: bm_statfs, put_inode: force_delete, clear_inode: bm_clear_inode, diff -u linux-2.4.37.4/fs/namei.c linux-2.4.37.4/fs/namei.c --- linux-2.4.37.4/fs/namei.c 2009-07-26 20:36:22.900920168 -0400 +++ linux-2.4.37.4/fs/namei.c 2009-07-26 12:42:02.133112032 -0400 @@ -2233,7 +2233,7 @@ return res; } -struct inode_operations page_symlink_inode_operations = { +const struct inode_operations page_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, }; diff -u linux-2.4.37.4/fs/namespace.c linux-2.4.37.4/fs/namespace.c --- linux-2.4.37.4/fs/namespace.c 2009-07-26 20:36:22.900920168 -0400 +++ linux-2.4.37.4/fs/namespace.c 2009-07-26 12:42:25.018216624 -0400 @@ -242,7 +242,7 @@ return err; } -struct seq_operations mounts_op = { +const struct seq_operations mounts_op = { start: m_start, next: m_next, stop: m_stop, diff -u linux-2.4.37.4/fs/pipe.c linux-2.4.37.4/fs/pipe.c --- linux-2.4.37.4/fs/pipe.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/pipe.c 2009-07-26 12:41:54.886000498 -0400 @@ -375,7 +375,7 @@ * The file_operations structs are not static because they * are also used in linux/fs/fifo.c to do operations on FIFOs. */ -struct file_operations read_fifo_fops = { +const struct file_operations read_fifo_fops = { llseek: no_llseek, read: pipe_read, write: bad_pipe_w, @@ -385,7 +385,7 @@ release: pipe_read_release, }; -struct file_operations write_fifo_fops = { +const struct file_operations write_fifo_fops = { llseek: no_llseek, read: bad_pipe_r, write: pipe_write, @@ -395,7 +395,7 @@ release: pipe_write_release, }; -struct file_operations rdwr_fifo_fops = { +const struct file_operations rdwr_fifo_fops = { llseek: no_llseek, read: pipe_read, write: pipe_write, @@ -405,7 +405,7 @@ release: pipe_rdwr_release, }; -struct file_operations read_pipe_fops = { +const struct file_operations read_pipe_fops = { llseek: no_llseek, read: pipe_read, write: bad_pipe_w, @@ -415,7 +415,7 @@ release: pipe_read_release, }; -struct file_operations write_pipe_fops = { +const struct file_operations write_pipe_fops = { llseek: no_llseek, read: bad_pipe_r, write: pipe_write, @@ -425,7 +425,7 @@ release: pipe_write_release, }; -struct file_operations rdwr_pipe_fops = { +const struct file_operations rdwr_pipe_fops = { llseek: no_llseek, read: pipe_read, write: pipe_write, @@ -465,7 +465,7 @@ { return 1; } -static struct dentry_operations pipefs_dentry_operations = { +static const struct dentry_operations pipefs_dentry_operations = { d_delete: pipefs_delete_dentry, }; @@ -597,7 +597,7 @@ return 0; } -static struct super_operations pipefs_ops = { +static const struct super_operations pipefs_ops = { statfs: pipefs_statfs, }; diff -u linux-2.4.37.4/fs/proc/array.c linux-2.4.37.4/fs/proc/array.c --- linux-2.4.37.4/fs/proc/array.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/proc/array.c 2009-07-26 12:42:25.028021955 -0400 @@ -654,7 +654,7 @@ return NULL; } -struct seq_operations proc_pid_maps_op = { +const struct seq_operations proc_pid_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, diff -u linux-2.4.37.4/fs/proc/base.c linux-2.4.37.4/fs/proc/base.c --- linux-2.4.37.4/fs/proc/base.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/proc/base.c 2009-07-26 14:20:42.954515770 -0400 @@ -299,7 +299,7 @@ return gr_acl_handle_procpidmem(task); } -extern struct seq_operations proc_pid_maps_op; +extern const struct seq_operations proc_pid_maps_op; static int maps_open(struct inode *inode, struct file *file) { struct task_struct *task = inode->u.proc_i.task; @@ -311,14 +311,14 @@ return ret; } -static struct file_operations proc_maps_operations = { +static const struct file_operations proc_maps_operations = { .open = maps_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; -extern struct seq_operations mounts_op; +extern const struct seq_operations mounts_op; static int mounts_open(struct inode *inode, struct file *file) { struct task_struct *task = inode->u.proc_i.task; @@ -351,7 +351,7 @@ return seq_release(inode, file); } -static struct file_operations proc_mounts_operations = { +static const struct file_operations proc_mounts_operations = { open: mounts_open, read: seq_read, llseek: seq_lseek, @@ -395,7 +395,7 @@ return count; } -static struct file_operations proc_info_file_operations = { +static const struct file_operations proc_info_file_operations = { read: proc_info_read, }; @@ -524,14 +524,14 @@ return file->f_pos; } -static struct file_operations proc_mem_operations = { +static const struct file_operations proc_mem_operations = { llseek: mem_lseek, read: mem_read, write: mem_write, open: mem_open, }; -static struct inode_operations proc_mem_inode_operations = { +static const struct inode_operations proc_mem_inode_operations = { permission: proc_permission, }; @@ -604,7 +604,7 @@ return error; } -static struct inode_operations proc_pid_link_inode_operations = { +static const struct inode_operations proc_pid_link_inode_operations = { readlink: proc_pid_readlink, follow_link: proc_pid_follow_link }; @@ -851,19 +851,16 @@ return 1; } -static struct dentry_operations pid_fd_dentry_operations = -{ +static const struct dentry_operations pid_fd_dentry_operations = { d_revalidate: pid_fd_revalidate, d_delete: pid_delete_dentry, }; -static struct dentry_operations pid_dentry_operations = -{ +static const struct dentry_operations pid_dentry_operations = { d_delete: pid_delete_dentry, }; -static struct dentry_operations pid_base_dentry_operations = -{ +static const struct dentry_operations pid_base_dentry_operations = { d_revalidate: pid_base_revalidate, d_delete: pid_delete_dentry, }; @@ -934,7 +931,7 @@ return ERR_PTR(-ENOENT); } -static struct file_operations proc_fd_operations = { +static const struct file_operations proc_fd_operations = { read: generic_read_dir, readdir: proc_readfd, }; @@ -942,7 +939,7 @@ /* * proc directories can do almost nothing.. */ -static struct inode_operations proc_fd_inode_operations = { +static const struct inode_operations proc_fd_inode_operations = { lookup: proc_lookupfd, permission: proc_permission, }; @@ -1049,12 +1046,12 @@ return ERR_PTR(error); } -static struct file_operations proc_base_operations = { +static const struct file_operations proc_base_operations = { read: generic_read_dir, readdir: proc_base_readdir, }; -static struct inode_operations proc_base_inode_operations = { +static const struct inode_operations proc_base_inode_operations = { lookup: proc_base_lookup, }; @@ -1075,7 +1072,7 @@ return vfs_follow_link(nd,tmp); } -static struct inode_operations proc_self_inode_operations = { +static const struct inode_operations proc_self_inode_operations = { readlink: proc_self_readlink, follow_link: proc_self_follow_link, }; diff -u linux-2.4.37.4/fs/proc/inode.c linux-2.4.37.4/fs/proc/inode.c --- linux-2.4.37.4/fs/proc/inode.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/proc/inode.c 2009-07-26 12:41:54.889556254 -0400 @@ -91,7 +91,7 @@ return 0; } -static struct super_operations proc_sops = { +static const struct super_operations proc_sops = { read_inode: proc_read_inode, put_inode: force_delete, delete_inode: proc_delete_inode, diff -u linux-2.4.37.4/fs/proc/proc_misc.c linux-2.4.37.4/fs/proc/proc_misc.c --- linux-2.4.37.4/fs/proc/proc_misc.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/proc/proc_misc.c 2009-07-26 14:25:26.425265249 -0400 @@ -226,12 +226,12 @@ return proc_calc_metrics(page, start, off, count, eof, len); } -extern struct seq_operations cpuinfo_op; +extern const struct seq_operations cpuinfo_op; static int cpuinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &cpuinfo_op); } -static struct file_operations proc_cpuinfo_operations = { +static const struct file_operations proc_cpuinfo_operations = { open: cpuinfo_open, read: seq_read, llseek: seq_lseek, @@ -256,12 +256,12 @@ } #endif -extern struct seq_operations partitions_op; +extern const struct seq_operations partitions_op; static int partitions_open(struct inode *inode, struct file *file) { return seq_open(file, &partitions_op); } -static struct file_operations proc_partitions_operations = { +static const struct file_operations proc_partitions_operations = { open: partitions_open, read: seq_read, llseek: seq_lseek, @@ -276,12 +276,12 @@ return proc_calc_metrics(page, start, off, count, eof, len); } -extern struct seq_operations ksyms_op; +extern const struct seq_operations ksyms_op; static int ksyms_open(struct inode *inode, struct file *file) { return seq_open(file, &ksyms_op); } -static struct file_operations proc_ksyms_operations = { +static const struct file_operations proc_ksyms_operations = { open: ksyms_open, read: seq_read, llseek: seq_lseek, @@ -289,13 +289,13 @@ }; #endif -extern struct seq_operations slabinfo_op; +extern const struct seq_operations slabinfo_op; extern ssize_t slabinfo_write(struct file *, const char *, size_t, loff_t *); static int slabinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &slabinfo_op); } -static struct file_operations proc_slabinfo_operations = { +static const struct file_operations proc_slabinfo_operations = { open: slabinfo_open, read: seq_read, write: slabinfo_write, @@ -422,7 +422,7 @@ kfree(buf); return res; } -static struct file_operations proc_interrupts_operations = { +static const struct file_operations proc_interrupts_operations = { .open = interrupts_open, .read = seq_read, .llseek = seq_lseek, @@ -430,8 +430,8 @@ }; #endif /* !CONFIG_X86 */ -extern struct file_operations proc_ioports_operations; -extern struct file_operations proc_iomem_operations; +extern const struct file_operations proc_ioports_operations; +extern const struct file_operations proc_iomem_operations; static int filesystems_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) @@ -551,7 +551,7 @@ return count; } -static struct file_operations proc_profile_operations = { +static const struct file_operations proc_profile_operations = { read: read_profile, write: write_profile, }; @@ -573,14 +573,14 @@ return count; } -static struct file_operations proc_sysrq_trigger_operations = { +static const struct file_operations proc_sysrq_trigger_operations = { .write = write_sysrq_trigger, }; #endif struct proc_dir_entry *proc_root_kcore; -static void create_seq_entry(char *name, mode_t mode, struct file_operations *f) +static void create_seq_entry(char *name, mode_t mode, const struct file_operations *f) { struct proc_dir_entry *entry; entry = create_proc_entry(name, mode, NULL); @@ -696,7 +696,7 @@ #endif #ifdef CONFIG_PPC32 { - extern struct file_operations ppc_htab_operations; + extern const struct file_operations ppc_htab_operations; entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, NULL); if (entry) entry->proc_fops = &ppc_htab_operations; diff -u linux-2.4.37.4/fs/proc/root.c linux-2.4.37.4/fs/proc/root.c --- linux-2.4.37.4/fs/proc/root.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/proc/root.c 2009-07-26 12:42:02.179628922 -0400 @@ -123,7 +123,7 @@ * directories. Thus we don't use the generic * directory handling functions for that.. */ -static struct file_operations proc_root_operations = { +static const struct file_operations proc_root_operations = { read: generic_read_dir, readdir: proc_root_readdir, }; @@ -131,7 +131,7 @@ /* * proc root can do almost nothing.. */ -static struct inode_operations proc_root_inode_operations = { +static const struct inode_operations proc_root_inode_operations = { lookup: proc_root_lookup, }; diff -u linux-2.4.37.4/fs/readdir.c linux-2.4.37.4/fs/readdir.c --- linux-2.4.37.4/fs/readdir.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/readdir.c 2009-07-26 12:41:47.665161805 -0400 @@ -151,7 +151,7 @@ return 0; } -struct file_operations dcache_dir_ops = { +const struct file_operations dcache_dir_ops = { open: dcache_dir_open, release: dcache_dir_close, llseek: dcache_dir_lseek, diff -u linux-2.4.37.4/fs/xfs/linux-2.4/xfs_file.c linux-2.4.37.4/fs/xfs/linux-2.4/xfs_file.c --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_file.c 2009-07-26 20:36:22.904258366 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_file.c 2009-07-26 12:42:07.738555748 -0400 @@ -57,7 +57,7 @@ #include #include /* for PROT_WRITE */ -static struct vm_operations_struct linvfs_file_vm_ops; +static const struct vm_operations_struct linvfs_file_vm_ops; STATIC inline ssize_t __linvfs_read( @@ -414,7 +414,7 @@ #endif /* HAVE_VMOP_MPROTECT */ -struct file_operations linvfs_file_operations = { +const struct file_operations linvfs_file_operations = { .llseek = generic_file_llseek, .read = linvfs_read, .write = linvfs_write, @@ -425,7 +425,7 @@ .fsync = linvfs_fsync, }; -struct file_operations linvfs_invis_file_operations = { +const struct file_operations linvfs_invis_file_operations = { .llseek = generic_file_llseek, .read = linvfs_read_invis, .write = linvfs_write_invis, @@ -437,14 +437,14 @@ }; -struct file_operations linvfs_dir_operations = { +const struct file_operations linvfs_dir_operations = { .read = generic_read_dir, .readdir = linvfs_readdir, .ioctl = linvfs_ioctl, .fsync = linvfs_fsync, }; -static struct vm_operations_struct linvfs_file_vm_ops = { +static const struct vm_operations_struct linvfs_file_vm_ops = { .nopage = filemap_nopage, #ifdef HAVE_VMOP_MPROTECT .mprotect = linvfs_mprotect, diff -u linux-2.4.37.4/grsecurity/gracl_learn.c linux-2.4.37.4/grsecurity/gracl_learn.c --- linux-2.4.37.4/grsecurity/gracl_learn.c 2009-07-26 20:36:22.907755854 -0400 +++ linux-2.4.37.4/grsecurity/gracl_learn.c 2009-07-26 12:41:47.702680533 -0400 @@ -202,7 +202,7 @@ return 0; } -struct file_operations grsec_fops = { +const struct file_operations grsec_fops = { read: read_learn, write: write_grsec_handler, open: open_learn, diff -u linux-2.4.37.4/include/linux/fs.h linux-2.4.37.4/include/linux/fs.h --- linux-2.4.37.4/include/linux/fs.h 2009-07-26 20:36:22.927858451 -0400 +++ linux-2.4.37.4/include/linux/fs.h 2009-07-26 20:22:15.865576114 -0400 @@ -410,7 +410,7 @@ struct list_head dirty_pages; /* list of dirty pages */ struct list_head locked_pages; /* list of locked pages */ unsigned long nrpages; /* number of total pages */ - struct address_space_operations *a_ops; /* methods */ + const struct address_space_operations *a_ops; /* methods */ struct inode *host; /* owner: inode, block_device */ struct vm_area_struct *i_mmap; /* list of private mappings */ struct vm_area_struct *i_mmap_shared; /* list of shared mappings */ @@ -465,8 +465,8 @@ struct semaphore i_sem; struct rw_semaphore i_alloc_sem; struct semaphore i_zombie; - struct inode_operations *i_op; - struct file_operations *i_fop; /* former ->i_op->default_file_ops */ + const struct inode_operations *i_op; + const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ struct super_block *i_sb; wait_queue_head_t i_wait; struct file_lock *i_flock; @@ -566,7 +566,7 @@ struct list_head f_list; struct dentry *f_dentry; struct vfsmount *f_vfsmnt; - struct file_operations *f_op; + const struct file_operations *f_op; atomic_t f_count; unsigned int f_flags; mode_t f_mode; @@ -750,7 +750,7 @@ unsigned char s_dirt; unsigned long long s_maxbytes; /* Max file size */ struct file_system_type *s_type; - struct super_operations *s_op; + const struct super_operations *s_op; struct dquot_operations *dq_op; struct quotactl_ops *s_qcop; unsigned long s_flags; @@ -1110,16 +1110,16 @@ extern void cdput(struct char_device *); extern int blkdev_open(struct inode *, struct file *); extern int blkdev_close(struct inode *, struct file *); -extern struct file_operations def_blk_fops; -extern struct address_space_operations def_blk_aops; -extern struct file_operations def_fifo_fops; +extern const struct file_operations def_blk_fops; +extern const struct address_space_operations def_blk_aops; +extern const struct file_operations def_fifo_fops; extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); extern int blkdev_get(struct block_device *, mode_t, unsigned, int); extern int blkdev_put(struct block_device *, int); /* fs/devices.c */ extern const struct block_device_operations *get_blkfops(unsigned int); -extern int register_chrdev(unsigned int, const char *, struct file_operations *); +extern int register_chrdev(unsigned int, const char *, const struct file_operations *); extern int unregister_chrdev(unsigned int, const char *); extern int chrdev_open(struct inode *, struct file *); extern const char * bdevname(kdev_t); @@ -1131,12 +1131,12 @@ extern void make_bad_inode(struct inode *); extern int is_bad_inode(struct inode *); -extern struct file_operations read_fifo_fops; -extern struct file_operations write_fifo_fops; -extern struct file_operations rdwr_fifo_fops; -extern struct file_operations read_pipe_fops; -extern struct file_operations write_pipe_fops; -extern struct file_operations rdwr_pipe_fops; +extern const struct file_operations read_fifo_fops; +extern const struct file_operations write_fifo_fops; +extern const struct file_operations rdwr_fifo_fops; +extern const struct file_operations read_pipe_fops; +extern const struct file_operations write_pipe_fops; +extern const struct file_operations rdwr_pipe_fops; extern int fs_may_remount_ro(struct super_block *); @@ -1530,13 +1530,13 @@ extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); extern int generic_file_open(struct inode * inode, struct file * filp); -extern struct file_operations generic_ro_fops; +extern const struct file_operations generic_ro_fops; extern int vfs_readlink(struct dentry *, char *, int, const char *); extern int vfs_follow_link(struct nameidata *, const char *); extern int page_readlink(struct dentry *, char *, int); extern int page_follow_link(struct dentry *, struct nameidata *); -extern struct inode_operations page_symlink_inode_operations; +extern const struct inode_operations page_symlink_inode_operations; extern int vfs_readdir(struct file *, filldir_t, void *); extern int dcache_dir_open(struct inode *, struct file *); @@ -1544,7 +1544,7 @@ extern loff_t dcache_dir_lseek(struct file *, loff_t, int); extern int dcache_dir_fsync(struct file *, struct dentry *, int); extern int dcache_readdir(struct file *, void *, filldir_t); -extern struct file_operations dcache_dir_ops; +extern const struct file_operations dcache_dir_ops; extern struct file_system_type *get_fs_type(const char *name); extern struct super_block *get_super(kdev_t); diff -u linux-2.4.37.4/include/linux/mm.h linux-2.4.37.4/include/linux/mm.h --- linux-2.4.37.4/include/linux/mm.h 2009-07-26 20:36:22.931148045 -0400 +++ linux-2.4.37.4/include/linux/mm.h 2009-07-26 20:22:15.870811699 -0400 @@ -68,7 +68,7 @@ struct vm_area_struct **vm_pprev_share; /* Function pointers to deal with this struct. */ - struct vm_operations_struct * vm_ops; + const struct vm_operations_struct * vm_ops; /* Information about our backing store: */ unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE diff -u linux-2.4.37.4/ipc/shm.c linux-2.4.37.4/ipc/shm.c --- linux-2.4.37.4/ipc/shm.c 2009-07-26 20:36:22.934620413 -0400 +++ linux-2.4.37.4/ipc/shm.c 2009-07-26 12:42:07.741990723 -0400 @@ -56,8 +56,8 @@ #define shm_flags shm_perm.mode -static struct file_operations shm_file_operations; -static struct vm_operations_struct shm_vm_ops; +static const struct file_operations shm_file_operations; +static const struct vm_operations_struct shm_vm_ops; static struct ipc_ids shm_ids; @@ -210,11 +210,11 @@ return 0; } -static struct file_operations shm_file_operations = { +static const struct file_operations shm_file_operations = { mmap: shm_mmap }; -static struct vm_operations_struct shm_vm_ops = { +static const struct vm_operations_struct shm_vm_ops = { open: shm_open, /* callback for a new vm-area open */ close: shm_close, /* callback for when the vm-area is released */ nopage: shmem_nopage, diff -u linux-2.4.37.4/kernel/module.c linux-2.4.37.4/kernel/module.c --- linux-2.4.37.4/kernel/module.c 2009-07-26 20:36:22.934620413 -0400 +++ linux-2.4.37.4/kernel/module.c 2009-07-26 12:42:25.035797116 -0400 @@ -1262,7 +1262,7 @@ return 0; } -struct seq_operations ksyms_op = { +const struct seq_operations ksyms_op = { start: s_start, next: s_next, stop: s_stop, diff -u linux-2.4.37.4/kernel/sysctl.c linux-2.4.37.4/kernel/sysctl.c --- linux-2.4.37.4/kernel/sysctl.c 2009-07-26 20:36:22.937933948 -0400 +++ linux-2.4.37.4/kernel/sysctl.c 2009-07-26 12:42:02.247025673 -0400 @@ -164,12 +164,12 @@ static ssize_t proc_writesys(struct file *, const char *, size_t, loff_t *); static int proc_sys_permission(struct inode *, int); -struct file_operations proc_sys_file_operations = { +const struct file_operations proc_sys_file_operations = { read: proc_readsys, write: proc_writesys, }; -static struct inode_operations proc_sys_inode_operations = { +static const struct inode_operations proc_sys_inode_operations = { permission: proc_sys_permission, }; diff -u linux-2.4.37.4/mm/filemap.c linux-2.4.37.4/mm/filemap.c --- linux-2.4.37.4/mm/filemap.c 2009-07-26 20:36:22.937933948 -0400 +++ linux-2.4.37.4/mm/filemap.c 2009-07-26 12:42:07.760568388 -0400 @@ -2308,7 +2308,7 @@ return error; } -static struct vm_operations_struct generic_file_vm_ops = { +static const struct vm_operations_struct generic_file_vm_ops = { nopage: filemap_nopage, }; diff -u linux-2.4.37.4/mm/shmem.c linux-2.4.37.4/mm/shmem.c --- linux-2.4.37.4/mm/shmem.c 2009-07-26 20:36:22.941264820 -0400 +++ linux-2.4.37.4/mm/shmem.c 2009-07-26 13:40:43.408324517 -0400 @@ -65,12 +65,12 @@ static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **pagep, enum sgp_type sgp); -static struct super_operations shmem_ops; -static struct address_space_operations shmem_aops; -static struct file_operations shmem_file_operations; -static struct inode_operations shmem_inode_operations; -static struct inode_operations shmem_dir_inode_operations; -static struct vm_operations_struct shmem_vm_ops; +static const struct super_operations shmem_ops; +static const struct address_space_operations shmem_aops; +static const struct file_operations shmem_file_operations; +static const struct inode_operations shmem_inode_operations; +static const struct inode_operations shmem_dir_inode_operations; +static const struct vm_operations_struct shmem_vm_ops; LIST_HEAD(shmem_inodes); static spinlock_t shmem_ilock = SPIN_LOCK_UNLOCKED; @@ -841,7 +841,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma) { - struct vm_operations_struct *ops; + const struct vm_operations_struct *ops; struct inode *inode = file->f_dentry->d_inode; ops = &shmem_vm_ops; @@ -930,8 +930,8 @@ #ifdef CONFIG_TMPFS -static struct inode_operations shmem_symlink_inode_operations; -static struct inode_operations shmem_symlink_inline_operations; +static const struct inode_operations shmem_symlink_inode_operations; +static const struct inode_operations shmem_symlink_inline_operations; /* * tmpfs itself makes no use of generic_file_read, generic_file_mmap @@ -1188,7 +1188,7 @@ */ static struct dentry *shmem_lookup(struct inode *dir, struct dentry *dentry) { - static struct dentry_operations shmem_dentry_operations = { + static const struct dentry_operations shmem_dentry_operations = { .d_delete = shmem_delete_dentry, }; @@ -1424,12 +1424,12 @@ return res; } -static struct inode_operations shmem_symlink_inline_operations = { +static const struct inode_operations shmem_symlink_inline_operations = { readlink: shmem_readlink_inline, follow_link: shmem_follow_link_inline, }; -static struct inode_operations shmem_symlink_inode_operations = { +static const struct inode_operations shmem_symlink_inode_operations = { truncate: shmem_truncate, readlink: shmem_readlink, follow_link: shmem_follow_link, @@ -1570,7 +1570,7 @@ return sb; } -static struct address_space_operations shmem_aops = { +static const struct address_space_operations shmem_aops = { removepage: shmem_removepage, writepage: shmem_writepage, #ifdef CONFIG_TMPFS @@ -1580,7 +1580,7 @@ #endif }; -static struct file_operations shmem_file_operations = { +static const struct file_operations shmem_file_operations = { mmap: shmem_mmap, #ifdef CONFIG_TMPFS read: shmem_file_read, @@ -1589,12 +1589,12 @@ #endif }; -static struct inode_operations shmem_inode_operations = { +static const struct inode_operations shmem_inode_operations = { truncate: shmem_truncate, setattr: shmem_notify_change, }; -static struct inode_operations shmem_dir_inode_operations = { +static const struct inode_operations shmem_dir_inode_operations = { #ifdef CONFIG_TMPFS create: shmem_create, lookup: shmem_lookup, @@ -1608,7 +1608,7 @@ #endif }; -static struct super_operations shmem_ops = { +static const struct super_operations shmem_ops = { #ifdef CONFIG_TMPFS statfs: shmem_statfs, remount_fs: shmem_remount_fs, @@ -1617,7 +1617,7 @@ put_inode: force_delete, }; -static struct vm_operations_struct shmem_vm_ops = { +static const struct vm_operations_struct shmem_vm_ops = { nopage: shmem_nopage, }; diff -u linux-2.4.37.4/net/socket.c linux-2.4.37.4/net/socket.c --- linux-2.4.37.4/net/socket.c 2009-07-26 20:36:22.944664915 -0400 +++ linux-2.4.37.4/net/socket.c 2009-07-26 12:41:54.944269233 -0400 @@ -126,7 +126,7 @@ * in the operation structures but are done directly via the socketcall() multiplexor. */ -static struct file_operations socket_file_ops = { +static const struct file_operations socket_file_ops = { llseek: no_llseek, read: sock_read, write: sock_write, @@ -286,7 +286,7 @@ return 0; } -static struct super_operations sockfs_ops = { +static const struct super_operations sockfs_ops = { statfs: sockfs_statfs, }; @@ -319,7 +319,7 @@ { return 1; } -static struct dentry_operations sockfs_dentry_operations = { +static const struct dentry_operations sockfs_dentry_operations = { d_delete: sockfs_delete_dentry, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/alpha/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/alpha/kernel/setup.c 2009-07-26 12:42:24.818963302 -0400 @@ -1208,7 +1208,7 @@ c_stop(struct seq_file *f, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/arm/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/arm/kernel/setup.c 2009-07-26 12:42:24.823831041 -0400 @@ -611,7 +611,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/ds1302.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/ds1302.c 2009-07-26 12:41:45.596566561 -0400 @@ -473,7 +473,7 @@ print_rtc_status(void) /* The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { owner: THIS_MODULE, ioctl: rtc_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/examples/kiobuftest.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/examples/kiobuftest.c 2009-07-26 12:41:45.596566561 -0400 @@ -78,7 +78,7 @@ kiobuf_read(struct file *filp, char *buf } -static struct file_operations kiobuf_fops = { +static const struct file_operations kiobuf_fops = { owner: THIS_MODULE, read: kiobuf_read }; only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/gpio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/gpio.c 2009-07-26 12:41:45.603429795 -0400 @@ -779,7 +779,7 @@ gpio_leds_ioctl(unsigned int cmd, unsign return 0; } -struct file_operations gpio_fops = { +const struct file_operations gpio_fops = { owner: THIS_MODULE, poll: gpio_poll, ioctl: gpio_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/i2c.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/i2c.c 2009-07-26 12:41:45.607940822 -0400 @@ -681,7 +681,7 @@ i2c_ioctl(struct inode *inode, struct fi return 0; } -static struct file_operations i2c_fops = { +static const struct file_operations i2c_fops = { owner: THIS_MODULE, ioctl: i2c_ioctl, open: i2c_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/pcf8563.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/pcf8563.c 2009-07-26 12:41:45.612167057 -0400 @@ -51,7 +51,7 @@ int pcf8563_ioctl(struct inode *, struct int pcf8563_open(struct inode *, struct file *); int pcf8563_release(struct inode *, struct file *); -static struct file_operations pcf8563_fops = { +static const struct file_operations pcf8563_fops = { owner: THIS_MODULE, ioctl: pcf8563_ioctl, open: pcf8563_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/sync_serial.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/sync_serial.c 2009-07-26 12:41:45.619997050 -0400 @@ -214,7 +214,7 @@ static unsigned gen_config_ii_shadow = 0 #define NUMBER_OF_PORTS (sizeof(ports)/sizeof(sync_port)) -static struct file_operations sync_serial_fops = { +static const struct file_operations sync_serial_fops = { .owner = THIS_MODULE, .write = sync_serial_write, .read = sync_serial_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/drivers/virtex.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/drivers/virtex.c 2009-07-26 12:41:45.619997050 -0400 @@ -372,7 +372,7 @@ virtex_ioctl(struct inode *inode, struct return 0; } -static struct file_operations virtex_fops = { +static const struct file_operations virtex_fops = { owner: THIS_MODULE, ioctl: virtex_ioctl, open: virtex_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/cris/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/cris/kernel/setup.c 2009-07-26 12:42:24.826778487 -0400 @@ -283,7 +283,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/i386/kernel/cpuid.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/i386/kernel/cpuid.c 2009-07-26 12:41:45.635215739 -0400 @@ -133,7 +133,7 @@ static int cpuid_open(struct inode *inod /* * File operations we support */ -static struct file_operations cpuid_fops = { +static const struct file_operations cpuid_fops = { owner: THIS_MODULE, llseek: cpuid_seek, read: cpuid_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/i386/kernel/microcode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/i386/kernel/microcode.c 2009-07-26 12:41:45.638507857 -0400 @@ -474,7 +474,7 @@ static int microcode_ioctl (struct inode } /* shared between misc device and devfs regular file */ -static struct file_operations microcode_fops = { +static const struct file_operations microcode_fops = { .owner = THIS_MODULE, .write = microcode_write, .ioctl = microcode_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/arch/i386/kernel/msr.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/i386/kernel/msr.c 2009-07-26 12:41:45.638507857 -0400 @@ -240,7 +240,7 @@ static int msr_open(struct inode *inode, /* * File operations we support */ -static struct file_operations msr_fops = { +static const struct file_operations msr_fops = { owner: THIS_MODULE, llseek: msr_seek, read: msr_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/hp/common/sba_iommu.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/hp/common/sba_iommu.c 2009-07-26 12:42:24.853151692 -0400 @@ -1704,7 +1704,7 @@ ioc_show(struct seq_file *s, void *v) return 0; } -static struct seq_operations ioc_seq_ops = { +static const struct seq_operations ioc_seq_ops = { .start = ioc_start, .next = ioc_next, .stop = ioc_stop, @@ -1717,7 +1717,7 @@ ioc_open(struct inode *inode, struct fil return seq_open(file, &ioc_seq_ops); } -static struct file_operations ioc_fops = { +static const struct file_operations ioc_fops = { .open = ioc_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/kernel/efivars.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/kernel/efivars.c 2009-07-26 12:41:45.655153762 -0400 @@ -412,7 +412,7 @@ out: } static struct proc_dir_entry *efi_systab_entry; -static struct file_operations efi_systab_fops = { +static const struct file_operations efi_systab_fops = { .read = efi_systab_read, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/kernel/perfmon.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/kernel/perfmon.c 2009-07-26 12:42:24.875604576 -0400 @@ -3261,7 +3261,7 @@ pfm_proc_show(struct seq_file *m, void * return 0; } -struct seq_operations pfm_seq_ops = { +const struct seq_operations pfm_seq_ops = { .start = pfm_proc_start, .next = pfm_proc_next, .stop = pfm_proc_stop, @@ -4500,7 +4500,7 @@ pfm_remove_alternate_syswide_subsystem(p return 0; } -static struct file_operations pfm_proc_fops = { +static const struct file_operations pfm_proc_fops = { .open = pfm_proc_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/kernel/salinfo.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/kernel/salinfo.c 2009-07-26 12:41:45.682036621 -0400 @@ -338,7 +338,7 @@ retry: return size; } -static struct file_operations salinfo_event_fops = { +static const struct file_operations salinfo_event_fops = { .open = salinfo_event_open, .read = salinfo_event_read, }; @@ -558,7 +558,7 @@ salinfo_log_write(struct file *file, con return count; } -static struct file_operations salinfo_data_fops = { +static const struct file_operations salinfo_data_fops = { .open = salinfo_log_open, .release = salinfo_log_release, .read = salinfo_log_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/kernel/setup.c 2009-07-26 12:42:24.879519019 -0400 @@ -566,7 +566,7 @@ c_stop (struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start =c_start, .next = c_next, .stop = c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/mm/hugetlbpage.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/mm/hugetlbpage.c 2009-07-26 12:42:07.629335775 -0400 @@ -24,7 +24,7 @@ static long htlbpagemem; int htlbpage_max; static long htlbzone_pages; -struct vm_operations_struct hugetlb_vm_ops; +const struct vm_operations_struct hugetlb_vm_ops; static LIST_HEAD(htlbpage_freelist); static spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED; @@ -512,6 +512,6 @@ static struct page *hugetlb_nopage(struc return NULL; } -struct vm_operations_struct hugetlb_vm_ops = { +const struct vm_operations_struct hugetlb_vm_ops = { .nopage = hugetlb_nopage, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/drivers/ifconfig_net.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/drivers/ifconfig_net.c 2009-07-26 12:41:45.685480667 -0400 @@ -277,7 +277,7 @@ static int ifconfig_net_ioctl(struct ino } -struct file_operations ifconfig_net_fops = { +const struct file_operations ifconfig_net_fops = { ioctl:ifconfig_net_ioctl, /* ioctl */ open:ifconfig_net_open, /* open */ release:ifconfig_net_close /* release */ only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/drivers/ioconfig_bus.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/drivers/ioconfig_bus.c 2009-07-26 12:41:45.685480667 -0400 @@ -359,7 +359,7 @@ static int ioconfig_bus_close(struct ino return(0); } -struct file_operations ioconfig_bus_fops = { +const struct file_operations ioconfig_bus_fops = { ioctl:ioconfig_bus_ioctl, open:ioconfig_bus_open, /* open */ release:ioconfig_bus_close /* release */ only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/drivers/pciba.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/drivers/pciba.c 2009-07-26 12:41:45.693271333 -0400 @@ -211,7 +211,7 @@ static void dump_allocations(struct list #endif /* file operations for each type of node */ -static struct file_operations rom_fops = { +static const struct file_operations rom_fops = { owner: THIS_MODULE, mmap: rom_mmap, open: generic_open, @@ -219,20 +219,20 @@ static struct file_operations rom_fops = }; -static struct file_operations base_fops = { +static const struct file_operations base_fops = { owner: THIS_MODULE, mmap: base_mmap, open: generic_open }; -static struct file_operations config_fops = { +static const struct file_operations config_fops = { owner: THIS_MODULE, ioctl: config_ioctl, open: generic_open }; -static struct file_operations dma_fops = { +static const struct file_operations dma_fops = { owner: THIS_MODULE, ioctl: dma_ioctl, mmap: dma_mmap, only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/hwgdfs/hcl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/hwgdfs/hcl.c 2009-07-26 12:41:45.696635865 -0400 @@ -106,7 +106,7 @@ static int hcl_ioctl(struct inode * inod } -struct file_operations hcl_fops = { +const struct file_operations hcl_fops = { (struct module *)0, NULL, /* lseek - default */ NULL, /* read - general block-dev read */ only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/hwgfs/hcl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/hwgfs/hcl.c 2009-07-26 12:41:45.704758708 -0400 @@ -108,7 +108,7 @@ static int hcl_ioctl(struct inode * inod } -struct file_operations hcl_fops = { +const struct file_operations hcl_fops = { (struct module *)0, NULL, /* lseek - default */ NULL, /* read - general block-dev read */ only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/hwgfs/ramfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/hwgfs/ramfs.c 2009-07-26 12:42:14.315184699 -0400 @@ -18,10 +18,10 @@ /* some random number */ #define HWGFS_MAGIC 0x12061983 -static struct super_operations hwgfs_ops; -static struct address_space_operations hwgfs_aops; -static struct file_operations hwgfs_file_operations; -static struct inode_operations hwgfs_dir_inode_operations; +static const struct super_operations hwgfs_ops; +static const struct address_space_operations hwgfs_aops; +static const struct file_operations hwgfs_file_operations; +static const struct inode_operations hwgfs_dir_inode_operations; static int hwgfs_statfs(struct super_block *sb, struct statfs *buf) { @@ -247,21 +247,21 @@ static int hwgfs_sync_file(struct file * return 0; } -static struct address_space_operations hwgfs_aops = { +static const struct address_space_operations hwgfs_aops = { .readpage = hwgfs_readpage, .writepage = fail_writepage, .prepare_write = hwgfs_prepare_write, .commit_write = hwgfs_commit_write }; -static struct file_operations hwgfs_file_operations = { +static const struct file_operations hwgfs_file_operations = { .read = generic_file_read, .write = generic_file_write, .mmap = generic_file_mmap, .fsync = hwgfs_sync_file, }; -static struct inode_operations hwgfs_dir_inode_operations = { +static const struct inode_operations hwgfs_dir_inode_operations = { .create = hwgfs_create, .lookup = hwgfs_lookup, .link = hwgfs_link, @@ -273,7 +273,7 @@ static struct inode_operations hwgfs_dir .rename = hwgfs_rename, }; -static struct super_operations hwgfs_ops = { +static const struct super_operations hwgfs_ops = { .statfs = hwgfs_statfs, .put_inode = force_delete, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 2009-07-26 12:41:45.729382219 -0400 @@ -577,7 +577,7 @@ pcibr_mmap(struct file * file, struct vm * appropriate function name below. */ static int pcibr_mmap(struct file * file, struct vm_area_struct * vma); -struct file_operations pcibr_fops = { +const struct file_operations pcibr_fops = { .owner = THIS_MODULE, .mmap = pcibr_mmap, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/sn2/shub.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/sn2/shub.c 2009-07-26 12:41:45.733293295 -0400 @@ -223,7 +223,7 @@ shubstats_ioctl(struct inode *inode, str return 0; } -struct file_operations shub_mon_fops = { +const struct file_operations shub_mon_fops = { ioctl: shubstats_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ia64/sn/io/sn2/xbow.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ia64/sn/io/sn2/xbow.c 2009-07-26 12:41:45.741126579 -0400 @@ -141,7 +141,7 @@ xbow_mmap(struct file * file, struct vm_ * As each of the functions are implemented, put the * appropriate function name below. */ -struct file_operations xbow_fops = { +const struct file_operations xbow_fops = { .owner = THIS_MODULE, .mmap = xbow_mmap, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/m68k/atari/joystick.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/m68k/atari/joystick.c 2009-07-26 12:41:45.741126579 -0400 @@ -121,7 +121,7 @@ static unsigned int joystick_poll(struct return 0; } -struct file_operations atari_joystick_fops = { +const struct file_operations atari_joystick_fops = { read: read_joystick, write: write_joystick, poll: joystick_poll, only in patch2: unchanged: --- linux-2.4.37.4/arch/m68k/bvme6000/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/m68k/bvme6000/rtc.c 2009-07-26 12:41:45.744710321 -0400 @@ -161,7 +161,7 @@ static int rtc_release(struct inode *ino * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { ioctl: rtc_ioctl, open: rtc_open, release: rtc_release, only in patch2: unchanged: --- linux-2.4.37.4/arch/m68k/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/m68k/kernel/setup.c 2009-07-26 12:42:24.884408225 -0400 @@ -531,7 +531,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/m68k/mvme16x/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/m68k/mvme16x/rtc.c 2009-07-26 12:41:45.744710321 -0400 @@ -150,7 +150,7 @@ static int rtc_release(struct inode *ino * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { ioctl: rtc_ioctl, open: rtc_open, release: rtc_release, only in patch2: unchanged: --- linux-2.4.37.4/arch/mips/kernel/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/mips/kernel/proc.c 2009-07-26 12:42:24.888087731 -0400 @@ -143,7 +143,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2009-07-26 12:41:45.748713963 -0400 @@ -356,7 +356,7 @@ static int sbprof_tb_ioctl(struct inode return error; } -static struct file_operations sbprof_tb_fops = { +static const struct file_operations sbprof_tb_fops = { .owner = THIS_MODULE, .open = sbprof_tb_open, .release = sbprof_tb_release, only in patch2: unchanged: --- linux-2.4.37.4/arch/mips64/kernel/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/mips64/kernel/proc.c 2009-07-26 12:42:24.885820658 -0400 @@ -143,7 +143,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/parisc/kernel/perf.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/parisc/kernel/perf.c 2009-07-26 12:41:45.755569423 -0400 @@ -479,7 +479,7 @@ static int perf_ioctl(struct inode *inod return -ENOTTY; } -static struct file_operations perf_fops = { +static const struct file_operations perf_fops = { llseek: no_llseek, read: perf_read, write: perf_write, only in patch2: unchanged: --- linux-2.4.37.4/arch/parisc/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/parisc/kernel/setup.c 2009-07-26 12:42:24.890943543 -0400 @@ -180,7 +180,7 @@ c_stop (struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc/kernel/ppc_htab.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc/kernel/ppc_htab.c 2009-07-26 12:41:45.794578231 -0400 @@ -61,7 +61,7 @@ extern unsigned int htab_hash_searches; #define PMC1 953 #define PMC2 954 -struct file_operations ppc_htab_operations = { +const struct file_operations ppc_htab_operations = { llseek: ppc_htab_lseek, read: ppc_htab_read, write: ppc_htab_write, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc/kernel/setup.c 2009-07-26 12:42:24.901015664 -0400 @@ -238,7 +238,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/lparcfg.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/lparcfg.c 2009-07-26 12:41:45.760659196 -0400 @@ -432,7 +432,7 @@ static int lparcfg_open(struct inode * i return 0; } -struct file_operations lparcfg_fops = { +const struct file_operations lparcfg_fops = { owner: THIS_MODULE, read: lparcfg_read, open: lparcfg_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/nvram.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/nvram.c 2009-07-26 12:41:45.764217187 -0400 @@ -149,7 +149,7 @@ static int dev_ppc64_nvram_ioctl(struct return -EINVAL; } -struct file_operations nvram_fops = { +const struct file_operations nvram_fops = { .owner = THIS_MODULE, .llseek = dev_ppc64_nvram_llseek, .read = dev_ppc64_read_nvram, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/proc_pmc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/proc_pmc.c 2009-07-26 12:41:45.771756286 -0400 @@ -100,7 +100,7 @@ static loff_t nacamap_seek( struct file static ssize_t nacamap_read( struct file *file, char *buf, size_t nbytes, loff_t *ppos); static int nacamap_mmap( struct file *file, struct vm_area_struct *vma ); -static struct file_operations nacamap_fops = { +static const struct file_operations nacamap_fops = { llseek: nacamap_seek, read: nacamap_read, mmap: nacamap_mmap @@ -116,17 +116,17 @@ static ssize_t read_timeslice(struct fil static ssize_t write_timeslice(struct file * file, const char * buf, size_t count, loff_t *ppos); -static struct file_operations proc_profile_operations = { +static const struct file_operations proc_profile_operations = { read: read_profile, write: write_profile, }; -static struct file_operations proc_trace_operations = { +static const struct file_operations proc_trace_operations = { read: read_trace, write: write_trace, }; -static struct file_operations proc_timeslice_operations = { +static const struct file_operations proc_timeslice_operations = { read: read_timeslice, write: write_timeslice, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/rtasd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/rtasd.c 2009-07-26 12:41:45.775675061 -0400 @@ -276,7 +276,7 @@ static unsigned int rtas_log_poll(struct return 0; } -struct file_operations proc_rtas_log_operations = { +const struct file_operations proc_rtas_log_operations = { .read = rtas_log_read, .poll = rtas_log_poll, .open = rtas_log_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/rtas_flash.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/rtas_flash.c 2009-07-26 12:41:45.778967833 -0400 @@ -618,21 +618,21 @@ static inline struct proc_dir_entry * cr return ent; } -static struct file_operations rtas_flash_operations = { +static const struct file_operations rtas_flash_operations = { read: rtas_flash_read, write: rtas_flash_write, open: rtas_excl_open, release: rtas_flash_release, }; -static struct file_operations manage_flash_operations = { +static const struct file_operations manage_flash_operations = { read: manage_flash_read, write: manage_flash_write, open: rtas_excl_open, release: rtas_excl_release, }; -static struct file_operations validate_flash_operations = { +static const struct file_operations validate_flash_operations = { read: validate_flash_read, write: validate_flash_write, open: rtas_excl_open, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/rtas-proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/rtas-proc.c 2009-07-26 12:41:45.782492740 -0400 @@ -176,30 +176,30 @@ static ssize_t ppc_rtas_errinjct_write(s static ssize_t ppc_rtas_errinjct_read(struct file *file, char *buf, size_t count, loff_t *ppos); -struct file_operations ppc_rtas_poweron_operations = { +const struct file_operations ppc_rtas_poweron_operations = { .read = ppc_rtas_poweron_read, .write = ppc_rtas_poweron_write }; -struct file_operations ppc_rtas_progress_operations = { +const struct file_operations ppc_rtas_progress_operations = { .read = ppc_rtas_progress_read, .write = ppc_rtas_progress_write }; -struct file_operations ppc_rtas_clock_operations = { +const struct file_operations ppc_rtas_clock_operations = { .read = ppc_rtas_clock_read, .write = ppc_rtas_clock_write }; -struct file_operations ppc_rtas_tone_freq_operations = { +const struct file_operations ppc_rtas_tone_freq_operations = { .read = ppc_rtas_tone_freq_read, .write = ppc_rtas_tone_freq_write }; -struct file_operations ppc_rtas_tone_volume_operations = { +const struct file_operations ppc_rtas_tone_volume_operations = { .read = ppc_rtas_tone_volume_read, .write = ppc_rtas_tone_volume_write }; -struct file_operations ppc_rtas_errinjct_operations = { +const struct file_operations ppc_rtas_errinjct_operations = { .open = ppc_rtas_errinjct_open, .read = ppc_rtas_errinjct_read, .write = ppc_rtas_errinjct_write, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/rtc.c 2009-07-26 12:41:45.787594756 -0400 @@ -179,7 +179,7 @@ static int rtc_release(struct inode *ino /* * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { .owner = THIS_MODULE, .llseek = rtc_llseek, .read = rtc_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/scanlog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/scanlog.c 2009-07-26 12:41:45.791165445 -0400 @@ -190,7 +190,7 @@ static int scanlog_release(struct inode return 0; } -struct file_operations scanlog_fops = { +const struct file_operations scanlog_fops = { owner: THIS_MODULE, read: scanlog_read, write: scanlog_write, only in patch2: unchanged: --- linux-2.4.37.4/arch/ppc64/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/ppc64/kernel/setup.c 2009-07-26 12:42:24.895713468 -0400 @@ -306,7 +306,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start =c_start, .next = c_next, .stop = c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/s390/kernel/debug.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/s390/kernel/debug.c 2009-07-26 12:42:01.875856634 -0400 @@ -159,14 +159,14 @@ DECLARE_MUTEX(debug_lock); static int initialized = 0; -static struct file_operations debug_file_ops = { +static const struct file_operations debug_file_ops = { read: debug_output, write: debug_input, open: debug_open, release: debug_close, }; -static struct inode_operations debug_inode_ops = { +static const struct inode_operations debug_inode_ops = { #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,98)) default_file_ops: &debug_file_ops, /* file ops */ #endif only in patch2: unchanged: --- linux-2.4.37.4/arch/s390/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/s390/kernel/setup.c 2009-07-26 12:42:24.905901826 -0400 @@ -686,7 +686,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/s390x/kernel/debug.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/s390x/kernel/debug.c 2009-07-26 12:42:01.879741455 -0400 @@ -159,14 +159,14 @@ DECLARE_MUTEX(debug_lock); static int initialized = 0; -static struct file_operations debug_file_ops = { +static const struct file_operations debug_file_ops = { read: debug_output, write: debug_input, open: debug_open, release: debug_close, }; -static struct inode_operations debug_inode_ops = { +static const struct inode_operations debug_inode_ops = { #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,98)) default_file_ops: &debug_file_ops, /* file ops */ #endif only in patch2: unchanged: --- linux-2.4.37.4/arch/s390x/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/s390x/kernel/setup.c 2009-07-26 12:42:24.909799714 -0400 @@ -545,7 +545,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/sh/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sh/kernel/setup.c 2009-07-26 12:42:24.916857280 -0400 @@ -566,7 +566,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/sh64/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sh64/kernel/setup.c 2009-07-26 12:42:24.912730340 -0400 @@ -353,7 +353,7 @@ static void *c_next(struct seq_file *m, static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/sparc/kernel/apc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sparc/kernel/apc.c 2009-07-26 12:41:45.865310918 -0400 @@ -130,7 +130,7 @@ static int apc_ioctl(struct inode *inode return 0; } -static struct file_operations apc_fops = { +static const struct file_operations apc_fops = { ioctl: apc_ioctl, open: apc_open, release: apc_release, only in patch2: unchanged: --- linux-2.4.37.4/arch/sparc/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sparc/kernel/setup.c 2009-07-26 12:42:24.927389498 -0400 @@ -516,7 +516,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/sparc64/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sparc64/kernel/setup.c 2009-07-26 12:42:24.922495601 -0400 @@ -690,7 +690,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/arch/sparc64/solaris/socksys.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/sparc64/solaris/socksys.c 2009-07-26 12:41:45.862012854 -0400 @@ -49,7 +49,7 @@ extern void mykfree(void *); static unsigned int (*sock_poll)(struct file *, poll_table *); -static struct file_operations socksys_file_ops = { +static const struct file_operations socksys_file_ops = { /* Currently empty */ }; @@ -156,7 +156,7 @@ static unsigned int socksys_poll(struct return mask; } -static struct file_operations socksys_fops = { +static const struct file_operations socksys_fops = { open: socksys_open, release: socksys_release, }; only in patch2: unchanged: --- linux-2.4.37.4/arch/x86_64/kernel/cpuid.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/x86_64/kernel/cpuid.c 2009-07-26 12:41:45.868618670 -0400 @@ -133,7 +133,7 @@ static int cpuid_open(struct inode *inod /* * File operations we support */ -static struct file_operations cpuid_fops = { +static const struct file_operations cpuid_fops = { owner: THIS_MODULE, llseek: cpuid_seek, read: cpuid_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/x86_64/kernel/msr.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/x86_64/kernel/msr.c 2009-07-26 12:41:45.872007164 -0400 @@ -240,7 +240,7 @@ static int msr_open(struct inode *inode, /* * File operations we support */ -static struct file_operations msr_fops = { +static const struct file_operations msr_fops = { owner: THIS_MODULE, llseek: msr_seek, read: msr_read, only in patch2: unchanged: --- linux-2.4.37.4/arch/x86_64/kernel/setup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/arch/x86_64/kernel/setup.c 2009-07-26 12:42:24.933227492 -0400 @@ -913,7 +913,7 @@ static void c_stop(struct seq_file *m, v { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, stop: c_stop, only in patch2: unchanged: --- linux-2.4.37.4/crypto/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/crypto/proc.c 2009-07-26 12:42:24.934833770 -0400 @@ -86,7 +86,7 @@ static int c_show(struct seq_file *m, vo return 0; } -static struct seq_operations crypto_seq_ops = { +static const struct seq_operations crypto_seq_ops = { .start = c_start, .next = c_next, .stop = c_stop, @@ -98,7 +98,7 @@ static int crypto_info_open(struct inode return seq_open(file, &crypto_seq_ops); } -static struct file_operations proc_crypto_ops = { +static const struct file_operations proc_crypto_ops = { .open = crypto_info_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/Documentation/DocBook/mousedrivers.tmpl 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/Documentation/DocBook/mousedrivers.tmpl 2009-07-26 12:41:45.886406093 -0400 @@ -248,7 +248,7 @@ void cleanup_module(void) -struct file_operations our_mouse_fops = { +const struct file_operations our_mouse_fops = { owner: THIS_MODULE, /* Automatic usage management */ read: read_mouse, /* You can read a mouse */ write: write_mouse, /* This won't do a lot */ @@ -894,7 +894,7 @@ static void ourmouse_interrupt(int irq, -struct file_operations our_mouse_fops = { +const struct file_operations our_mouse_fops = { owner: THIS_MODULE read: read_mouse, /* You can read a mouse */ write: write_mouse, /* This won't do a lot */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/acorn/char/i2c.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/acorn/char/i2c.c 2009-07-26 12:41:45.889697607 -0400 @@ -200,7 +200,7 @@ static int rtc_ioctl(struct inode *inode return -EINVAL; } -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { ioctl: rtc_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/acorn/char/mouse_ps2.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/acorn/char/mouse_ps2.c 2009-07-26 12:41:45.889697607 -0400 @@ -249,7 +249,7 @@ static unsigned int aux_poll(struct file return 0; } -struct file_operations psaux_fops = { +const struct file_operations psaux_fops = { read: read_aux, write: write_aux, poll: aux_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/acpi/system.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/acpi/system.c 2009-07-26 12:41:45.899136427 -0400 @@ -423,7 +423,7 @@ static int acpi_system_close_event(struc static unsigned int acpi_system_poll_event(struct file *file, poll_table *wait); -static struct file_operations acpi_system_event_ops = { +static const struct file_operations acpi_system_event_ops = { .open = acpi_system_open_event, .read = acpi_system_read_event, .release = acpi_system_close_event, @@ -519,7 +519,7 @@ acpi_system_poll_event( static ssize_t acpi_system_read_dsdt (struct file*, char*, size_t, loff_t*); -static struct file_operations acpi_system_dsdt_ops = { +static const struct file_operations acpi_system_dsdt_ops = { .read = acpi_system_read_dsdt, }; @@ -562,7 +562,7 @@ acpi_system_read_dsdt ( static ssize_t acpi_system_read_fadt (struct file*, char*, size_t, loff_t*); -static struct file_operations acpi_system_fadt_ops = { +static const struct file_operations acpi_system_fadt_ops = { .read = acpi_system_read_fadt, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/acsi_slm.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/acsi_slm.c 2009-07-26 12:41:45.906437789 -0400 @@ -272,7 +272,7 @@ static int slm_get_pagesize( int device, static struct timer_list slm_timer = { function: slm_test_ready }; -static struct file_operations slm_fops = { +static const struct file_operations slm_fops = { owner: THIS_MODULE, read: slm_read, write: slm_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/genhd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/genhd.c 2009-07-26 12:42:24.938124471 -0400 @@ -226,7 +226,7 @@ static int part_show(struct seq_file *s, return 0; } -struct seq_operations partitions_op = { +const struct seq_operations partitions_op = { .start = part_start, .next = part_next, .stop = part_stop, only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/loop.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/loop.c 2009-07-26 13:14:41.355218915 -0400 @@ -176,7 +176,7 @@ static int lo_send(struct loop_device *l { struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ struct address_space *mapping = file->f_dentry->d_inode->i_mapping; - struct address_space_operations *aops = mapping->a_ops; + const struct address_space_operations *aops = mapping->a_ops; struct page *page; char *kaddr, *data; unsigned long index; @@ -650,7 +650,7 @@ static int loop_set_fd(struct loop_devic goto out_putf; } } else if (S_ISREG(inode->i_mode)) { - struct address_space_operations *aops = inode->i_mapping->a_ops; + const struct address_space_operations *aops = inode->i_mapping->a_ops; /* * If we can't read - sorry. If we only can't write - well, * it's going to be read-only. only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/paride/pg.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/paride/pg.c 2009-07-26 12:41:45.911071863 -0400 @@ -261,7 +261,7 @@ static char pg_scratch[512]; /* kernel glue structures */ -static struct file_operations pg_fops = { +static const struct file_operations pg_fops = { owner: THIS_MODULE, read: pg_read, write: pg_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/paride/pt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/paride/pt.c 2009-07-26 12:41:45.918259513 -0400 @@ -263,7 +263,7 @@ static char pt_scratch[512]; /* kernel glue structures */ -static struct file_operations pt_fops = { +static const struct file_operations pt_fops = { owner: THIS_MODULE, read: pt_read, write: pt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/block/rd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/block/rd.c 2009-07-26 12:42:14.315184699 -0400 @@ -151,7 +151,7 @@ static int ramdisk_commit_write(struct f return 0; } -static struct address_space_operations ramdisk_aops = { +static const struct address_space_operations ramdisk_aops = { readpage: ramdisk_readpage, writepage: fail_writepage, prepare_write: ramdisk_prepare_write, @@ -352,7 +352,7 @@ static int initrd_release(struct inode * } -static struct file_operations initrd_fops = { +static const struct file_operations initrd_fops = { read: initrd_read, release: initrd_release, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/bluetooth/hci_vhci.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/bluetooth/hci_vhci.c 2009-07-26 12:41:45.921630364 -0400 @@ -306,7 +306,7 @@ static int hci_vhci_chr_close(struct ino return 0; } -static struct file_operations hci_vhci_fops = { +static const struct file_operations hci_vhci_fops = { owner: THIS_MODULE, llseek: hci_vhci_chr_lseek, read: hci_vhci_chr_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/acquirewdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/acquirewdt.c 2009-07-26 12:41:45.926083906 -0400 @@ -207,7 +207,7 @@ static int acq_notify_sys(struct notifie */ -static struct file_operations acq_fops = { +static const struct file_operations acq_fops = { owner: THIS_MODULE, read: acq_read, write: acq_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/advantechwdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/advantechwdt.c 2009-07-26 12:41:45.929502677 -0400 @@ -246,7 +246,7 @@ advwdt_notify_sys(struct notifier_block * Kernel Interfaces */ -static struct file_operations advwdt_fops = { +static const struct file_operations advwdt_fops = { owner: THIS_MODULE, llseek: no_llseek, write: advwdt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/agp/agpgart_fe.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/agp/agpgart_fe.c 2009-07-26 15:06:24.471123758 -0400 @@ -1075,8 +1075,7 @@ ioctl_out: return ret_val; } -static struct file_operations agp_fops = -{ +static const struct file_operations agp_fops = { owner: THIS_MODULE, llseek: no_llseek, read: agp_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/alim1535d_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/alim1535d_wdt.c 2009-07-26 12:41:45.932792780 -0400 @@ -302,7 +302,7 @@ static int __init ali_find_watchdog(void return 0; } -static struct file_operations ali_fops = { +static const struct file_operations ali_fops = { owner: THIS_MODULE, write: ali_write, ioctl: ali_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/alim7101_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/alim7101_wdt.c 2009-07-26 12:41:45.932792780 -0400 @@ -239,7 +239,7 @@ static int fop_ioctl(struct inode *inode } } -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { owner: THIS_MODULE, llseek: no_llseek, read: fop_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/amd768_rng.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/amd768_rng.c 2009-07-26 12:41:45.938177027 -0400 @@ -167,7 +167,7 @@ static ssize_t rng_dev_read (struct file } -static struct file_operations rng_chrdev_ops = { +static const struct file_operations rng_chrdev_ops = { owner: THIS_MODULE, open: rng_dev_open, release: rng_dev_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/applicom.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/applicom.c 2009-07-26 12:41:45.944759583 -0400 @@ -118,7 +118,7 @@ static int ac_ioctl(struct inode *, stru unsigned long); static void ac_interrupt(int, void *, struct pt_regs *); -static struct file_operations ac_fops = { +static const struct file_operations ac_fops = { owner:THIS_MODULE, llseek:no_llseek, read:ac_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/au1000_gpio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/au1000_gpio.c 2009-07-26 15:06:24.475531581 -0400 @@ -235,8 +235,7 @@ static int au1000gpio_ioctl(struct inode } -static struct file_operations au1000gpio_fops = -{ +static const struct file_operations au1000gpio_fops = { owner: THIS_MODULE, ioctl: au1000gpio_ioctl, open: au1000gpio_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/au1000_ts.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/au1000_ts.c 2009-07-26 12:41:45.950143034 -0400 @@ -587,7 +587,7 @@ au1000_release(struct inode * inode, str } -static struct file_operations ts_fops = { +static const struct file_operations ts_fops = { read: au1000_read, poll: au1000_poll, ioctl: au1000_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/au1000_usbraw.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/au1000_usbraw.c 2009-07-26 12:41:45.954056044 -0400 @@ -457,7 +457,7 @@ static int usbraw_ioctl(struct inode *in } -static struct file_operations usbraw_fops = { +static const struct file_operations usbraw_fops = { owner: THIS_MODULE, write: usbraw_write, read: usbraw_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/briq_panel.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/briq_panel.c 2009-07-26 12:41:45.954056044 -0400 @@ -168,7 +168,7 @@ static ssize_t do_write(struct file *fil } -static struct file_operations vfd_fops = { +static const struct file_operations vfd_fops = { read: do_read, /* Read */ write: do_write, /* Write */ open: do_open, /* Open */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/busmouse.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/busmouse.c 2009-07-26 15:06:24.479000008 -0400 @@ -332,8 +332,7 @@ static unsigned int busmouse_poll(struct return 0; } -struct file_operations busmouse_fops= -{ +const struct file_operations busmouse_fops = { owner: THIS_MODULE, read: busmouse_read, write: busmouse_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/drm_drv.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/drm_drv.h 2009-07-26 12:41:46.024343204 -0400 @@ -114,7 +114,7 @@ #endif #ifndef DRIVER_FOPS #define DRIVER_FOPS \ -static struct file_operations DRM(fops) = { \ +static const struct file_operations DRM(fops) = { \ .owner = THIS_MODULE, \ .open = DRM(open), \ .flush = DRM(flush), \ only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/drm_stub.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/drm_stub.h 2009-07-26 12:41:46.027703723 -0400 @@ -65,7 +65,7 @@ static int DRM(stub_open)(struct inode * return err; } -static struct file_operations DRM(stub_fops) = { +static const struct file_operations DRM(stub_fops) = { .owner = THIS_MODULE, .open = DRM(stub_open) }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/drm_vm.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/drm_vm.h 2009-07-26 12:42:07.656044593 -0400 @@ -31,25 +31,25 @@ #include "drmP.h" -struct vm_operations_struct DRM(vm_ops) = { +const struct vm_operations_struct DRM(vm_ops) = { nopage: DRM(vm_nopage), open: DRM(vm_open), close: DRM(vm_close), }; -struct vm_operations_struct DRM(vm_shm_ops) = { +const struct vm_operations_struct DRM(vm_shm_ops) = { nopage: DRM(vm_shm_nopage), open: DRM(vm_open), close: DRM(vm_shm_close), }; -struct vm_operations_struct DRM(vm_dma_ops) = { +const struct vm_operations_struct DRM(vm_dma_ops) = { nopage: DRM(vm_dma_nopage), open: DRM(vm_open), close: DRM(vm_close), }; -struct vm_operations_struct DRM(vm_sg_ops) = { +const struct vm_operations_struct DRM(vm_sg_ops) = { nopage: DRM(vm_sg_nopage), open: DRM(vm_open), close: DRM(vm_close), only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/ffb_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/ffb_drv.c 2009-07-26 12:41:46.031006204 -0400 @@ -27,7 +27,7 @@ #define DRIVER_PATCHLEVEL 1 #define DRIVER_FOPS \ -static struct file_operations DRM(fops) = { \ +static const struct file_operations DRM(fops) = { \ owner: THIS_MODULE, \ open: DRM(open), \ flush: DRM(flush), \ only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/i810_dma.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/i810_dma.c 2009-07-26 12:41:46.036097548 -0400 @@ -131,7 +131,7 @@ static int i810_freelist_put(drm_device_ return 0; } -static struct file_operations i810_buffer_fops = { +static const struct file_operations i810_buffer_fops = { .open = DRM(open), .flush = DRM(flush), .release = DRM(release), only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm/i830_dma.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm/i830_dma.c 2009-07-26 12:41:46.047812533 -0400 @@ -120,7 +120,7 @@ static int i830_freelist_put(drm_device_ return 0; } -static struct file_operations i830_buffer_fops = { +static const struct file_operations i830_buffer_fops = { .open = DRM(open), .flush = DRM(flush), .release = DRM(release), only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/ffb_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/ffb_drv.c 2009-07-26 12:41:45.960842061 -0400 @@ -47,7 +47,7 @@ extern int ffb_newctx(struct inode *, st extern int ffb_rmctx(struct inode *, struct file *, unsigned int, unsigned long); extern int ffb_context_switch(drm_device_t *, int, int); -static struct file_operations ffb_fops = { +static const struct file_operations ffb_fops = { owner: THIS_MODULE, open: ffb_open, flush: drm_flush, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/gamma_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/gamma_drv.c 2009-07-26 12:41:45.965767527 -0400 @@ -49,7 +49,7 @@ static drm_device_t gamma_device; -static struct file_operations gamma_fops = { +static const struct file_operations gamma_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/i810_dma.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/i810_dma.c 2009-07-26 12:41:45.972977741 -0400 @@ -143,7 +143,7 @@ static int i810_freelist_put(drm_device_ return 0; } -static struct file_operations i810_buffer_fops = { +static const struct file_operations i810_buffer_fops = { open: i810_open, flush: drm_flush, release: i810_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/i810_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/i810_drv.c 2009-07-26 12:41:45.977410707 -0400 @@ -43,7 +43,7 @@ static drm_device_t i810_device; drm_ctx_t i810_res_ctx; -static struct file_operations i810_fops = { +static const struct file_operations i810_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/mga_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/mga_drv.c 2009-07-26 12:41:45.980705531 -0400 @@ -44,7 +44,7 @@ static drm_device_t mga_device; drm_ctx_t mga_res_ctx; -static struct file_operations mga_fops = { +static const struct file_operations mga_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/r128_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/r128_drv.c 2009-07-26 12:41:45.985303701 -0400 @@ -45,7 +45,7 @@ static drm_device_t r128_device; drm_ctx_t r128_res_ctx; -static struct file_operations r128_fops = { +static const struct file_operations r128_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/radeon_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/radeon_drv.c 2009-07-26 12:41:45.993135444 -0400 @@ -42,7 +42,7 @@ static drm_device_t radeon_device; drm_ctx_t radeon_res_ctx; -static struct file_operations radeon_fops = { +static const struct file_operations radeon_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/tdfx_drv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/tdfx_drv.c 2009-07-26 12:41:45.996563330 -0400 @@ -44,7 +44,7 @@ static drm_device_t tdfx_device; drm_ctx_t tdfx_res_ctx; -static struct file_operations tdfx_fops = { +static const struct file_operations tdfx_fops = { #if LINUX_VERSION_CODE >= 0x020400 /* This started being used during 2.4.0-test */ owner: THIS_MODULE, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/drm-4.0/vm.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/drm-4.0/vm.c 2009-07-26 12:42:07.649202779 -0400 @@ -32,25 +32,25 @@ #define __NO_VERSION__ #include "drmP.h" -struct vm_operations_struct drm_vm_ops = { +const struct vm_operations_struct drm_vm_ops = { nopage: drm_vm_nopage, open: drm_vm_open, close: drm_vm_close, }; -struct vm_operations_struct drm_vm_shm_ops = { +const struct vm_operations_struct drm_vm_shm_ops = { nopage: drm_vm_shm_nopage, open: drm_vm_open, close: drm_vm_close, }; -struct vm_operations_struct drm_vm_shm_lock_ops = { +const struct vm_operations_struct drm_vm_shm_lock_ops = { nopage: drm_vm_shm_nopage_lock, open: drm_vm_open, close: drm_vm_close, }; -struct vm_operations_struct drm_vm_dma_ops = { +const struct vm_operations_struct drm_vm_dma_ops = { nopage: drm_vm_dma_nopage, open: drm_vm_open, close: drm_vm_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ds1286.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ds1286.c 2009-07-26 12:41:46.051725012 -0400 @@ -280,7 +280,7 @@ static unsigned int ds1286_poll(struct f * The various file operations we support. */ -static struct file_operations ds1286_fops = { +static const struct file_operations ds1286_fops = { .llseek = no_llseek, .read = ds1286_read, .poll = ds1286_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ds1620.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ds1620.c 2009-07-26 12:41:46.051725012 -0400 @@ -336,7 +336,7 @@ proc_therm_ds1620_read(char *buf, char * static struct proc_dir_entry *proc_therm_ds1620; #endif -static struct file_operations ds1620_fops = { +static const struct file_operations ds1620_fops = { owner: THIS_MODULE, read: ds1620_read, ioctl: ds1620_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ds1742.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ds1742.c 2009-07-26 12:41:46.055018371 -0400 @@ -312,7 +312,7 @@ static int ds1742_release(struct inode * return 0; } -static struct file_operations ds1742_fops = { +static const struct file_operations ds1742_fops = { owner:THIS_MODULE, llseek:no_llseek, ioctl:ds1742_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/dsp56k.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/dsp56k.c 2009-07-26 12:41:46.058815826 -0400 @@ -488,7 +488,7 @@ static int dsp56k_release(struct inode * return 0; } -static struct file_operations dsp56k_fops = { +static const struct file_operations dsp56k_fops = { owner: THIS_MODULE, read: dsp56k_read, write: dsp56k_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/dtlk.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/dtlk.c 2009-07-26 15:06:24.486930727 -0400 @@ -97,8 +97,7 @@ static int dtlk_release(struct inode *, static int dtlk_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); -static struct file_operations dtlk_fops = -{ +static const struct file_operations dtlk_fops = { owner: THIS_MODULE, read: dtlk_read, write: dtlk_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/efirtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/efirtc.c 2009-07-26 12:41:46.062204893 -0400 @@ -282,7 +282,7 @@ efi_rtc_close(struct inode *inode, struc * The various file operations we support. */ -static struct file_operations efi_rtc_fops = { +static const struct file_operations efi_rtc_fops = { owner: THIS_MODULE, ioctl: efi_rtc_ioctl, open: efi_rtc_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/eurotechwdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/eurotechwdt.c 2009-07-26 12:41:46.069315803 -0400 @@ -386,7 +386,7 @@ static int eurwdt_notify_sys(struct noti */ -static struct file_operations eurwdt_fops = { +static const struct file_operations eurwdt_fops = { owner: THIS_MODULE, llseek: no_llseek, write: eurwdt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/fetchop.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/fetchop.c 2009-07-26 12:42:07.659521138 -0400 @@ -75,7 +75,7 @@ static int fetchop_mmap(struct file *fil static void fetchop_open(struct vm_area_struct *vma); static void fetchop_close(struct vm_area_struct *vma); -static struct file_operations fetchop_fops = { +static const struct file_operations fetchop_fops = { owner: THIS_MODULE, mmap: fetchop_mmap, }; @@ -86,7 +86,7 @@ static struct miscdevice fetchop_miscdev &fetchop_fops }; -static struct vm_operations_struct fetchop_vm_ops = { +static const struct vm_operations_struct fetchop_vm_ops = { open: fetchop_open, close: fetchop_close, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ftape/zftape/zftape-init.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ftape/zftape/zftape-init.c 2009-07-26 15:07:50.371936662 -0400 @@ -94,8 +94,7 @@ static ssize_t zft_read (struct file *fp static ssize_t zft_write(struct file *fp, const char *buff, size_t req_len, loff_t *ppos); -static struct file_operations zft_cdev = -{ +static const struct file_operations zft_cdev = { owner: THIS_MODULE, read: zft_read, write: zft_write, @@ -205,7 +204,7 @@ static int zft_mmap(struct file *filep, lock_kernel(); if ((result = ftape_mmap(vma)) >= 0) { #ifndef MSYNC_BUG_WAS_FIXED - static struct vm_operations_struct dummy = { NULL, }; + static const struct vm_operations_struct dummy = { NULL, }; vma->vm_ops = &dummy; #endif } only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/genrtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/genrtc.c 2009-07-26 12:41:46.076029886 -0400 @@ -476,7 +476,7 @@ static int gen_rtc_read_proc(char *page, * The various file operations we support. */ -static struct file_operations gen_rtc_fops = { +static const struct file_operations gen_rtc_fops = { .owner = THIS_MODULE, #ifdef CONFIG_GEN_RTC_X .read = gen_rtc_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/geodewdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/geodewdt.c 2009-07-26 12:41:46.076029886 -0400 @@ -183,7 +183,7 @@ static int geodewdt_notify_sys(struct no return NOTIFY_DONE; } -static struct file_operations geodewdt_fops = { +static const struct file_operations geodewdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = geodewdt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/hp_psaux.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/hp_psaux.c 2009-07-26 12:41:46.079526725 -0400 @@ -414,7 +414,7 @@ static int release_aux(struct inode * in return 0; } -static struct file_operations psaux_fops = { +static const struct file_operations psaux_fops = { read: read_aux, write: write_aux, poll: aux_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/hw_random.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/hw_random.c 2009-07-26 12:41:46.084267229 -0400 @@ -106,7 +106,7 @@ struct rng_operations { }; static struct rng_operations *rng_ops; -static struct file_operations rng_chrdev_ops = { +static const struct file_operations rng_chrdev_ops = { .owner = THIS_MODULE, .open = rng_dev_open, .read = rng_dev_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/i810_rng.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/i810_rng.c 2009-07-26 12:41:46.087641389 -0400 @@ -260,7 +260,7 @@ static ssize_t rng_dev_read (struct file } -static struct file_operations rng_chrdev_ops = { +static const struct file_operations rng_chrdev_ops = { owner: THIS_MODULE, open: rng_dev_open, release: rng_dev_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/i810-tco.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/i810-tco.c 2009-07-26 12:41:46.092089319 -0400 @@ -376,7 +376,7 @@ static unsigned char __init i810tco_getd return 0; } -static struct file_operations i810tco_fops = { +static const struct file_operations i810tco_fops = { owner: THIS_MODULE, write: i810tco_write, ioctl: i810tco_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/i8k.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/i8k.c 2009-07-26 12:41:46.099557553 -0400 @@ -112,7 +112,7 @@ static int i8k_ioctl(struct inode *, str unsigned long); static void i8k_keys_set_timer(void); -static struct file_operations i8k_fops = { +static const struct file_operations i8k_fops = { read: i8k_read, ioctl: i8k_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ib700wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ib700wdt.c 2009-07-26 12:41:46.103153493 -0400 @@ -280,7 +280,7 @@ ibwdt_notify_sys(struct notifier_block * * Kernel Interfaces */ -static struct file_operations ibwdt_fops = { +static const struct file_operations ibwdt_fops = { owner: THIS_MODULE, read: ibwdt_read, write: ibwdt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/indydog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/indydog.c 2009-07-26 12:41:46.103153493 -0400 @@ -137,7 +137,7 @@ static int indydog_ioctl(struct inode *i } } -static struct file_operations indydog_fops = { +static const struct file_operations indydog_fops = { owner: THIS_MODULE, write: indydog_write, ioctl: indydog_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ip27-rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ip27-rtc.c 2009-07-26 12:41:46.106456357 -0400 @@ -192,7 +192,7 @@ static int rtc_release(struct inode *ino * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = rtc_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ip2main.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ip2main.c 2009-07-26 12:41:46.125356108 -0400 @@ -354,7 +354,7 @@ static struct termios * TermiosLocked /* This is the driver descriptor for the ip2ipl device, which is used to * download the loadware to the boards. */ -static struct file_operations ip2_ipl = { +static const struct file_operations ip2_ipl = { owner: THIS_MODULE, read: ip2_ipl_read, write: ip2_ipl_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ipmi/ipmi_devintf.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ipmi/ipmi_devintf.c 2009-07-26 12:41:46.129009206 -0400 @@ -423,7 +423,7 @@ static int ipmi_ioctl(struct inode *ino } -static struct file_operations ipmi_fops = { +static const struct file_operations ipmi_fops = { owner: THIS_MODULE, ioctl: ipmi_ioctl, open: ipmi_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ipmi/ipmi_watchdog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ipmi/ipmi_watchdog.c 2009-07-26 12:41:46.133780073 -0400 @@ -699,7 +699,7 @@ static int ipmi_close(struct inode *ino, return 0; } -static struct file_operations ipmi_wdog_fops = { +static const struct file_operations ipmi_wdog_fops = { .owner = THIS_MODULE, .read = ipmi_read, .poll = ipmi_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/isicom.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/isicom.c 2009-07-26 12:41:46.144899188 -0400 @@ -113,7 +113,7 @@ static signed char linuxb_to_isib[] = { * */ -static struct file_operations ISILoad_fops = { +static const struct file_operations ISILoad_fops = { owner: THIS_MODULE, ioctl: ISILoad_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/istallion.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/istallion.c 2009-07-26 12:41:46.172848049 -0400 @@ -782,7 +782,7 @@ static inline int stli_initpcibrd(int br * will give access to the shared memory on the Stallion intelligent * board. This is also a very useful debugging tool. */ -static struct file_operations stli_fsiomem = { +static const struct file_operations stli_fsiomem = { owner: THIS_MODULE, read: stli_memread, write: stli_memwrite, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ite_gpio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ite_gpio.c 2009-07-26 12:41:46.176764021 -0400 @@ -364,7 +364,7 @@ DEB(printk("interrupt 0x%x %d\n",ITE_GPA } } -static struct file_operations ite_gpio_fops = { +static const struct file_operations ite_gpio_fops = { owner: THIS_MODULE, ioctl: ite_gpio_ioctl, open: ite_gpio_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/lcd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/lcd.c 2009-07-26 12:41:46.180054368 -0400 @@ -556,7 +556,7 @@ static long lcd_read(struct inode *inode * The various file operations we support. */ -static struct file_operations lcd_fops = { +static const struct file_operations lcd_fops = { read: lcd_read, ioctl: lcd_ioctl, open: lcd_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/lp.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/lp.c 2009-07-26 12:41:46.184279430 -0400 @@ -664,7 +664,7 @@ static int lp_ioctl(struct inode *inode, return retval; } -static struct file_operations lp_fops = { +static const struct file_operations lp_fops = { owner: THIS_MODULE, write: lp_write, ioctl: lp_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/machzwd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/machzwd.c 2009-07-26 12:41:46.187638134 -0400 @@ -448,7 +448,7 @@ static int zf_notify_sys(struct notifier -static struct file_operations zf_fops = { +static const struct file_operations zf_fops = { owner: THIS_MODULE, read: zf_read, write: zf_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/mips_rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/mips_rtc.c 2009-07-26 12:41:46.196129347 -0400 @@ -138,7 +138,7 @@ static int rtc_release(struct inode *ino * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { owner:THIS_MODULE, llseek:no_llseek, ioctl:rtc_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/misc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/misc.c 2009-07-26 13:20:01.429691813 -0400 @@ -104,7 +104,7 @@ static int misc_open(struct inode * inod int minor = MINOR(inode->i_rdev); struct miscdevice *c; int err = -ENODEV; - struct file_operations *old_fops, *new_fops = NULL; + const struct file_operations *old_fops, *new_fops = NULL; down(&misc_sem); @@ -143,7 +143,7 @@ fail: return err; } -static struct file_operations misc_fops = { +static const struct file_operations misc_fops = { owner: THIS_MODULE, open: misc_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/mixcomwd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/mixcomwd.c 2009-07-26 15:06:24.498061434 -0400 @@ -197,8 +197,7 @@ static int mixcomwd_ioctl(struct inode * return 0; } -static struct file_operations mixcomwd_fops= -{ +static const struct file_operations mixcomwd_fops = { owner: THIS_MODULE, write: mixcomwd_write, ioctl: mixcomwd_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/mk712.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/mk712.c 2009-07-26 12:41:46.203973287 -0400 @@ -415,7 +415,7 @@ static ssize_t mk712_write(struct file * return -EINVAL; } -struct file_operations mk712_fops = { +const struct file_operations mk712_fops = { owner: THIS_MODULE, read: mk712_read, write: mk712_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/mpc8xx_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/mpc8xx_wdt.c 2009-07-26 12:41:46.207484041 -0400 @@ -144,7 +144,7 @@ mpc8xx_wdt_ioctl(struct inode *inode, st return 0; } -static struct file_operations mpc8xx_wdt_fops = { +static const struct file_operations mpc8xx_wdt_fops = { .owner = THIS_MODULE, .write = mpc8xx_wdt_write, .ioctl = mpc8xx_wdt_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/mwave/mwavedd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/mwave/mwavedd.c 2009-07-26 12:41:46.211928807 -0400 @@ -431,7 +431,7 @@ static int register_serial_portandirq(un #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) -static struct file_operations mwave_fops = { +static const struct file_operations mwave_fops = { owner:THIS_MODULE, read:mwave_read, write:mwave_write, @@ -440,7 +440,7 @@ static struct file_operations mwave_fops release:mwave_close }; #else -static struct file_operations mwave_fops = { +static const struct file_operations mwave_fops = { NULL, /* lseek */ mwave_read, /* read */ mwave_write, /* write */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/nvram.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/nvram.c 2009-07-26 12:41:46.215362236 -0400 @@ -443,7 +443,7 @@ nvram_read_proc(char *buffer, char **sta #endif /* CONFIG_PROC_FS */ -static struct file_operations nvram_fops = { +static const struct file_operations nvram_fops = { owner: THIS_MODULE, llseek: nvram_llseek, read: nvram_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/nwbutton.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/nwbutton.c 2009-07-26 12:41:46.219753101 -0400 @@ -182,7 +182,7 @@ static int button_read (struct file *fil * attempts to perform these operations on the device. */ -static struct file_operations button_fops = { +static const struct file_operations button_fops = { owner: THIS_MODULE, read: button_read, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/nwflash.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/nwflash.c 2009-07-26 15:06:24.501384880 -0400 @@ -636,8 +636,7 @@ static void kick_open(void) udelay(25); } -static struct file_operations flash_fops = -{ +static const struct file_operations flash_fops = { owner: THIS_MODULE, llseek: flash_llseek, read: flash_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/pc110pad.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/pc110pad.c 2009-07-26 12:41:46.223637358 -0400 @@ -770,7 +770,7 @@ static int pad_ioctl(struct inode *inode } -static struct file_operations pad_fops = { +static const struct file_operations pad_fops = { owner: THIS_MODULE, read: read_pad, write: write_pad, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/pc_keyb.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/pc_keyb.c 2009-07-26 12:41:46.230797491 -0400 @@ -1182,7 +1182,7 @@ static unsigned int aux_poll(struct file return 0; } -struct file_operations psaux_fops = { +const struct file_operations psaux_fops = { read: read_aux, write: write_aux, poll: aux_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/pcwd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/pcwd.c 2009-07-26 12:41:46.235375138 -0400 @@ -710,7 +710,7 @@ static struct pci_driver pcwd_driver = { probe:pcwd_init_one, }; -static struct file_operations pcwd_fops = { +static const struct file_operations pcwd_fops = { owner:THIS_MODULE, write:pcwd_write, ioctl:pcwd_ioctl, @@ -724,7 +724,7 @@ static struct miscdevice pcwd_miscdev = &pcwd_fops }; -static struct file_operations pcwd_temp_fops = { +static const struct file_operations pcwd_temp_fops = { owner:THIS_MODULE, read:pcwd_read, open:pcwd_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/ppdev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/ppdev.c 2009-07-26 12:41:46.243181386 -0400 @@ -743,7 +743,7 @@ static unsigned int pp_poll (struct file return mask; } -static struct file_operations pp_fops = { +static const struct file_operations pp_fops = { owner: THIS_MODULE, llseek: no_llseek, read: pp_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/qpmouse.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/qpmouse.c 2009-07-26 12:41:46.243181386 -0400 @@ -288,7 +288,7 @@ repeat: return 0; } -struct file_operations qp_fops = { +const struct file_operations qp_fops = { owner: THIS_MODULE, read: read_qp, write: write_qp, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/qtronix.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/qtronix.c 2009-07-26 12:41:46.250993826 -0400 @@ -569,7 +569,7 @@ static unsigned int aux_poll(struct file return 0; } -struct file_operations psaux_fops = { +const struct file_operations psaux_fops = { read: read_aux, write: write_aux, poll: aux_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/raw.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/raw.c 2009-07-26 12:41:46.262150742 -0400 @@ -37,7 +37,7 @@ int raw_ctl_ioctl(struct inode *, struct int raw_ioctl(struct inode *, struct file *, unsigned int, unsigned long); -static struct file_operations raw_fops = { +static const struct file_operations raw_fops = { read: raw_read, write: raw_write, open: raw_open, @@ -45,7 +45,7 @@ static struct file_operations raw_fops = ioctl: raw_ioctl, }; -static struct file_operations raw_ctl_fops = { +static const struct file_operations raw_ctl_fops = { ioctl: raw_ctl_ioctl, open: raw_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/rio/rio_linux.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/rio/rio_linux.c 2009-07-26 12:41:46.274434764 -0400 @@ -276,7 +276,7 @@ static struct real_driver rio_real_drive * */ -static struct file_operations rio_fw_fops = { +static const struct file_operations rio_fw_fops = { owner: THIS_MODULE, ioctl: rio_fw_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/rtc.c 2009-07-26 12:41:46.278395464 -0400 @@ -686,7 +686,7 @@ static unsigned int rtc_poll(struct file * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { owner: THIS_MODULE, llseek: no_llseek, read: rtc_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/sbc60xxwdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/sbc60xxwdt.c 2009-07-26 12:41:46.281696298 -0400 @@ -251,7 +251,7 @@ static int fop_ioctl(struct inode *inode } } -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { owner: THIS_MODULE, llseek: no_llseek, read: fop_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/sc1200wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/sc1200wdt.c 2009-07-26 15:06:24.508801882 -0400 @@ -292,8 +292,7 @@ static struct notifier_block sc1200wdt_n notifier_call: sc1200wdt_notify_sys }; -static struct file_operations sc1200wdt_fops = -{ +static const struct file_operations sc1200wdt_fops = { owner: THIS_MODULE, write: sc1200wdt_write, ioctl: sc1200wdt_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/sc520_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/sc520_wdt.c 2009-07-26 12:41:46.285624469 -0400 @@ -286,7 +286,7 @@ static int fop_ioctl(struct inode *inode } } -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { owner: THIS_MODULE, llseek: fop_llseek, write: fop_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/scx200_gpio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/scx200_gpio.c 2009-07-26 12:41:46.285624469 -0400 @@ -106,7 +106,7 @@ static int scx200_gpio_release(struct in } -static struct file_operations scx200_gpio_fops = { +static const struct file_operations scx200_gpio_fops = { .owner = THIS_MODULE, .write = scx200_gpio_write, .read = scx200_gpio_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/scx200_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/scx200_wdt.c 2009-07-26 12:41:46.289685596 -0400 @@ -200,7 +200,7 @@ static int scx200_wdt_ioctl(struct inode } } -static struct file_operations scx200_wdt_fops = { +static const struct file_operations scx200_wdt_fops = { .owner = THIS_MODULE, .write = scx200_wdt_write, .ioctl = scx200_wdt_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/shwdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/shwdt.c 2009-07-26 12:41:46.293355170 -0400 @@ -405,7 +405,7 @@ static int sh_wdt_notify_sys(struct noti return NOTIFY_DONE; } -static struct file_operations sh_wdt_fops = { +static const struct file_operations sh_wdt_fops = { owner: THIS_MODULE, llseek: no_llseek, write: sh_wdt_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/softdog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/softdog.c 2009-07-26 12:41:46.297485587 -0400 @@ -198,7 +198,7 @@ static int softdog_ioctl(struct inode *i } } -static struct file_operations softdog_fops = { +static const struct file_operations softdog_fops = { owner: THIS_MODULE, write: softdog_write, ioctl: softdog_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/sonypi.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/sonypi.c 2009-07-26 12:41:46.301162324 -0400 @@ -613,7 +613,7 @@ static int sonypi_misc_ioctl(struct inod return ret; } -static struct file_operations sonypi_misc_fops = { +static const struct file_operations sonypi_misc_fops = { .owner = THIS_MODULE, .read = sonypi_misc_read, .poll = sonypi_misc_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/stallion.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/stallion.c 2009-07-26 12:41:46.328532257 -0400 @@ -735,7 +735,7 @@ static unsigned int sc26198_baudtable[] * Define the driver info for a user level control device. Used mainly * to get at port stats - only not using the port device itself. */ -static struct file_operations stl_fsiomem = { +static const struct file_operations stl_fsiomem = { owner: THIS_MODULE, ioctl: stl_memioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/sx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/sx.c 2009-07-26 12:41:46.339672141 -0400 @@ -421,7 +421,7 @@ static struct real_driver sx_real_driver * */ -static struct file_operations sx_fw_fops = { +static const struct file_operations sx_fw_fops = { owner: THIS_MODULE, ioctl: sx_fw_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/tipar.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/tipar.c 2009-07-26 12:41:46.344772323 -0400 @@ -384,7 +384,7 @@ tipar_ioctl(struct inode *inode, struct /* ----- kernel module registering ------------------------------------ */ -static struct file_operations tipar_fops = { +static const struct file_operations tipar_fops = { owner:THIS_MODULE, llseek:no_llseek, read:tipar_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/toshiba.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/toshiba.c 2009-07-26 12:41:46.348064810 -0400 @@ -90,7 +90,7 @@ static int tosh_ioctl(struct inode *, st unsigned long); -static struct file_operations tosh_fops = { +static const struct file_operations tosh_fops = { owner: THIS_MODULE, ioctl: tosh_ioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/tpqic02.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/tpqic02.c 2009-07-26 12:41:46.364308185 -0400 @@ -2703,7 +2703,7 @@ static int qic02_tape_ioctl(struct inode /* These are (most) of the interface functions: */ -static struct file_operations qic02_tape_fops = { +static const struct file_operations qic02_tape_fops = { owner:THIS_MODULE, llseek:no_llseek, read:qic02_tape_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/vc_screen.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/vc_screen.c 2009-07-26 12:41:46.379928053 -0400 @@ -471,7 +471,7 @@ vcs_open(struct inode *inode, struct fil return 0; } -static struct file_operations vcs_fops = { +static const struct file_operations vcs_fops = { llseek: vcs_lseek, read: vcs_read, write: vcs_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/w83877f_wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/w83877f_wdt.c 2009-07-26 12:41:46.383746868 -0400 @@ -268,7 +268,7 @@ static int fop_ioctl(struct inode *inode } } -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { owner: THIS_MODULE, llseek: no_llseek, read: fop_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/wafer5823wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/wafer5823wdt.c 2009-07-26 12:41:46.387037174 -0400 @@ -199,7 +199,7 @@ static int wafwdt_notify_sys(struct noti * Kernel Interfaces */ -static struct file_operations wafwdt_fops = { +static const struct file_operations wafwdt_fops = { owner:THIS_MODULE, write:wafwdt_write, ioctl:wafwdt_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/wdt285.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/wdt285.c 2009-07-26 15:06:24.512576922 -0400 @@ -161,8 +161,7 @@ static int watchdog_ioctl(struct inode * } } -static struct file_operations watchdog_fops= -{ +static const struct file_operations watchdog_fops = { owner: THIS_MODULE, write: watchdog_write, ioctl: watchdog_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/wdt977.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/wdt977.c 2009-07-26 15:06:24.516068258 -0400 @@ -194,8 +194,7 @@ static ssize_t wdt977_write(struct file return 1; } -static struct file_operations wdt977_fops= -{ +static const struct file_operations wdt977_fops = { owner: THIS_MODULE, write: wdt977_write, open: wdt977_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/wdt.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/wdt.c 2009-07-26 12:41:46.390389462 -0400 @@ -459,7 +459,7 @@ static int wdt_notify_sys(struct notifie */ -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { owner: THIS_MODULE, llseek: no_llseek, read: wdt_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/char/wdt_pci.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/char/wdt_pci.c 2009-07-26 12:41:46.397523718 -0400 @@ -475,7 +475,7 @@ static int wdtpci_notify_sys(struct noti */ -static struct file_operations wdtpci_fops = { +static const struct file_operations wdtpci_fops = { owner: THIS_MODULE, llseek: no_llseek, read: wdtpci_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/gsc/eisa_eeprom.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/gsc/eisa_eeprom.c 2009-07-26 12:41:46.397523718 -0400 @@ -84,7 +84,7 @@ static int eisa_eeprom_release(struct in /* * The various file operations we support. */ -static struct file_operations eisa_eeprom_fops = { +static const struct file_operations eisa_eeprom_fops = { owner: THIS_MODULE, llseek: eisa_eeprom_llseek, read: eisa_eeprom_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/hil/hp_sdc_rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/hil/hp_sdc_rtc.c 2009-07-26 12:41:46.405331449 -0400 @@ -675,7 +675,7 @@ static int hp_sdc_rtc_ioctl(struct inode #endif } -static struct file_operations hp_sdc_rtc_fops = { +static const struct file_operations hp_sdc_rtc_fops = { .owner = THIS_MODULE, .llseek = hp_sdc_rtc_llseek, .read = hp_sdc_rtc_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/hotplug/pci_hotplug_core.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/hotplug/pci_hotplug_core.c 2009-07-26 13:22:01.896914502 -0400 @@ -80,9 +80,9 @@ struct hotplug_slot_core { struct dentry *cur_bus_speed_dentry; }; -static struct super_operations pcihpfs_ops; -static struct file_operations default_file_operations; -static struct inode_operations pcihpfs_dir_inode_operations; +static const struct super_operations pcihpfs_ops; +static const struct file_operations default_file_operations; +static const struct inode_operations pcihpfs_dir_inode_operations; static struct vfsmount *pcihpfs_mount; /* one of the mounts of our fs for reference counting */ static int pcihpfs_mount_count; /* times we have mounted our fs */ static spinlock_t mount_lock; /* protects our mount_count */ @@ -269,7 +269,7 @@ static int default_open (struct inode *i return 0; } -static struct file_operations default_file_operations = { +static const struct file_operations default_file_operations = { read: default_read_file, write: default_write_file, open: default_open, @@ -279,7 +279,7 @@ static struct file_operations default_fi /* file ops for the "power" files */ static ssize_t power_read_file (struct file *file, char *buf, size_t count, loff_t *offset); static ssize_t power_write_file (struct file *file, const char *buf, size_t count, loff_t *ppos); -static struct file_operations power_file_operations = { +static const struct file_operations power_file_operations = { read: power_read_file, write: power_write_file, open: default_open, @@ -289,7 +289,7 @@ static struct file_operations power_file /* file ops for the "attention" files */ static ssize_t attention_read_file (struct file *file, char *buf, size_t count, loff_t *offset); static ssize_t attention_write_file (struct file *file, const char *buf, size_t count, loff_t *ppos); -static struct file_operations attention_file_operations = { +static const struct file_operations attention_file_operations = { read: attention_read_file, write: attention_write_file, open: default_open, @@ -298,7 +298,7 @@ static struct file_operations attention_ /* file ops for the "latch" files */ static ssize_t latch_read_file (struct file *file, char *buf, size_t count, loff_t *offset); -static struct file_operations latch_file_operations = { +static const struct file_operations latch_file_operations = { read: latch_read_file, write: default_write_file, open: default_open, @@ -307,7 +307,7 @@ static struct file_operations latch_file /* file ops for the "presence" files */ static ssize_t presence_read_file (struct file *file, char *buf, size_t count, loff_t *offset); -static struct file_operations presence_file_operations = { +static const struct file_operations presence_file_operations = { read: presence_read_file, write: default_write_file, open: default_open, @@ -316,7 +316,7 @@ static struct file_operations presence_f /* file ops for the "address" files */ static ssize_t address_read_file (struct file *file, char *buf, size_t count, loff_t *offset); -static struct file_operations address_file_operations = { +static const struct file_operations address_file_operations = { read: address_read_file, write: default_write_file, open: default_open, @@ -325,7 +325,7 @@ static struct file_operations address_fi /* file ops for the "max bus speed" files */ static ssize_t max_bus_speed_read_file (struct file *file, char *buf, size_t count, loff_t *offset); -static struct file_operations max_bus_speed_file_operations = { +static const struct file_operations max_bus_speed_file_operations = { read: max_bus_speed_read_file, write: default_write_file, open: default_open, @@ -334,7 +334,7 @@ static struct file_operations max_bus_sp /* file ops for the "current bus speed" files */ static ssize_t cur_bus_speed_read_file (struct file *file, char *buf, size_t count, loff_t *offset); -static struct file_operations cur_bus_speed_file_operations = { +static const struct file_operations cur_bus_speed_file_operations = { read: cur_bus_speed_read_file, write: default_write_file, open: default_open, @@ -343,14 +343,14 @@ static struct file_operations cur_bus_sp /* file ops for the "test" files */ static ssize_t test_write_file (struct file *file, const char *buf, size_t count, loff_t *ppos); -static struct file_operations test_file_operations = { +static const struct file_operations test_file_operations = { read: default_read_file, write: test_write_file, open: default_open, llseek: default_file_lseek, }; -static struct inode_operations pcihpfs_dir_inode_operations = { +static const struct inode_operations pcihpfs_dir_inode_operations = { create: pcihpfs_create, lookup: pcihpfs_lookup, unlink: pcihpfs_unlink, @@ -359,7 +359,7 @@ static struct inode_operations pcihpfs_d mknod: pcihpfs_mknod, }; -static struct super_operations pcihpfs_ops = { +static const struct super_operations pcihpfs_ops = { statfs: pcihpfs_statfs, put_inode: force_delete, }; @@ -514,7 +514,7 @@ static int pcihpfs_create_by_name (const static struct dentry *fs_create_file (const char *name, mode_t mode, struct dentry *parent, void *data, - struct file_operations *fops) + const struct file_operations *fops) { struct dentry *dentry; int error; only in patch2: unchanged: --- linux-2.4.37.4/drivers/i2c/i2c-core.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/i2c/i2c-core.c 2009-07-26 12:41:46.420962420 -0400 @@ -86,7 +86,7 @@ static int read_bus_i2c(char *buf, char /* To implement the dynamic /proc/bus/i2c-? files, we need our own implementation of the read hook */ -static struct file_operations i2cproc_operations = { +static const struct file_operations i2cproc_operations = { .read = i2cproc_bus_read, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/i2c/i2c-dev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/i2c/i2c-dev.c 2009-07-26 12:41:46.424481491 -0400 @@ -79,7 +79,7 @@ extern int __init i2c_dev_init(void); static int i2cdev_cleanup(void); -static struct file_operations i2cdev_fops = { +static const struct file_operations i2cdev_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = i2cdev_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ide/ide-tape.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ide/ide-tape.c 2009-07-26 12:41:46.454785756 -0400 @@ -6500,7 +6500,7 @@ static ide_module_t idetape_module = { /* * Our character device supporting functions, passed to register_chrdev. */ -static struct file_operations idetape_fops = { +static const struct file_operations idetape_fops = { owner: THIS_MODULE, read: idetape_chrdev_read, write: idetape_chrdev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/amdtp.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/amdtp.c 2009-07-26 15:06:24.526379415 -0400 @@ -1196,8 +1196,7 @@ static int amdtp_release(struct inode *i return 0; } -static struct file_operations amdtp_fops = -{ +static const struct file_operations amdtp_fops = { .owner = THIS_MODULE, .write = amdtp_write, .poll = amdtp_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/dma.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/dma.c 2009-07-26 12:42:07.671681484 -0400 @@ -210,7 +210,7 @@ out: return ret; } -static struct vm_operations_struct dma_region_vm_ops = { +static const struct vm_operations_struct dma_region_vm_ops = { .nopage = dma_region_pagefault, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/dv1394.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/dv1394.c 2009-07-26 15:06:24.544937947 -0400 @@ -2414,8 +2414,7 @@ out: spin_unlock(&video->spinlock); } -static struct file_operations dv1394_fops= -{ +static const struct file_operations dv1394_fops = { .owner = THIS_MODULE, .poll = dv1394_poll, .ioctl = dv1394_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/ieee1394_core.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/ieee1394_core.c 2009-07-26 12:41:46.465158139 -0400 @@ -1008,7 +1008,7 @@ static rwlock_t ieee1394_chardevs_lock = static int ieee1394_dispatch_open(struct inode *inode, struct file *file); -static struct file_operations ieee1394_chardev_ops = { +static const struct file_operations ieee1394_chardev_ops = { .owner =THIS_MODULE, .open = ieee1394_dispatch_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/pcilynx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/pcilynx.c 2009-07-26 12:41:46.475422472 -0400 @@ -861,7 +861,7 @@ static ssize_t mem_read (struct file*, c static ssize_t mem_write(struct file*, const char*, size_t, loff_t*); -static struct file_operations aux_ops = { +static const struct file_operations aux_ops = { .owner = THIS_MODULE, .read = mem_read, .write = mem_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/raw1394.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/raw1394.c 2009-07-26 12:41:46.489085481 -0400 @@ -2538,7 +2538,7 @@ static struct hpsb_highlevel raw1394_hig .fcp_request = fcp_request, }; -static struct file_operations file_ops = { +static const struct file_operations file_ops = { .owner = THIS_MODULE, .read = raw1394_read, .write = raw1394_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/ieee1394/video1394.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/ieee1394/video1394.c 2009-07-26 15:06:24.552739752 -0400 @@ -1254,8 +1254,7 @@ static int video1394_release(struct inod return 0; } -static struct file_operations video1394_fops= -{ +static const struct file_operations video1394_fops = { .owner = THIS_MODULE, .ioctl = video1394_ioctl, .mmap = video1394_mmap, only in patch2: unchanged: --- linux-2.4.37.4/drivers/input/evdev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/input/evdev.c 2009-07-26 12:41:46.492523441 -0400 @@ -317,7 +317,7 @@ static int evdev_ioctl(struct inode *ino return -EINVAL; } -static struct file_operations evdev_fops = { +static const struct file_operations evdev_fops = { owner: THIS_MODULE, read: evdev_read, write: evdev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/input/input.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/input/input.c 2009-07-26 13:22:35.360531247 -0400 @@ -371,7 +371,7 @@ void input_unregister_handler(struct inp static int input_open_file(struct inode *inode, struct file *file) { struct input_handler *handler = input_table[MINOR(inode->i_rdev) >> 5]; - struct file_operations *old_fops, *new_fops = NULL; + const struct file_operations *old_fops, *new_fops = NULL; int err; /* No load-on-demand here? */ @@ -401,7 +401,7 @@ static int input_open_file(struct inode return err; } -static struct file_operations input_fops = { +static const struct file_operations input_fops = { owner: THIS_MODULE, open: input_open_file, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/input/joydev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/input/joydev.c 2009-07-26 12:41:46.499360419 -0400 @@ -409,7 +409,7 @@ static int joydev_ioctl(struct inode *in return -EINVAL; } -static struct file_operations joydev_fops = { +static const struct file_operations joydev_fops = { owner: THIS_MODULE, read: joydev_read, write: joydev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/input/mousedev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/input/mousedev.c 2009-07-26 12:41:46.502679025 -0400 @@ -393,7 +393,7 @@ static unsigned int mousedev_poll(struct return 0; } -struct file_operations mousedev_fops = { +const struct file_operations mousedev_fops = { owner: THIS_MODULE, read: mousedev_read, write: mousedev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/input/uinput.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/input/uinput.c 2009-07-26 12:41:46.506095474 -0400 @@ -393,7 +393,7 @@ static int uinput_ioctl(struct inode *in return retval; } -struct file_operations uinput_fops = { +const struct file_operations uinput_fops = { owner: THIS_MODULE, open: uinput_open, release: uinput_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/avmb1/capi.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/avmb1/capi.c 2009-07-26 15:06:24.563488930 -0400 @@ -1068,8 +1068,7 @@ capi_release(struct inode *inode, struct return 0; } -static struct file_operations capi_fops = -{ +static const struct file_operations capi_fops = { owner: THIS_MODULE, llseek: no_llseek, read: capi_read, @@ -1258,8 +1257,7 @@ capinc_raw_release(struct inode *inode, return 0; } -static struct file_operations capinc_raw_fops = -{ +static const struct file_operations capinc_raw_fops = { owner: THIS_MODULE, llseek: no_llseek, read: capinc_raw_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/avmb1/capifs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/avmb1/capifs.c 2009-07-26 12:42:01.895387714 -0400 @@ -71,16 +71,16 @@ static struct dentry *capifs_root_lookup static int capifs_revalidate(struct dentry *, int); static struct inode *capifs_new_inode(struct super_block *sb); -static struct file_operations capifs_root_operations = { +static const struct file_operations capifs_root_operations = { read: generic_read_dir, readdir: capifs_root_readdir, }; -struct inode_operations capifs_root_inode_operations = { +const struct inode_operations capifs_root_inode_operations = { lookup: capifs_root_lookup, }; -static struct dentry_operations capifs_dentry_operations = { +static const struct dentry_operations capifs_dentry_operations = { d_revalidate: capifs_revalidate, }; @@ -217,7 +217,7 @@ static void capifs_put_super(struct supe static int capifs_statfs(struct super_block *sb, struct statfs *buf); -static struct super_operations capifs_sops = { +static const struct super_operations capifs_sops = { put_super: capifs_put_super, statfs: capifs_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/divert/divert_procfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/divert/divert_procfs.c 2009-07-26 15:06:24.567322163 -0400 @@ -266,8 +266,7 @@ isdn_divert_ioctl(struct inode *inode, s #ifdef CONFIG_PROC_FS -static struct file_operations isdn_fops = -{ +static const struct file_operations isdn_fops = { llseek: no_llseek, read: isdn_divert_read, write: isdn_divert_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/hysdn/hysdn_procconf.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/hysdn/hysdn_procconf.c 2009-07-26 15:06:24.575205926 -0400 @@ -378,8 +378,7 @@ hysdn_conf_close(struct inode *ino, stru /******************************************************/ /* table for conf filesystem functions defined above. */ /******************************************************/ -static struct file_operations conf_fops = -{ +static const struct file_operations conf_fops = { llseek: no_llseek, read: hysdn_conf_read, write: hysdn_conf_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/hysdn/hysdn_proclog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/hysdn/hysdn_proclog.c 2009-07-26 15:06:24.579129492 -0400 @@ -390,8 +390,7 @@ hysdn_log_poll(struct file *file, poll_t /**************************************************/ /* table for log filesystem functions defined above. */ /**************************************************/ -static struct file_operations log_fops = -{ +static const struct file_operations log_fops = { llseek: no_llseek, read: hysdn_log_read, write: hysdn_log_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/isdn/isdn_common.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/isdn/isdn_common.c 2009-07-26 15:06:24.593776639 -0400 @@ -1753,8 +1753,7 @@ isdn_close(struct inode *ino, struct fil return 0; } -static struct file_operations isdn_fops = -{ +static const struct file_operations isdn_fops = { owner: THIS_MODULE, llseek: no_llseek, read: isdn_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/adb.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/adb.c 2009-07-26 12:41:46.516453308 -0400 @@ -835,7 +835,7 @@ out: return ret; } -static struct file_operations adb_fops = { +static const struct file_operations adb_fops = { llseek: no_llseek, read: adb_read, write: adb_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/ans-lcd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/ans-lcd.c 2009-07-26 12:41:46.516453308 -0400 @@ -118,7 +118,7 @@ anslcd_open( struct inode * inode, struc return 0; } -struct file_operations anslcd_fops = { +const struct file_operations anslcd_fops = { write: anslcd_write, ioctl: anslcd_ioctl, open: anslcd_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/apm_emu.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/apm_emu.c 2009-07-26 12:41:46.519868028 -0400 @@ -498,7 +498,7 @@ static int apm_emu_get_info(char *buf, c return p - buf; } -static struct file_operations apm_bios_fops = { +static const struct file_operations apm_bios_fops = { owner: THIS_MODULE, read: do_read, poll: do_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/nvram.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/nvram.c 2009-07-26 12:41:46.523289039 -0400 @@ -97,7 +97,7 @@ static int nvram_ioctl(struct inode *ino return 0; } -struct file_operations nvram_fops = { +const struct file_operations nvram_fops = { owner: THIS_MODULE, llseek: nvram_llseek, read: read_nvram, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/rtc.c 2009-07-26 12:41:46.526700656 -0400 @@ -115,7 +115,7 @@ static int rtc_release(struct inode *ino return 0; } -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: rtc_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/via-pmu68k.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/via-pmu68k.c 2009-07-26 12:41:46.533549286 -0400 @@ -1039,7 +1039,7 @@ static int /*__openfirmware*/ pmu_ioctl( return -EINVAL; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { read: pmu_read, write: pmu_write, ioctl: pmu_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/macintosh/via-pmu.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/macintosh/via-pmu.c 2009-07-26 12:41:46.547221280 -0400 @@ -2825,7 +2825,7 @@ static int pmu_ioctl(struct inode * inod return -EINVAL; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { read: pmu_read, write: pmu_write, poll: pmu_fpoll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/md/lvm.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/md/lvm.c 2009-07-26 12:41:46.588249763 -0400 @@ -405,7 +405,7 @@ static struct buffer_head *_pe_requests; static DECLARE_RWSEM(_pe_lock); -struct file_operations lvm_chr_fops = { +const struct file_operations lvm_chr_fops = { owner:THIS_MODULE, open:lvm_chr_open, release:lvm_chr_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/md/md.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/md/md.c 2009-07-26 12:42:24.957666127 -0400 @@ -3295,7 +3295,7 @@ static int md_seq_show(struct seq_file * } -static struct seq_operations md_seq_ops = { +static const struct seq_operations md_seq_ops = { .start = md_seq_start, .next = md_seq_next, .stop = md_seq_stop, @@ -3310,7 +3310,7 @@ static int md_seq_open(struct inode *ino return error; } -static struct file_operations md_seq_fops = { +static const struct file_operations md_seq_fops = { .open = md_seq_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/radio/miropcm20-rds.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/radio/miropcm20-rds.c 2009-07-26 12:41:46.608744355 -0400 @@ -105,7 +105,7 @@ static ssize_t rds_f_read(struct file *f } } -static struct file_operations rds_f_ops = { +static const struct file_operations rds_f_ops = { read: rds_f_read, open: rds_f_open, release: rds_f_release only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/video/cpia.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/video/cpia.c 2009-07-26 12:41:46.625723880 -0400 @@ -3064,7 +3064,7 @@ static int cpia_mmap(struct file *file, return 0; } -static struct file_operations cpia_fops = { +static const struct file_operations cpia_fops = { owner: THIS_MODULE, open: cpia_open, release: cpia_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/video/meye.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/video/meye.c 2009-07-26 12:41:46.646370499 -0400 @@ -1252,7 +1252,7 @@ static int meye_mmap(struct file *file, return 0; } -static struct file_operations meye_fops = { +static const struct file_operations meye_fops = { .owner = THIS_MODULE, .open = meye_open, .release = meye_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/video/tvmixer.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/video/tvmixer.c 2009-07-26 12:41:46.646370499 -0400 @@ -226,7 +226,7 @@ static struct i2c_driver driver = { .detach_client = tvmixer_clients, }; -static struct file_operations tvmixer_fops = { +static const struct file_operations tvmixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = tvmixer_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/video/videodev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/video/videodev.c 2009-07-26 15:06:24.597260241 -0400 @@ -155,7 +155,7 @@ static int video_open(struct inode *inod } } if (vfl->fops) { - struct file_operations *old_fops; + const struct file_operations *old_fops; old_fops = file->f_op; file->f_op = fops_get(vfl->fops); @@ -489,8 +489,7 @@ static void videodev_proc_destroy_dev (s #endif /* CONFIG_VIDEO_PROC_FS */ -static struct file_operations video_fops= -{ +static const struct file_operations video_fops = { owner: THIS_MODULE, llseek: no_llseek, read: video_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/media/video/vino.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/media/video/vino.c 2009-07-26 12:41:46.653210075 -0400 @@ -1007,7 +1007,7 @@ static int vino_ioctl(struct inode *inod return err; } -static struct file_operations vino_fops = { +static const struct file_operations vino_fops = { .owner = THIS_MODULE, .open = vino_open, .release = vino_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/message/fusion/mptctl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/message/fusion/mptctl.c 2009-07-26 12:41:46.670298296 -0400 @@ -2738,7 +2738,7 @@ mptctl_hp_targetinfo(unsigned long arg) #define owner_THIS_MODULE #endif -static struct file_operations mptctl_fops = { +static const struct file_operations mptctl_fops = { owner_THIS_MODULE .llseek = no_llseek, .read = mptctl_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/message/i2o/i2o_config.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/message/i2o/i2o_config.c 2009-07-26 15:06:24.604508612 -0400 @@ -890,8 +890,7 @@ static int cfg_fasync(int fd, struct fil return fasync_helper(fd, fp, on, &p->fasync); } -static struct file_operations config_fops = -{ +static const struct file_operations config_fops = { owner: THIS_MODULE, llseek: no_llseek, read: cfg_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/mtd/ftl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/mtd/ftl.c 2009-07-26 12:41:46.680556413 -0400 @@ -231,7 +231,7 @@ static int ftl_reread_partitions(int min static void ftl_erase_callback(struct erase_info *done); #if LINUX_VERSION_CODE < 0x20326 -static struct file_operations ftl_blk_fops = { +static const struct file_operations ftl_blk_fops = { open: ftl_open, release: ftl_close, ioctl: ftl_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/mtd/mtdblock.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/mtd/mtdblock.c 2009-07-26 15:06:24.607993468 -0400 @@ -567,8 +567,7 @@ static int mtdblock_ioctl(struct inode * } #if LINUX_VERSION_CODE < 0x20326 -static struct file_operations mtd_fops = -{ +static const struct file_operations mtd_fops = { open: mtdblock_open, ioctl: mtdblock_ioctl, release: mtdblock_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/mtd/mtdblock_ro.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/mtd/mtdblock_ro.c 2009-07-26 15:06:24.612130487 -0400 @@ -242,8 +242,7 @@ static int mtdblock_ioctl(struct inode * } #if LINUX_VERSION_CODE < 0x20326 -static struct file_operations mtd_fops = -{ +static const struct file_operations mtd_fops = { open: mtdblock_open, ioctl: mtdblock_ioctl, release: mtdblock_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/mtd/mtdchar.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/mtd/mtdchar.c 2009-07-26 12:41:46.683863498 -0400 @@ -533,7 +533,7 @@ static int mtd_ioctl(struct inode *inode return ret; } /* memory_ioctl */ -static struct file_operations mtd_fops = { +static const struct file_operations mtd_fops = { owner: THIS_MODULE, llseek: mtd_lseek, /* lseek */ read: mtd_read, /* read */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/mtd/nftlcore.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/mtd/nftlcore.c 2009-07-26 12:41:46.690696810 -0400 @@ -1020,7 +1020,7 @@ static int nftl_release(struct inode *in return 0; } #if LINUX_VERSION_CODE < 0x20326 -static struct file_operations nftl_fops = { +static const struct file_operations nftl_fops = { read: block_read, write: block_write, ioctl: nftl_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/bonding/bond_main.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/bonding/bond_main.c 2009-07-26 12:42:24.980123807 -0400 @@ -3246,7 +3246,7 @@ static int bond_info_seq_show(struct seq return 0; } -static struct seq_operations bond_info_seq_ops = { +static const struct seq_operations bond_info_seq_ops = { .start = bond_info_seq_start, .next = bond_info_seq_next, .stop = bond_info_seq_stop, @@ -3270,7 +3270,7 @@ static int bond_info_open(struct inode * return res; } -static struct file_operations bond_info_fops = { +static const struct file_operations bond_info_fops = { .owner = THIS_MODULE, .open = bond_info_open, .read = seq_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/ibmveth.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/ibmveth.c 2009-07-26 12:42:25.007461994 -0400 @@ -1013,7 +1013,7 @@ static int ibmveth_seq_show(struct seq_f return 0; } -static struct seq_operations ibmveth_seq_ops = { +static const struct seq_operations ibmveth_seq_ops = { .start = ibmveth_seq_start, .next = ibmveth_seq_next, .stop = ibmveth_seq_stop, @@ -1036,7 +1036,7 @@ static int ibmveth_proc_open(struct inod return rc; } -static struct file_operations ibmveth_proc_fops = { +static const struct file_operations ibmveth_proc_fops = { .owner = THIS_MODULE, .open = ibmveth_proc_open, .read = seq_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/ppp_generic.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/ppp_generic.c 2009-07-26 12:41:46.735261611 -0400 @@ -764,7 +764,7 @@ static int ppp_unattached_ioctl(struct p return err; } -static struct file_operations ppp_device_fops = { +static const struct file_operations ppp_device_fops = { owner: THIS_MODULE, read: ppp_read, write: ppp_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/tun.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/tun.c 2009-07-26 12:41:46.738669593 -0400 @@ -563,7 +563,7 @@ static int tun_chr_close(struct inode *i return 0; } -static struct file_operations tun_fops = { +static const struct file_operations tun_fops = { owner: THIS_MODULE, llseek: no_llseek, read: tun_chr_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/wan/8253x/8253xini.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/wan/8253x/8253xini.c 2009-07-26 15:06:24.625776115 -0400 @@ -182,8 +182,7 @@ struct net_device auraXX20n_prototype = sab8253xn_init /* network driver initialization */ }; -struct file_operations sab8253xc_fops = -{ +const struct file_operations sab8253xc_fops = { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)) NULL, #endif only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/wan/comx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/wan/comx.c 2009-07-26 12:42:01.898935218 -0400 @@ -96,7 +96,7 @@ static int comx_mkdir(struct inode *, st static int comx_rmdir(struct inode *, struct dentry *); static struct dentry *comx_lookup(struct inode *, struct dentry *); -static struct inode_operations comx_root_inode_ops = { +static const struct inode_operations comx_root_inode_ops = { lookup: comx_lookup, mkdir: comx_mkdir, rmdir: comx_rmdir, @@ -106,7 +106,7 @@ static int comx_delete_dentry(struct den static struct proc_dir_entry *create_comx_proc_entry(char *name, int mode, int size, struct proc_dir_entry *dir); -static struct dentry_operations comx_dentry_operations = { +static const struct dentry_operations comx_dentry_operations = { d_delete: comx_delete_dentry, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/wan/cosa.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/wan/cosa.c 2009-07-26 12:41:46.748917944 -0400 @@ -310,7 +310,7 @@ static int cosa_chardev_ioctl(struct ino static int cosa_fasync(struct inode *inode, struct file *file, int on); #endif -static struct file_operations cosa_fops = { +static const struct file_operations cosa_fops = { owner: THIS_MODULE, llseek: no_llseek, read: cosa_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/net/wireless/airo.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/net/wireless/airo.c 2009-07-26 12:41:46.783108382 -0400 @@ -3473,53 +3473,53 @@ static int proc_BSSList_open( struct ino static int proc_config_open( struct inode *inode, struct file *file ); static int proc_wepkey_open( struct inode *inode, struct file *file ); -static struct file_operations proc_statsdelta_ops = { +static const struct file_operations proc_statsdelta_ops = { .read = proc_read, .open = proc_statsdelta_open, .release = proc_close }; -static struct file_operations proc_stats_ops = { +static const struct file_operations proc_stats_ops = { .read = proc_read, .open = proc_stats_open, .release = proc_close }; -static struct file_operations proc_status_ops = { +static const struct file_operations proc_status_ops = { .read = proc_read, .open = proc_status_open, .release = proc_close }; -static struct file_operations proc_SSID_ops = { +static const struct file_operations proc_SSID_ops = { .read = proc_read, .write = proc_write, .open = proc_SSID_open, .release = proc_close }; -static struct file_operations proc_BSSList_ops = { +static const struct file_operations proc_BSSList_ops = { .read = proc_read, .write = proc_write, .open = proc_BSSList_open, .release = proc_close }; -static struct file_operations proc_APList_ops = { +static const struct file_operations proc_APList_ops = { .read = proc_read, .write = proc_write, .open = proc_APList_open, .release = proc_close }; -static struct file_operations proc_config_ops = { +static const struct file_operations proc_config_ops = { .read = proc_read, .write = proc_write, .open = proc_config_open, .release = proc_close }; -static struct file_operations proc_wepkey_ops = { +static const struct file_operations proc_wepkey_ops = { .read = proc_read, .write = proc_write, .open = proc_wepkey_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/pcmcia/ds.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/pcmcia/ds.c 2009-07-26 12:41:46.793380873 -0400 @@ -867,7 +867,7 @@ static int ds_ioctl(struct inode * inode /*====================================================================*/ -static struct file_operations ds_fops = { +static const struct file_operations ds_fops = { owner: THIS_MODULE, open: ds_open, release: ds_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/pnp/isapnp_proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/pnp/isapnp_proc.c 2009-07-26 15:06:24.632464575 -0400 @@ -205,8 +205,7 @@ static unsigned int isapnp_info_entry_po return POLLIN | POLLRDNORM; } -static struct file_operations isapnp_info_entry_operations = -{ +static const struct file_operations isapnp_info_entry_operations = { llseek: isapnp_info_entry_lseek, read: isapnp_info_entry_read, write: isapnp_info_entry_write, @@ -269,8 +268,7 @@ static ssize_t isapnp_proc_bus_read(stru return nbytes; } -static struct file_operations isapnp_proc_bus_file_operations = -{ +static const struct file_operations isapnp_proc_bus_file_operations = { llseek: isapnp_proc_bus_lseek, read: isapnp_proc_bus_read, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/block/dasd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/block/dasd.c 2009-07-26 12:42:01.926639907 -0400 @@ -4968,14 +4968,14 @@ dasd_devices_close (struct inode *inode, return rc; } -static struct file_operations dasd_devices_file_ops = { +static const struct file_operations dasd_devices_file_ops = { read:dasd_generic_read, /* read */ write:dasd_devices_write, /* write */ open:dasd_devices_open, /* open */ release:dasd_devices_close, /* close */ }; -static struct inode_operations dasd_devices_inode_ops = { +static const struct inode_operations dasd_devices_inode_ops = { }; static int @@ -5248,14 +5248,14 @@ dasd_statistics_write (struct file *file return user_len; } -static struct file_operations dasd_statistics_file_ops = { +static const struct file_operations dasd_statistics_file_ops = { read:dasd_generic_read, /* read */ write:dasd_statistics_write, /* write */ open:dasd_statistics_open, /* open */ release:dasd_devices_close, /* close */ }; -static struct inode_operations dasd_statistics_inode_ops = { +static const struct inode_operations dasd_statistics_inode_ops = { }; int only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/block/xpram.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/block/xpram.c 2009-07-26 12:41:46.827558497 -0400 @@ -717,7 +717,7 @@ int xpram_ioctl (struct inode *inode, st */ #if (XPRAM_VERSION == 22) -struct file_operations xpram_fops = { +const struct file_operations xpram_fops = { NULL, /* lseek: default */ block_read, block_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/char/tapeblock.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/char/tapeblock.c 2009-07-26 12:41:46.830973127 -0400 @@ -38,7 +38,7 @@ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98)) static struct block_device_operations tapeblock_fops = { #else -static struct file_operations tapeblock_fops = { +static const struct file_operations tapeblock_fops = { #endif owner : THIS_MODULE, open : tapeblock_open, /* open */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/char/tape.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/char/tape.c 2009-07-26 15:06:54.874073841 -0400 @@ -203,15 +203,13 @@ tape_devices_release (struct inode *inod return rc; } -static struct file_operations tape_devices_file_ops = -{ +static const struct file_operations tape_devices_file_ops = { read:tape_devices_read, /* read */ open:tape_devices_open, /* open */ release:tape_devices_release, /* close */ }; -static struct inode_operations tape_devices_inode_ops = -{ +static const struct inode_operations tape_devices_inode_ops = { #if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98)) default_file_ops:&tape_devices_file_ops /* file ops */ #endif /* LINUX_IS_24 */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/char/tapechar.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/char/tapechar.c 2009-07-26 15:06:24.642867786 -0400 @@ -36,8 +36,7 @@ /* * file operation structure for tape devices */ -static struct file_operations tape_fops = -{ +static const struct file_operations tape_fops = { // owner : THIS_MODULE, llseek:NULL, /* lseek - default */ read:tape_read, /* read */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/char/tubfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/char/tubfs.c 2009-07-26 12:41:46.834405302 -0400 @@ -22,7 +22,7 @@ static int fs3270_wait(tub_t *, long *); static void fs3270_int(tub_t *tubp, devstat_t *dsp); extern void tty3270_refresh(tub_t *); -static struct file_operations fs3270_fops = { +static const struct file_operations fs3270_fops = { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)) owner: THIS_MODULE, /* owner */ #endif only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/net/ctcmain.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/net/ctcmain.c 2009-07-26 12:42:01.945562756 -0400 @@ -3202,38 +3202,38 @@ static ssize_t ctc_stat_read(struct file return ret; } -static struct file_operations ctc_stat_fops = { +static const struct file_operations ctc_stat_fops = { read: ctc_stat_read, write: ctc_stat_write, open: ctc_stat_open, release: ctc_stat_close, }; -static struct file_operations ctc_ctrl_fops = { +static const struct file_operations ctc_ctrl_fops = { read: ctc_ctrl_read, write: ctc_ctrl_write, open: ctc_ctrl_open, release: ctc_ctrl_close, }; -static struct file_operations ctc_loglevel_fops = { +static const struct file_operations ctc_loglevel_fops = { read: ctc_loglevel_read, write: ctc_loglevel_write, open: ctc_loglevel_open, release: ctc_loglevel_close, }; -static struct inode_operations ctc_stat_iops = { +static const struct inode_operations ctc_stat_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &ctc_stat_fops #endif }; -static struct inode_operations ctc_ctrl_iops = { +static const struct inode_operations ctc_ctrl_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &ctc_ctrl_fops #endif }; -static struct inode_operations ctc_loglevel_iops = { +static const struct inode_operations ctc_loglevel_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &ctc_loglevel_fops #endif only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/net/netiucv.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/net/netiucv.c 2009-07-26 12:42:01.957893536 -0400 @@ -1648,39 +1648,39 @@ netiucv_stat_read(struct file *file, cha return ret; } -static struct file_operations netiucv_stat_fops = { +static const struct file_operations netiucv_stat_fops = { read: netiucv_stat_read, write: netiucv_stat_write, open: netiucv_stat_open, release: netiucv_stat_close, }; -static struct file_operations netiucv_buffer_fops = { +static const struct file_operations netiucv_buffer_fops = { read: netiucv_buffer_read, write: netiucv_buffer_write, open: netiucv_buffer_open, release: netiucv_buffer_close, }; -static struct file_operations netiucv_user_fops = { +static const struct file_operations netiucv_user_fops = { read: netiucv_user_read, write: netiucv_user_write, open: netiucv_user_open, release: netiucv_user_close, }; -static struct inode_operations netiucv_stat_iops = { +static const struct inode_operations netiucv_stat_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &netiucv_stat_fops #endif }; -static struct inode_operations netiucv_buffer_iops = { +static const struct inode_operations netiucv_buffer_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &netiucv_buffer_fops #endif }; -static struct inode_operations netiucv_user_iops = { +static const struct inode_operations netiucv_user_iops = { #if LINUX_VERSION_CODE < 0x020363 default_file_ops: &netiucv_user_fops #endif only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/net/qeth.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/net/qeth.c 2009-07-26 15:06:24.697565821 -0400 @@ -10929,8 +10929,7 @@ static int qeth_procfile_ioctl(struct in return result; }; -static struct file_operations qeth_procfile_fops = -{ +static const struct file_operations qeth_procfile_fops = { ioctl:qeth_procfile_ioctl, read:qeth_procfile_read, write:qeth_procfile_write, @@ -10940,8 +10939,7 @@ static struct file_operations qeth_procf static struct proc_dir_entry *qeth_proc_file; -static struct file_operations qeth_ipato_procfile_fops = -{ +static const struct file_operations qeth_ipato_procfile_fops = { read:qeth_procfile_read, /* same as above! */ write:qeth_ipato_procfile_write, open:qeth_ipato_procfile_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/s390/s390io.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/s390/s390io.c 2009-07-26 12:41:46.909625071 -0400 @@ -8350,7 +8350,7 @@ chan_subch_read (struct file *file, char } } -static struct file_operations chan_subch_file_ops = { +static const struct file_operations chan_subch_file_ops = { read:chan_subch_read, open:chan_subch_open, release:chan_subch_close, }; @@ -8597,17 +8597,17 @@ cio_chpid_entry_open (struct inode *inod return rc; } -static struct file_operations cio_sensedata_entry_file_ops = { +static const struct file_operations cio_sensedata_entry_file_ops = { read:cio_device_entry_read, open:cio_sensedata_entry_open, release:cio_device_entry_close, }; -static struct file_operations cio_in_use_entry_file_ops = { +static const struct file_operations cio_in_use_entry_file_ops = { read:cio_device_entry_read, open:cio_in_use_entry_open, release:cio_device_entry_close, }; -static struct file_operations cio_chpid_entry_file_ops = { +static const struct file_operations cio_chpid_entry_file_ops = { read:cio_device_entry_read, open:cio_chpid_entry_open, release:cio_device_entry_close, }; @@ -8926,7 +8926,7 @@ cio_ignore_proc_write (struct file *file return user_len; } -static struct file_operations cio_ignore_proc_file_ops = { +static const struct file_operations cio_ignore_proc_file_ops = { read:cio_ignore_proc_read, open:cio_ignore_proc_open, write:cio_ignore_proc_write, release:cio_ignore_proc_close, }; @@ -9019,7 +9019,7 @@ cio_irq_proc_read (struct file *file, ch } } -static struct file_operations cio_irq_proc_file_ops = { +static const struct file_operations cio_irq_proc_file_ops = { read:cio_irq_proc_read, open:cio_irq_proc_open, release:cio_irq_proc_close, }; @@ -9177,7 +9177,7 @@ cio_chpids_proc_write (struct file *file return user_len; } -static struct file_operations cio_chpids_proc_file_ops = +static const struct file_operations cio_chpids_proc_file_ops = { read:cio_chpids_proc_read, open:cio_chpids_proc_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/audio/audio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/audio/audio.c 2009-07-26 12:41:46.923293829 -0400 @@ -1701,7 +1701,7 @@ static int sparcaudio_ioctl(struct inode return retval; } -static struct file_operations sparcaudioctl_fops = { +static const struct file_operations sparcaudioctl_fops = { owner: THIS_MODULE, poll: sparcaudio_poll, ioctl: sparcaudio_ioctl, @@ -1893,7 +1893,7 @@ static int sparcaudio_release(struct ino return 0; } -static struct file_operations sparcaudio_fops = { +static const struct file_operations sparcaudio_fops = { owner: THIS_MODULE, llseek: no_llseek, read: sparcaudio_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/bpp.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/bpp.c 2009-07-26 12:41:46.929994484 -0400 @@ -859,7 +859,7 @@ static int bpp_ioctl(struct inode *inode return errno; } -static struct file_operations bpp_fops = { +static const struct file_operations bpp_fops = { owner: THIS_MODULE, read: bpp_read, write: bpp_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/cpwatchdog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/cpwatchdog.c 2009-07-26 12:41:46.936951049 -0400 @@ -461,7 +461,7 @@ static void wd_interrupt(int irq, void * return; } -static struct file_operations wd_fops = { +static const struct file_operations wd_fops = { owner: THIS_MODULE, ioctl: wd_ioctl, open: wd_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/display7seg.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/display7seg.c 2009-07-26 12:41:46.936951049 -0400 @@ -164,7 +164,7 @@ static int d7s_ioctl(struct inode *inode return 0; } -static struct file_operations d7s_fops = { +static const struct file_operations d7s_fops = { owner: THIS_MODULE, ioctl: d7s_ioctl, open: d7s_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/envctrl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/envctrl.c 2009-07-26 12:41:46.943788438 -0400 @@ -721,7 +721,7 @@ envctrl_release(struct inode *inode, str return 0; } -static struct file_operations envctrl_fops = { +static const struct file_operations envctrl_fops = { owner: THIS_MODULE, read: envctrl_read, ioctl: envctrl_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/flash.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/flash.c 2009-07-26 12:41:46.947088359 -0400 @@ -147,7 +147,7 @@ flash_release(struct inode *inode, struc return 0; } -static struct file_operations flash_fops = { +static const struct file_operations flash_fops = { /* no write to the Flash, use mmap * and play flash dependent tricks. */ only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/jsflash.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/jsflash.c 2009-07-26 12:41:46.950639273 -0400 @@ -533,7 +533,7 @@ static int jsfd_release(struct inode *in return 0; } -static struct file_operations jsf_fops = { +static const struct file_operations jsf_fops = { owner: THIS_MODULE, llseek: jsf_lseek, read: jsf_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/openprom.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/openprom.c 2009-07-26 12:41:46.957476987 -0400 @@ -610,7 +610,7 @@ static int openprom_release(struct inode return 0; } -static struct file_operations openprom_fops = { +static const struct file_operations openprom_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: openprom_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/pcikbd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/pcikbd.c 2009-07-26 12:41:46.964317511 -0400 @@ -1183,7 +1183,7 @@ static unsigned int aux_poll(struct file return 0; } -struct file_operations psaux_fops = { +const struct file_operations psaux_fops = { owner: THIS_MODULE, read: aux_read, write: aux_write, @@ -1198,7 +1198,7 @@ static int aux_no_open(struct inode *ino return -ENODEV; } -struct file_operations psaux_no_fops = { +const struct file_operations psaux_no_fops = { owner: THIS_MODULE, open: aux_no_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/riowatchdog.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/riowatchdog.c 2009-07-26 12:41:46.967635463 -0400 @@ -199,7 +199,7 @@ static ssize_t riowd_read(struct file *f return -EINVAL; } -static struct file_operations riowd_fops = { +static const struct file_operations riowd_fops = { owner: THIS_MODULE, ioctl: riowd_ioctl, open: riowd_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/rtc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/rtc.c 2009-07-26 12:41:46.967635463 -0400 @@ -137,7 +137,7 @@ static int rtc_release(struct inode *ino return 0; } -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: rtc_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/sunkbd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/sunkbd.c 2009-07-26 15:06:24.704391895 -0400 @@ -1546,8 +1546,7 @@ kbd_close (struct inode *i, struct file return 0; } -static struct file_operations kbd_fops = -{ +static const struct file_operations kbd_fops = { read: kbd_read, poll: kbd_poll, ioctl: kbd_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/sunmouse.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/sunmouse.c 2009-07-26 12:41:46.974566152 -0400 @@ -586,7 +586,7 @@ sun_mouse_ioctl (struct inode *inode, st return 0; } -struct file_operations sun_mouse_fops = { +const struct file_operations sun_mouse_fops = { read: sun_mouse_read, write: sun_mouse_write, poll: sun_mouse_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/uctrl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/uctrl.c 2009-07-26 12:41:46.977854375 -0400 @@ -223,7 +223,7 @@ void uctrl_interrupt(int irq, void *dev_ printk("in uctrl_interrupt\n"); } -static struct file_operations uctrl_fops = { +static const struct file_operations uctrl_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: uctrl_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sbus/char/vfc_dev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sbus/char/vfc_dev.c 2009-07-26 12:41:46.981432125 -0400 @@ -43,7 +43,7 @@ #include "vfc.h" #include -static struct file_operations vfc_fops; +static const struct file_operations vfc_fops; static devfs_handle_t devfs_handle; /* For the directory */ struct vfc_dev **vfc_dev_lst; static char vfcstr[]="vfc"; @@ -642,7 +642,7 @@ static int vfc_mmap(struct inode *inode, } -static struct file_operations vfc_fops = { +static const struct file_operations vfc_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: vfc_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/3w-xxxx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/3w-xxxx.c 2009-07-26 12:41:46.998504593 -0400 @@ -234,7 +234,7 @@ static struct notifier_block tw_notifier }; /* File operations struct for character device */ -static struct file_operations tw_fops = { +static const struct file_operations tw_fops = { owner: THIS_MODULE, ioctl: tw_chrdev_ioctl, open: tw_chrdev_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/aacraid/linit.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/aacraid/linit.c 2009-07-26 12:41:47.005336151 -0400 @@ -122,7 +122,7 @@ static int aac_cfg_ioctl(struct inode * static int aac_cfg_open(struct inode * inode, struct file * file); static int aac_cfg_release(struct inode * inode,struct file * file); -static struct file_operations aac_cfg_fops = { +static const struct file_operations aac_cfg_fops = { owner: THIS_MODULE, ioctl: aac_cfg_ioctl, open: aac_cfg_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/dpt_i2o.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/dpt_i2o.c 2009-07-26 12:41:47.022427251 -0400 @@ -110,7 +110,7 @@ static adpt_hba* hbas[DPTI_MAX_HBA]; static adpt_hba* hba_chain = NULL; static int hba_count = 0; -static struct file_operations adpt_fops = { +static const struct file_operations adpt_fops = { ioctl: adpt_ioctl, open: adpt_open, release: adpt_close only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/gdth.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/gdth.c 2009-07-26 12:41:47.049683620 -0400 @@ -698,7 +698,7 @@ MODULE_LICENSE("GPL"); #endif /* ioctl interface */ -static struct file_operations gdth_fops = { +static const struct file_operations gdth_fops = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .ioctl = gdth_ioctl, .open = gdth_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/megaraid2.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/megaraid2.c 2009-07-26 12:41:47.077117476 -0400 @@ -97,7 +97,7 @@ static struct semaphore megaraid_ioc_mtx /* * The File Operations structure for the serial/ioctl interface of the driver */ -static struct file_operations megadev_fops = { +static const struct file_operations megadev_fops = { .ioctl = megadev_ioctl_entry, .open = megadev_open, .release = megadev_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/megaraid.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/megaraid.c 2009-07-26 12:41:47.104476830 -0400 @@ -873,7 +873,7 @@ struct mega_hbas mega_hbas[MAX_CONTROLLE */ /* For controller re-ordering */ -static struct file_operations megadev_fops = { +static const struct file_operations megadev_fops = { ioctl:megadev_ioctl_entry, open:megadev_open, release:megadev_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/osst.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/osst.c 2009-07-26 12:41:47.131710096 -0400 @@ -5501,7 +5501,7 @@ __setup("osst=", osst_setup); #endif -static struct file_operations osst_fops = { +static const struct file_operations osst_fops = { read: osst_read, write: osst_write, ioctl: osst_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/sg.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/sg.c 2009-07-26 12:42:07.686689643 -0400 @@ -1149,7 +1149,7 @@ static struct page * sg_vma_nopage(struc return page; } -static struct vm_operations_struct sg_mmap_vm_ops = { +static const struct vm_operations_struct sg_mmap_vm_ops = { nopage : sg_vma_nopage, }; @@ -1321,7 +1321,7 @@ static void sg_cmd_done_bh(Scsi_Cmnd * S } } -static struct file_operations sg_fops = { +static const struct file_operations sg_fops = { owner: THIS_MODULE, read: sg_read, write: sg_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/scsi/st.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/scsi/st.c 2009-07-26 15:06:24.724916966 -0400 @@ -3772,8 +3772,7 @@ __setup("st=", st_setup); #endif -static struct file_operations st_fops = -{ +static const struct file_operations st_fops = { owner: THIS_MODULE, read: st_read, write: st_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/ac97_plugin_wm97xx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/ac97_plugin_wm97xx.c 2009-07-26 12:41:47.155673116 -0400 @@ -789,7 +789,7 @@ static int wm97xx_release(struct inode * return 0; } -static struct file_operations ts_fops = { +static const struct file_operations ts_fops = { owner: THIS_MODULE, read: wm97xx_read, poll: wm97xx_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/ad1889.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/ad1889.c 2009-07-26 12:41:47.162611659 -0400 @@ -776,7 +776,7 @@ static int ad1889_release(struct inode * return 0; } -static struct file_operations ad1889_fops = { +static const struct file_operations ad1889_fops = { llseek: no_llseek, read: ad1889_read, write: ad1889_write, @@ -811,7 +811,7 @@ static int ad1889_mixer_ioctl(struct ino return codec->mixer_ioctl(codec, cmd, arg); } -static struct file_operations ad1889_mixer_fops = { +static const struct file_operations ad1889_mixer_fops = { llseek: no_llseek, ioctl: ad1889_mixer_ioctl, open: ad1889_mixer_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/btaudio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/btaudio.c 2009-07-26 12:41:47.169446992 -0400 @@ -425,7 +425,7 @@ static int btaudio_mixer_ioctl(struct in return 0; } -static struct file_operations btaudio_mixer_fops = { +static const struct file_operations btaudio_mixer_fops = { owner: THIS_MODULE, llseek: no_llseek, open: btaudio_mixer_open, @@ -790,7 +790,7 @@ static unsigned int btaudio_dsp_poll(str return mask; } -static struct file_operations btaudio_digital_dsp_fops = { +static const struct file_operations btaudio_digital_dsp_fops = { owner: THIS_MODULE, llseek: no_llseek, open: btaudio_dsp_open_digital, @@ -801,7 +801,7 @@ static struct file_operations btaudio_di poll: btaudio_dsp_poll, }; -static struct file_operations btaudio_analog_dsp_fops = { +static const struct file_operations btaudio_analog_dsp_fops = { owner: THIS_MODULE, llseek: no_llseek, open: btaudio_dsp_open_analog, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/dmasound/dmasound_core.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/dmasound/dmasound_core.c 2009-07-26 12:41:47.176283551 -0400 @@ -365,7 +365,7 @@ static int mixer_ioctl(struct inode *ino return -EINVAL; } -static struct file_operations mixer_fops = +static const struct file_operations mixer_fops = { owner: THIS_MODULE, llseek: no_llseek, @@ -1325,7 +1325,7 @@ static int sq_ioctl(struct inode *inode, return -EINVAL; } -static struct file_operations sq_fops = +static const struct file_operations sq_fops = { owner: THIS_MODULE, llseek: no_llseek, @@ -1548,7 +1548,7 @@ static ssize_t state_read(struct file *f return n; } -static struct file_operations state_fops = { +static const struct file_operations state_fops = { owner: THIS_MODULE, llseek: no_llseek, read: state_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/emu10k1/audio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/emu10k1/audio.c 2009-07-26 12:42:07.716594055 -0400 @@ -1020,7 +1020,7 @@ static struct page *emu10k1_mm_nopage (s return dmapage; } -struct vm_operations_struct emu10k1_mm_ops = { +const struct vm_operations_struct emu10k1_mm_ops = { nopage: emu10k1_mm_nopage, }; @@ -1558,7 +1558,7 @@ void emu10k1_waveout_bh(unsigned long re return; } -struct file_operations emu10k1_audio_fops = { +const struct file_operations emu10k1_audio_fops = { owner: THIS_MODULE, llseek: no_llseek, read: emu10k1_audio_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/emu10k1/midi.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/emu10k1/midi.c 2009-07-26 12:41:47.189829697 -0400 @@ -465,7 +465,7 @@ int emu10k1_midi_callback(unsigned long } /* MIDI file operations */ -struct file_operations emu10k1_midi_fops = { +const struct file_operations emu10k1_midi_fops = { owner: THIS_MODULE, read: emu10k1_midi_read, write: emu10k1_midi_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/emu10k1/mixer.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/emu10k1/mixer.c 2009-07-26 12:41:47.196778119 -0400 @@ -675,7 +675,7 @@ static int emu10k1_mixer_release(struct return 0; } -struct file_operations emu10k1_mixer_fops = { +const struct file_operations emu10k1_mixer_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: emu10k1_mixer_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/forte.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/forte.c 2009-07-26 12:41:47.207038573 -0400 @@ -365,7 +365,7 @@ forte_mixer_ioctl (struct inode *inode, } -static struct file_operations forte_mixer_fops = { +static const struct file_operations forte_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = forte_mixer_ioctl, @@ -1667,7 +1667,7 @@ forte_dsp_read (struct file *file, char } -static struct file_operations forte_dsp_fops = { +static const struct file_operations forte_dsp_fops = { .owner = THIS_MODULE, .llseek = &no_llseek, .read = &forte_dsp_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/hal2.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/hal2.c 2009-07-26 12:41:47.213759348 -0400 @@ -1372,7 +1372,7 @@ static int hal2_release(struct inode *in return 0; } -static struct file_operations hal2_audio_fops = { +static const struct file_operations hal2_audio_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = hal2_read, @@ -1383,7 +1383,7 @@ static struct file_operations hal2_audio .release = hal2_release, }; -static struct file_operations hal2_mixer_fops = { +static const struct file_operations hal2_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = hal2_ioctl_mixdev, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/harmony.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/harmony.c 2009-07-26 12:41:47.224120763 -0400 @@ -809,7 +809,7 @@ static void harmony_interrupt(int irq, v * Sound playing functions */ -static struct file_operations harmony_audio_fops = { +static const struct file_operations harmony_audio_fops = { owner: THIS_MODULE, llseek: no_llseek, read: harmony_audio_read, @@ -1131,7 +1131,7 @@ static int harmony_mixer_release(struct return 0; } -static struct file_operations harmony_mixer_fops = { +static const struct file_operations harmony_mixer_fops = { owner: THIS_MODULE, llseek: no_llseek, open: harmony_mixer_open, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/maestro3.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/maestro3.c 2009-07-26 12:41:47.237697110 -0400 @@ -2176,7 +2176,7 @@ static int m3_ioctl_mixdev(struct inode return codec->mixer_ioctl(codec, cmd, arg); } -static struct file_operations m3_mixer_fops = { +static const struct file_operations m3_mixer_fops = { llseek: no_llseek, ioctl: m3_ioctl_mixdev, open: m3_open_mixdev, @@ -2554,7 +2554,7 @@ static void m3_enable_ints(struct m3_car io + ASSP_CONTROL_C); } -static struct file_operations m3_audio_fops = { +static const struct file_operations m3_audio_fops = { llseek: &no_llseek, read: &m3_read, write: &m3_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/maestro.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/maestro.c 2009-07-26 12:41:47.254784924 -0400 @@ -3097,7 +3097,7 @@ ess_release(struct inode *inode, struct return 0; } -static struct file_operations ess_audio_fops = { +static const struct file_operations ess_audio_fops = { owner: THIS_MODULE, llseek: no_llseek, read: ess_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/msnd_pinnacle.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/msnd_pinnacle.c 2009-07-26 12:41:47.265041017 -0400 @@ -1100,7 +1100,7 @@ static void intr(int irq, void *dev_id, } } -static struct file_operations dev_fileops = { +static const struct file_operations dev_fileops = { owner: THIS_MODULE, read: dev_read, write: dev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/rme96xx.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/rme96xx.c 2009-07-26 12:41:47.275429428 -0400 @@ -254,8 +254,8 @@ static const char invalid_magic[] = KERN /* --------------------------------------------------------------------- */ -static struct file_operations rme96xx_audio_fops; -static struct file_operations rme96xx_mixer_fops; +static const struct file_operations rme96xx_audio_fops; +static const struct file_operations rme96xx_mixer_fops; static int numcards; typedef int32_t raw_sample_t; @@ -1736,7 +1736,7 @@ static unsigned int rme96xx_poll(struct } -static struct file_operations rme96xx_audio_fops = { +static const struct file_operations rme96xx_audio_fops = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) owner: THIS_MODULE, #endif only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/soundcard.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/soundcard.c 2009-07-26 12:41:47.282262974 -0400 @@ -493,7 +493,7 @@ static int sound_mmap(struct file *file, return 0; } -struct file_operations oss_sound_fops = { +const struct file_operations oss_sound_fops = { owner: THIS_MODULE, llseek: no_llseek, read: sound_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/sound_core.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/sound_core.c 2009-07-26 14:01:48.529849722 -0400 @@ -52,7 +52,7 @@ struct sound_unit { int unit_minor; - struct file_operations *unit_fops; + const struct file_operations *unit_fops; struct sound_unit *next; devfs_handle_t de; }; @@ -69,7 +69,7 @@ extern int msnd_pinnacle_init(void); * join into it. Called with the lock asserted */ -static int __sound_insert_unit(struct sound_unit * s, struct sound_unit **list, struct file_operations *fops, int index, int low, int top) +static int __sound_insert_unit(struct sound_unit * s, struct sound_unit **list, const struct file_operations *fops, int index, int low, int top) { int n=low; @@ -154,7 +154,7 @@ static spinlock_t sound_loader_lock = SP static devfs_handle_t devfs_handle; -static int sound_insert_unit(struct sound_unit **list, struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode) +static int sound_insert_unit(struct sound_unit **list, const struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode) { int r; struct sound_unit *s=(struct sound_unit *)kmalloc(sizeof(struct sound_unit), GFP_KERNEL); @@ -229,7 +229,7 @@ static struct sound_unit *chains[16]; * a negative error code is returned. */ -int register_sound_special(struct file_operations *fops, int unit) +int register_sound_special(const struct file_operations *fops, int unit) { char *name; @@ -299,7 +299,7 @@ EXPORT_SYMBOL(register_sound_special); * number is returned, on failure a negative error code is returned. */ -int register_sound_mixer(struct file_operations *fops, int dev) +int register_sound_mixer(const struct file_operations *fops, int dev) { return sound_insert_unit(&chains[0], fops, dev, 0, 128, "mixer", S_IRUSR | S_IWUSR); @@ -317,7 +317,7 @@ EXPORT_SYMBOL(register_sound_mixer); * number is returned, on failure a negative error code is returned. */ -int register_sound_midi(struct file_operations *fops, int dev) +int register_sound_midi(const struct file_operations *fops, int dev) { return sound_insert_unit(&chains[2], fops, dev, 2, 130, "midi", S_IRUSR | S_IWUSR); @@ -343,7 +343,7 @@ EXPORT_SYMBOL(register_sound_midi); * and will always allocate them as a matching pair - eg dsp3/audio3 */ -int register_sound_dsp(struct file_operations *fops, int dev) +int register_sound_dsp(const struct file_operations *fops, int dev) { return sound_insert_unit(&chains[3], fops, dev, 3, 131, "dsp", S_IWUSR | S_IRUSR); @@ -362,7 +362,7 @@ EXPORT_SYMBOL(register_sound_dsp); */ -int register_sound_synth(struct file_operations *fops, int dev) +int register_sound_synth(const struct file_operations *fops, int dev) { return sound_insert_unit(&chains[9], fops, dev, 9, 137, "synth", S_IRUSR | S_IWUSR); @@ -456,8 +456,7 @@ EXPORT_SYMBOL(unregister_sound_synth); static int soundcore_open(struct inode *, struct file *); -static struct file_operations soundcore_fops= -{ +static const struct file_operations soundcore_fops = { /* We must have an owner or the module locking fails */ owner: THIS_MODULE, open: soundcore_open, @@ -482,7 +481,7 @@ int soundcore_open(struct inode *inode, int chain; int unit=MINOR(inode->i_rdev); struct sound_unit *s; - struct file_operations *new_fops = NULL; + const struct file_operations *new_fops = NULL; chain=unit&0x0F; if(chain==4 || chain==5) /* dsp/audio/dsp16 */ @@ -525,7 +524,7 @@ int soundcore_open(struct inode *inode, * switching ->f_op in the first place. */ int err = 0; - struct file_operations *old_fops = file->f_op; + const struct file_operations *old_fops = file->f_op; file->f_op = new_fops; spin_unlock(&sound_loader_lock); if(file->f_op->open) only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/via82cxxx_audio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/via82cxxx_audio.c 2009-07-26 12:42:07.734618080 -0400 @@ -1629,7 +1629,7 @@ out: } -static struct file_operations via_mixer_fops = { +static const struct file_operations via_mixer_fops = { owner: THIS_MODULE, open: via_mixer_open, llseek: no_llseek, @@ -2048,7 +2048,7 @@ static int via_interrupt_init (struct vi * */ -static struct file_operations via_dsp_fops = { +static const struct file_operations via_dsp_fops = { owner: THIS_MODULE, open: via_dsp_open, release: via_dsp_release, @@ -2168,7 +2168,7 @@ static int via_mm_swapout (struct page * #endif /* VM_RESERVED */ -struct vm_operations_struct via_mm_ops = { +const struct vm_operations_struct via_mm_ops = { nopage: via_mm_nopage, #ifndef VM_RESERVED only in patch2: unchanged: --- linux-2.4.37.4/drivers/sound/vwsnd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/sound/vwsnd.c 2009-07-26 12:41:47.316448515 -0400 @@ -3029,7 +3029,7 @@ static int vwsnd_audio_release(struct in return err; } -static struct file_operations vwsnd_audio_fops = { +static const struct file_operations vwsnd_audio_fops = { owner: THIS_MODULE, llseek: no_llseek, read: vwsnd_audio_read, @@ -3219,7 +3219,7 @@ static int vwsnd_mixer_ioctl(struct inod return retval; } -static struct file_operations vwsnd_mixer_fops = { +static const struct file_operations vwsnd_mixer_fops = { owner: THIS_MODULE, llseek: no_llseek, ioctl: vwsnd_mixer_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/drivers/telephony/ixj.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/telephony/ixj.c 2009-07-26 15:06:24.776176073 -0400 @@ -6767,8 +6767,7 @@ static int ixj_fasync(int fd, struct fil return fasync_helper(fd, file_p, mode, &j->async_queue); } -struct file_operations ixj_fops = -{ +const struct file_operations ixj_fops = { owner: THIS_MODULE, read: ixj_enhanced_read, write: ixj_enhanced_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/telephony/phonedev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/telephony/phonedev.c 2009-07-26 15:06:24.776176073 -0400 @@ -49,7 +49,7 @@ static int phone_open(struct inode *inod unsigned int minor = MINOR(inode->i_rdev); int err = 0; struct phone_device *p; - struct file_operations *old_fops, *new_fops = NULL; + const struct file_operations *old_fops, *new_fops = NULL; if (minor >= PHONE_NUM_DEVICES) return -ENODEV; @@ -133,8 +133,7 @@ void phone_unregister_device(struct phon } -static struct file_operations phone_fops = -{ +static const struct file_operations phone_fops = { owner: THIS_MODULE, open: phone_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/auermain.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/auermain.c 2009-07-26 12:41:47.323282849 -0400 @@ -547,7 +547,7 @@ void auerswald_removeservice(struct auer /*----------------------------------------------------------------------*/ /* File operation structure */ -static struct file_operations auerswald_fops = { +static const struct file_operations auerswald_fops = { owner:THIS_MODULE, llseek:auerchar_llseek, read:auerchar_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/brlvger.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/brlvger.c 2009-07-26 15:06:24.783030010 -0400 @@ -228,8 +228,7 @@ static struct usb_device_id brlvger_ids }; MODULE_DEVICE_TABLE (usb, brlvger_ids); -static struct file_operations brlvger_fops = -{ +static const struct file_operations brlvger_fops = { owner: THIS_MODULE, llseek: brlvger_llseek, read: brlvger_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/dabusb.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/dabusb.c 2009-07-26 15:06:24.789873959 -0400 @@ -698,8 +698,7 @@ static int dabusb_ioctl (struct inode *i return ret; } -static struct file_operations dabusb_fops = -{ +static const struct file_operations dabusb_fops = { owner: THIS_MODULE, llseek: no_llseek, read: dabusb_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/devices.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/devices.c 2009-07-26 12:41:47.326641026 -0400 @@ -664,7 +664,7 @@ static loff_t usb_device_lseek(struct fi } } -struct file_operations usbdevfs_devices_fops = { +const struct file_operations usbdevfs_devices_fops = { llseek: usb_device_lseek, read: usb_device_read, poll: usb_device_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/devio.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/devio.c 2009-07-26 12:41:47.333542037 -0400 @@ -1310,7 +1310,7 @@ static unsigned int usbdev_poll(struct f return mask; } -struct file_operations usbdevfs_device_file_operations = { +const struct file_operations usbdevfs_device_file_operations = { llseek: usbdev_lseek, read: usbdev_read, poll: usbdev_poll, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/drivers.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/drivers.c 2009-07-26 12:41:47.336957650 -0400 @@ -113,7 +113,7 @@ static loff_t usb_driver_lseek(struct fi } } -struct file_operations usbdevfs_drivers_fops = { +const struct file_operations usbdevfs_drivers_fops = { llseek: usb_driver_lseek, read: usb_driver_read, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/hiddev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/hiddev.c 2009-07-26 12:41:47.340385868 -0400 @@ -686,7 +686,7 @@ static int hiddev_ioctl(struct inode *in return -EINVAL; } -static struct file_operations hiddev_fops = { +static const struct file_operations hiddev_fops = { owner: THIS_MODULE, read: hiddev_read, write: hiddev_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/host/uhci-debug.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/host/uhci-debug.h 2009-07-26 12:41:47.347214882 -0400 @@ -561,7 +561,7 @@ static int uhci_proc_release(struct inod return 0; } -static struct file_operations uhci_proc_operations = { +static const struct file_operations uhci_proc_operations = { open: uhci_proc_open, llseek: uhci_proc_lseek, read: uhci_proc_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/inode.c 2009-07-26 13:37:01.641887521 -0400 @@ -41,8 +41,8 @@ #include #include -static struct inode_operations usbdevfs_bus_inode_operations; -static struct file_operations usbdevfs_bus_file_operations; +static const struct inode_operations usbdevfs_bus_inode_operations; +static const struct file_operations usbdevfs_bus_file_operations; /* --------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ static LIST_HEAD(superlist); struct special { const char *name; - struct file_operations *fops; + const struct file_operations *fops; struct inode *inode; struct list_head inodes; }; @@ -313,7 +313,7 @@ static int usbdevfs_revalidate(struct de return 1; } -static struct dentry_operations usbdevfs_dentry_operations = { +static const struct dentry_operations usbdevfs_dentry_operations = { d_revalidate: usbdevfs_revalidate, }; @@ -490,19 +490,19 @@ static int usbdevfs_bus_readdir(struct f } } -static struct file_operations usbdevfs_root_file_operations = { +static const struct file_operations usbdevfs_root_file_operations = { readdir: usbdevfs_root_readdir, }; -static struct inode_operations usbdevfs_root_inode_operations = { +static const struct inode_operations usbdevfs_root_inode_operations = { lookup: usbdevfs_root_lookup, }; -static struct file_operations usbdevfs_bus_file_operations = { +static const struct file_operations usbdevfs_bus_file_operations = { readdir: usbdevfs_bus_readdir, }; -static struct inode_operations usbdevfs_bus_inode_operations = { +static const struct inode_operations usbdevfs_bus_inode_operations = { lookup: usbdevfs_bus_lookup, }; @@ -595,7 +595,7 @@ static int usbdevfs_remount(struct super return 0; } -static struct super_operations usbdevfs_sops = { +static const struct super_operations usbdevfs_sops = { read_inode: usbdevfs_read_inode, put_super: usbdevfs_put_super, statfs: usbdevfs_statfs, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/mdc800.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/mdc800.c 2009-07-26 15:06:24.796705186 -0400 @@ -916,8 +916,7 @@ static ssize_t mdc800_device_write (stru ****************************************************************************/ /* File Operations of this drivers */ -static struct file_operations mdc800_device_ops = -{ +static const struct file_operations mdc800_device_ops = { owner: THIS_MODULE, read: mdc800_device_read, write: mdc800_device_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/ov511.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/ov511.c 2009-07-26 12:41:47.381420626 -0400 @@ -410,7 +410,7 @@ rvfree(void *mem, unsigned long size) static struct proc_dir_entry *ov511_proc_entry = NULL; extern struct proc_dir_entry *video_proc_entry; -static struct file_operations ov511_control_fops = { +static const struct file_operations ov511_control_fops = { .ioctl = ov51x_control_ioctl, }; @@ -5284,7 +5284,7 @@ ov51x_v4l1_mmap(struct file *file, struc return 0; } -static struct file_operations ov511_fops = { +static const struct file_operations ov511_fops = { .owner = THIS_MODULE, .open = ov51x_v4l1_open, .release = ov51x_v4l1_close, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/printer.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/printer.c 2009-07-26 12:41:47.388025858 -0400 @@ -818,7 +818,7 @@ static unsigned int usblp_quirks (__u16 return 0; } -static struct file_operations usblp_fops = { +static const struct file_operations usblp_fops = { owner: THIS_MODULE, read: usblp_read, write: usblp_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/rio500.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/rio500.c 2009-07-26 15:06:24.800128056 -0400 @@ -436,8 +436,7 @@ read_rio(struct file *file, char *buffer return read_count; } -static struct -file_operations usb_rio_fops = { +static const struct file_operations usb_rio_fops = { read: read_rio, write: write_rio, ioctl: ioctl_rio, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/scanner.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/scanner.c 2009-07-26 15:06:24.806956282 -0400 @@ -852,8 +852,7 @@ ioctl_scanner(struct inode *inode, struc return retval; } -static struct -file_operations usb_scanner_fops = { +static const struct file_operations usb_scanner_fops = { owner: THIS_MODULE, read: read_scanner, write: write_scanner, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/tiglusb.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/tiglusb.c 2009-07-26 12:41:47.391323859 -0400 @@ -311,7 +311,7 @@ tiglusb_ioctl (struct inode *inode, stru /* ----- kernel module registering ------------------------------------ */ -static struct file_operations tiglusb_fops = { +static const struct file_operations tiglusb_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = tiglusb_read, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/usb.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/usb.c 2009-07-26 13:40:08.310327566 -0400 @@ -2324,7 +2324,7 @@ static int usb_open(struct inode * inode int minor = MINOR(inode->i_rdev); struct usb_driver *c = usb_minors[minor/16]; int err = -ENODEV; - struct file_operations *old_fops, *new_fops = NULL; + const struct file_operations *old_fops, *new_fops = NULL; /* * No load-on-demand? Randy, could you ACK that it's really not @@ -2345,7 +2345,7 @@ static int usb_open(struct inode * inode return err; } -static struct file_operations usb_fops = { +static const struct file_operations usb_fops = { owner: THIS_MODULE, open: usb_open, }; only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/usblcd.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/usblcd.c 2009-07-26 15:06:24.810269199 -0400 @@ -300,8 +300,7 @@ static struct usb_device_id id_table [] MODULE_DEVICE_TABLE (usb, id_table); -static struct -file_operations usb_lcd_fops = { +static const struct file_operations usb_lcd_fops = { .owner = THIS_MODULE, .read = read_lcd, .write = write_lcd, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/usb-midi.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/usb-midi.c 2009-07-26 12:41:47.418882331 -0400 @@ -989,7 +989,7 @@ static int usb_midi_release(struct inode return 0; } -static struct file_operations usb_midi_fops = { +static const struct file_operations usb_midi_fops = { llseek: usb_midi_llseek, read: usb_midi_read, write: usb_midi_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/usb-skeleton.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/usb-skeleton.c 2009-07-26 12:41:47.422431482 -0400 @@ -150,7 +150,7 @@ static DECLARE_MUTEX (minor_table_mutex) * would use "struct net_driver" instead, and a serial * device would use "struct tty_driver". */ -static struct file_operations skel_fops = { +static const struct file_operations skel_fops = { /* * The owner field is part of the module-locking * mechanism. The idea is that the kernel knows only in patch2: unchanged: --- linux-2.4.37.4/drivers/usb/w9968cf.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/usb/w9968cf.c 2009-07-26 12:41:47.442819814 -0400 @@ -375,7 +375,7 @@ MODULE_PARM_DESC(specific_debug, ****************************************************************************/ /* Video4linux interface */ -static struct file_operations w9968cf_fops; +static const struct file_operations w9968cf_fops; static int w9968cf_open(struct inode*, struct file*); static int w9968cf_release(struct inode*, struct file*); static ssize_t w9968cf_read(struct file*, char*, size_t, loff_t*); @@ -3708,7 +3708,7 @@ ioctl_fail: } -static struct file_operations w9968cf_fops = { +static const struct file_operations w9968cf_fops = { .owner = THIS_MODULE, .open = w9968cf_open, .release = w9968cf_release, only in patch2: unchanged: --- linux-2.4.37.4/drivers/video/fbmem.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/video/fbmem.c 2009-07-26 12:41:47.446284807 -0400 @@ -748,7 +748,7 @@ fb_release(struct inode *inode, struct f return 0; } -static struct file_operations fb_fops = { +static const struct file_operations fb_fops = { owner: THIS_MODULE, read: fb_read, write: fb_write, only in patch2: unchanged: --- linux-2.4.37.4/drivers/zorro/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/drivers/zorro/proc.c 2009-07-26 12:41:47.449637725 -0400 @@ -70,7 +70,7 @@ proc_bus_zorro_read(struct file *file, c return nbytes; } -static struct file_operations proc_bus_zorro_operations = { +static const struct file_operations proc_bus_zorro_operations = { llseek: proc_bus_zorro_lseek, read: proc_bus_zorro_read, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/adfs/adfs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/adfs/adfs.h 2009-07-26 14:06:34.050108154 -0400 @@ -95,17 +95,17 @@ extern struct dentry *adfs_lookup(struct */ /* dir_*.c */ -extern struct inode_operations adfs_dir_inode_operations; -extern struct file_operations adfs_dir_operations; -extern struct dentry_operations adfs_dentry_operations; +extern const struct inode_operations adfs_dir_inode_operations; +extern const struct file_operations adfs_dir_operations; +extern const struct dentry_operations adfs_dentry_operations; extern struct adfs_dir_ops adfs_f_dir_ops; extern struct adfs_dir_ops adfs_fplus_dir_ops; extern int adfs_dir_update(struct super_block *sb, struct object_info *obj); /* file.c */ -extern struct inode_operations adfs_file_inode_operations; -extern struct file_operations adfs_file_operations; +extern const struct inode_operations adfs_file_inode_operations; +extern const struct file_operations adfs_file_operations; extern inline __u32 signed_asl(__u32 val, signed int shift) { only in patch2: unchanged: --- linux-2.4.37.4/fs/adfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/adfs/dir.c 2009-07-26 12:42:01.965089141 -0400 @@ -192,7 +192,7 @@ out: return ret; } -struct file_operations adfs_dir_operations = { +const struct file_operations adfs_dir_operations = { read: generic_read_dir, readdir: adfs_readdir, fsync: file_fsync, @@ -259,7 +259,7 @@ adfs_compare(struct dentry *parent, stru return 0; } -struct dentry_operations adfs_dentry_operations = { +const struct dentry_operations adfs_dentry_operations = { d_hash: adfs_hash, d_compare: adfs_compare, }; @@ -289,7 +289,7 @@ struct dentry *adfs_lookup(struct inode /* * directories can handle most operations... */ -struct inode_operations adfs_dir_inode_operations = { +const struct inode_operations adfs_dir_inode_operations = { lookup: adfs_lookup, setattr: adfs_notify_change, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/adfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/adfs/file.c 2009-07-26 12:42:01.968422005 -0400 @@ -28,7 +28,7 @@ #include "adfs.h" -struct file_operations adfs_file_operations = { +const struct file_operations adfs_file_operations = { llseek: generic_file_llseek, read: generic_file_read, mmap: generic_file_mmap, @@ -36,6 +36,6 @@ struct file_operations adfs_file_operati write: generic_file_write, }; -struct inode_operations adfs_file_inode_operations = { +const struct inode_operations adfs_file_inode_operations = { setattr: adfs_notify_change, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/adfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/adfs/inode.c 2009-07-26 12:42:14.319914278 -0400 @@ -76,7 +76,7 @@ static int _adfs_bmap(struct address_spa return generic_block_bmap(mapping, block, adfs_get_block); } -static struct address_space_operations adfs_aops = { +static const struct address_space_operations adfs_aops = { readpage: adfs_readpage, writepage: adfs_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/adfs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/adfs/super.c 2009-07-26 12:41:54.780020857 -0400 @@ -232,7 +232,7 @@ static int adfs_statfs(struct super_bloc return 0; } -static struct super_operations adfs_sops = { +static const struct super_operations adfs_sops = { write_inode: adfs_write_inode, put_super: adfs_put_super, statfs: adfs_statfs, only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/dir.c 2009-07-26 12:42:01.968422005 -0400 @@ -25,7 +25,7 @@ static int affs_readdir(struct file *, void *, filldir_t); -struct file_operations affs_dir_operations = { +const struct file_operations affs_dir_operations = { read: generic_read_dir, readdir: affs_readdir, fsync: file_fsync, @@ -34,7 +34,7 @@ struct file_operations affs_dir_operatio /* * directories can handle most operations... */ -struct inode_operations affs_dir_inode_operations = { +const struct inode_operations affs_dir_inode_operations = { create: affs_create, lookup: affs_lookup, link: affs_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/file.c 2009-07-26 12:42:14.326910789 -0400 @@ -44,7 +44,7 @@ static ssize_t affs_file_write(struct fi static int affs_file_open(struct inode *inode, struct file *filp); static int affs_file_release(struct inode *inode, struct file *filp); -struct file_operations affs_file_operations = { +const struct file_operations affs_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: affs_file_write, @@ -54,7 +54,7 @@ struct file_operations affs_file_operati fsync: file_fsync, }; -struct inode_operations affs_file_inode_operations = { +const struct inode_operations affs_file_inode_operations = { truncate: affs_truncate, setattr: affs_notify_change, }; @@ -427,7 +427,7 @@ static int _affs_bmap(struct address_spa { return generic_block_bmap(mapping,block,affs_get_block); } -struct address_space_operations affs_aops = { +const struct address_space_operations affs_aops = { readpage: affs_readpage, writepage: affs_writepage, sync_page: block_sync_page, @@ -787,7 +787,7 @@ out: goto done; } -struct address_space_operations affs_aops_ofs = { +const struct address_space_operations affs_aops_ofs = { readpage: affs_readpage_ofs, //writepage: affs_writepage_ofs, //sync_page: affs_sync_page_ofs, only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/inode.c 2009-07-26 14:03:29.592670383 -0400 @@ -31,7 +31,7 @@ #include #include -extern struct inode_operations affs_symlink_inode_operations; +extern const struct inode_operations affs_symlink_inode_operations; extern struct timezone sys_tz; void only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/namei.c 2009-07-26 14:04:11.875157569 -0400 @@ -22,7 +22,7 @@ typedef int (*toupper_t)(int); -extern struct inode_operations affs_symlink_inode_operations; +extern const struct inode_operations affs_symlink_inode_operations; static int affs_toupper(int ch); static int affs_hash_dentry(struct dentry *, struct qstr *); @@ -31,12 +31,12 @@ static int affs_intl_toupper(int ch); static int affs_intl_hash_dentry(struct dentry *, struct qstr *); static int affs_intl_compare_dentry(struct dentry *, struct qstr *, struct qstr *); -struct dentry_operations affs_dentry_operations = { +const struct dentry_operations affs_dentry_operations = { d_hash: affs_hash_dentry, d_compare: affs_compare_dentry, }; -struct dentry_operations affs_intl_dentry_operations = { +const struct dentry_operations affs_intl_dentry_operations = { d_hash: affs_intl_hash_dentry, d_compare: affs_intl_compare_dentry, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/super.c 2009-07-26 12:41:54.786867681 -0400 @@ -77,7 +77,7 @@ affs_write_super(struct super_block *sb) pr_debug("AFFS: write_super() at %lu, clean=%d\n", CURRENT_TIME, clean); } -static struct super_operations affs_sops = { +static const struct super_operations affs_sops = { read_inode: affs_read_inode, write_inode: affs_write_inode, put_inode: affs_put_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/affs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/affs/symlink.c 2009-07-26 12:42:14.330230876 -0400 @@ -76,11 +76,11 @@ fail: return err; } -struct address_space_operations affs_symlink_aops = { +const struct address_space_operations affs_symlink_aops = { readpage: affs_symlink_readpage, }; -struct inode_operations affs_symlink_inode_operations = { +const struct inode_operations affs_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, setattr: affs_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs/autofs_i.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs/autofs_i.h 2009-07-26 14:04:53.692866071 -0400 @@ -137,10 +137,10 @@ struct autofs_dir_ent *autofs_expire(str /* Operations structures */ -extern struct inode_operations autofs_root_inode_operations; -extern struct inode_operations autofs_symlink_inode_operations; -extern struct inode_operations autofs_dir_inode_operations; -extern struct file_operations autofs_root_operations; +extern const struct inode_operations autofs_root_inode_operations; +extern const struct inode_operations autofs_symlink_inode_operations; +extern const struct inode_operations autofs_dir_inode_operations; +extern const struct file_operations autofs_root_operations; /* Initializing function */ only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs/dir.c 2009-07-26 12:42:01.987193833 -0400 @@ -23,7 +23,7 @@ static struct dentry *autofs_dir_lookup( return NULL; } -struct inode_operations autofs_dir_inode_operations = { +const struct inode_operations autofs_dir_inode_operations = { lookup: autofs_dir_lookup, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs/inode.c 2009-07-26 12:41:54.790406659 -0400 @@ -41,7 +41,7 @@ static void autofs_put_super(struct supe static int autofs_statfs(struct super_block *sb, struct statfs *buf); static void autofs_read_inode(struct inode *inode); -static struct super_operations autofs_sops = { +static const struct super_operations autofs_sops = { read_inode: autofs_read_inode, put_super: autofs_put_super, statfs: autofs_statfs, only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs/root.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs/root.c 2009-07-26 12:42:01.987193833 -0400 @@ -25,13 +25,13 @@ static int autofs_root_rmdir(struct inod static int autofs_root_mkdir(struct inode *,struct dentry *,int); static int autofs_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long); -struct file_operations autofs_root_operations = { +const struct file_operations autofs_root_operations = { read: generic_read_dir, readdir: autofs_root_readdir, ioctl: autofs_root_ioctl, }; -struct inode_operations autofs_root_inode_operations = { +const struct inode_operations autofs_root_inode_operations = { lookup: autofs_root_lookup, unlink: autofs_root_unlink, symlink: autofs_root_symlink, @@ -187,7 +187,7 @@ static int autofs_revalidate(struct dent return 1; } -static struct dentry_operations autofs_dentry_operations = { +static const struct dentry_operations autofs_dentry_operations = { d_revalidate: autofs_revalidate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs/symlink.c 2009-07-26 12:42:01.990986521 -0400 @@ -24,7 +24,7 @@ static int autofs_follow_link(struct den return vfs_follow_link(nd, s); } -struct inode_operations autofs_symlink_inode_operations = { +const struct inode_operations autofs_symlink_inode_operations = { readlink: autofs_readlink, follow_link: autofs_follow_link }; only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs4/autofs_i.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs4/autofs_i.h 2009-07-26 20:24:42.870352451 -0400 @@ -136,10 +136,10 @@ int autofs4_expire_multi(struct super_bl /* Operations structures */ -extern struct inode_operations autofs4_symlink_inode_operations; -extern struct inode_operations autofs4_dir_inode_operations; -extern struct inode_operations autofs4_root_inode_operations; -extern struct file_operations autofs4_root_operations; +extern const struct inode_operations autofs4_symlink_inode_operations; +extern const struct inode_operations autofs4_dir_inode_operations; +extern const struct inode_operations autofs4_root_inode_operations; +extern const struct file_operations autofs4_root_operations; /* Initializing function */ only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs4/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs4/inode.c 2009-07-26 12:41:54.790406659 -0400 @@ -92,7 +92,7 @@ static void autofs4_put_super(struct sup static int autofs4_statfs(struct super_block *sb, struct statfs *buf); -static struct super_operations autofs4_sops = { +static const struct super_operations autofs4_sops = { put_super: autofs4_put_super, statfs: autofs4_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs4/root.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs4/root.c 2009-07-26 12:42:01.979308350 -0400 @@ -26,7 +26,7 @@ static int autofs4_dir_mkdir(struct inod static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long); static struct dentry *autofs4_root_lookup(struct inode *,struct dentry *); -struct file_operations autofs4_root_operations = { +const struct file_operations autofs4_root_operations = { open: dcache_dir_open, release: dcache_dir_close, llseek: dcache_dir_lseek, @@ -36,7 +36,7 @@ struct file_operations autofs4_root_oper ioctl: autofs4_root_ioctl, }; -struct inode_operations autofs4_root_inode_operations = { +const struct inode_operations autofs4_root_inode_operations = { lookup: autofs4_root_lookup, unlink: autofs4_dir_unlink, symlink: autofs4_dir_symlink, @@ -44,7 +44,7 @@ struct inode_operations autofs4_root_ino rmdir: autofs4_dir_rmdir, }; -struct inode_operations autofs4_dir_inode_operations = { +const struct inode_operations autofs4_dir_inode_operations = { lookup: autofs4_dir_lookup, unlink: autofs4_dir_unlink, symlink: autofs4_dir_symlink, @@ -216,13 +216,13 @@ static void autofs4_dentry_release(struc } /* For dentries of directories in the root dir */ -static struct dentry_operations autofs4_root_dentry_operations = { +static const struct dentry_operations autofs4_root_dentry_operations = { d_revalidate: autofs4_root_revalidate, d_release: autofs4_dentry_release, }; /* For other dentries */ -static struct dentry_operations autofs4_dentry_operations = { +static const struct dentry_operations autofs4_dentry_operations = { d_revalidate: autofs4_revalidate, d_release: autofs4_dentry_release, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/autofs4/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/autofs4/symlink.c 2009-07-26 12:42:01.982603956 -0400 @@ -26,7 +26,7 @@ static int autofs4_follow_link(struct de return vfs_follow_link(nd, ino->u.symlink); } -struct inode_operations autofs4_symlink_inode_operations = { +const struct inode_operations autofs4_symlink_inode_operations = { readlink: autofs4_readlink, follow_link: autofs4_follow_link }; only in patch2: unchanged: --- linux-2.4.37.4/fs/bad_inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/bad_inode.c 2009-07-26 14:29:00.172678321 -0400 @@ -90,8 +90,7 @@ static int bad_follow_link(struct dentry return vfs_follow_link(nd, ERR_PTR(-EIO)); } -static struct file_operations bad_file_ops = -{ +static const struct file_operations bad_file_ops = { llseek: bad_file_llseek, read: bad_file_read, write: bad_file_write, @@ -175,8 +174,7 @@ static int bad_inode_revalidate(struct d return -EIO; } -struct inode_operations bad_inode_ops = -{ +const struct inode_operations bad_inode_ops = { create: bad_inode_create, lookup: bad_inode_lookup, link: bad_inode_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/befs/linuxvfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/befs/linuxvfs.c 2009-07-26 12:42:14.333947431 -0400 @@ -66,31 +66,31 @@ static const struct super_operations bef remount_fs:befs_remount, }; -struct file_operations befs_dir_operations = { +const struct file_operations befs_dir_operations = { read:generic_read_dir, readdir:befs_readdir, }; -struct inode_operations befs_dir_inode_operations = { +const struct inode_operations befs_dir_inode_operations = { lookup:befs_lookup, }; -struct file_operations befs_file_operations = { +const struct file_operations befs_file_operations = { llseek:default_llseek, read:generic_file_read, mmap:generic_file_mmap, }; -struct inode_operations befs_file_inode_operations = { +const struct inode_operations befs_file_inode_operations = { }; -struct address_space_operations befs_aops = { +const struct address_space_operations befs_aops = { readpage:befs_readpage, sync_page:block_sync_page, bmap:befs_bmap, }; -static struct inode_operations befs_symlink_inode_operations = { +static const struct inode_operations befs_symlink_inode_operations = { readlink:befs_readlink, follow_link:befs_follow_link, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/bfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/bfs/dir.c 2009-07-26 12:42:01.998478735 -0400 @@ -65,7 +65,7 @@ static int bfs_readdir(struct file * f, return 0; } -struct file_operations bfs_dir_operations = { +const struct file_operations bfs_dir_operations = { read: generic_read_dir, readdir: bfs_readdir, fsync: file_fsync, @@ -243,7 +243,7 @@ end_rename: return error; } -struct inode_operations bfs_dir_inops = { +const struct inode_operations bfs_dir_inops = { create: bfs_create, lookup: bfs_lookup, link: bfs_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/bfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/bfs/file.c 2009-07-26 15:12:43.740057915 -0400 @@ -18,7 +18,7 @@ #define dprintf(x...) #endif -struct file_operations bfs_file_operations = { +const struct file_operations bfs_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -156,7 +156,7 @@ static int bfs_bmap(struct address_space return generic_block_bmap(mapping, block, bfs_get_block); } -struct address_space_operations bfs_aops = { +const struct address_space_operations bfs_aops = { readpage: bfs_readpage, writepage: bfs_writepage, sync_page: block_sync_page, @@ -165,4 +165,4 @@ struct address_space_operations bfs_aops bmap: bfs_bmap, }; -struct inode_operations bfs_file_inops; +const struct inode_operations bfs_file_inops; only in patch2: unchanged: --- linux-2.4.37.4/fs/bfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/bfs/inode.c 2009-07-26 12:41:54.793819395 -0400 @@ -209,7 +209,7 @@ static void bfs_write_super(struct super s->s_dirt = 0; } -static struct super_operations bfs_sops = { +static const struct super_operations bfs_sops = { read_inode: bfs_read_inode, write_inode: bfs_write_inode, delete_inode: bfs_delete_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/block_dev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/block_dev.c 2009-07-26 14:27:22.773245238 -0400 @@ -220,7 +220,7 @@ static int block_fsync(struct file *filp static struct super_block *bd_read_super(struct super_block *sb, void *data, int silent) { - static struct super_operations sops = {}; + static const struct super_operations sops = {}; struct inode *root = new_inode(sb); if (!root) return NULL; @@ -662,7 +662,7 @@ static int blkdev_ioctl(struct inode *in return -EINVAL; } -struct address_space_operations def_blk_aops = { +const struct address_space_operations def_blk_aops = { readpage: blkdev_readpage, writepage: blkdev_writepage, sync_page: block_sync_page, @@ -671,7 +671,7 @@ struct address_space_operations def_blk_ direct_IO: blkdev_direct_IO, }; -struct file_operations def_blk_fops = { +const struct file_operations def_blk_fops = { open: blkdev_open, release: blkdev_close, llseek: block_llseek, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/cnode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/cnode.c 2009-07-26 12:42:02.005813767 -0400 @@ -32,7 +32,7 @@ static int coda_inocmp(struct inode *ino return (coda_fideq((ViceFid *)opaque, &(ITOC(inode)->c_fid))); } -static struct inode_operations coda_symlink_inode_operations = { +static const struct inode_operations coda_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, setattr: coda_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/dir.c 2009-07-26 14:29:16.078413339 -0400 @@ -56,14 +56,12 @@ int coda_fsync(struct file *, struct den int coda_hasmknod; -struct dentry_operations coda_dentry_operations = -{ +const struct dentry_operations coda_dentry_operations = { d_revalidate: coda_dentry_revalidate, d_delete: coda_dentry_delete, }; -struct inode_operations coda_dir_inode_operations = -{ +const struct inode_operations coda_dir_inode_operations = { create: coda_create, lookup: coda_lookup, link: coda_link, @@ -78,7 +76,7 @@ struct inode_operations coda_dir_inode_o setattr: coda_notify_change, }; -struct file_operations coda_dir_operations = { +const struct file_operations coda_dir_operations = { llseek: generic_file_llseek, read: generic_read_dir, readdir: coda_readdir, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/file.c 2009-07-26 12:41:47.497594872 -0400 @@ -279,7 +279,7 @@ int coda_fsync(struct file *coda_file, s return err; } -struct file_operations coda_file_operations = { +const struct file_operations coda_file_operations = { llseek: generic_file_llseek, read: coda_file_read, write: coda_file_write, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/inode.c 2009-07-26 14:28:42.895657350 -0400 @@ -40,8 +40,7 @@ static void coda_put_super(struct super_ static int coda_statfs(struct super_block *sb, struct statfs *buf); /* exported operations */ -struct super_operations coda_super_operations = -{ +const struct super_operations coda_super_operations = { read_inode: coda_read_inode, clear_inode: coda_clear_inode, put_super: coda_put_super, @@ -236,7 +235,7 @@ int coda_notify_change(struct dentry *de return error; } -struct inode_operations coda_file_inode_operations = { +const struct inode_operations coda_file_inode_operations = { permission: coda_permission, revalidate: coda_revalidate_inode, setattr: coda_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/pioctl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/pioctl.c 2009-07-26 14:28:29.134812914 -0400 @@ -30,13 +30,12 @@ static int coda_pioctl(struct inode * in unsigned int cmd, unsigned long user_data); /* exported from this file */ -struct inode_operations coda_ioctl_inode_operations = -{ +const struct inode_operations coda_ioctl_inode_operations = { permission: coda_ioctl_permission, setattr: coda_notify_change, }; -struct file_operations coda_ioctl_operations = { +const struct file_operations coda_ioctl_operations = { owner: THIS_MODULE, ioctl: coda_pioctl, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/psdev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/psdev.c 2009-07-26 12:41:47.504407955 -0400 @@ -372,7 +372,7 @@ static int coda_psdev_release(struct ino } -static struct file_operations coda_psdev_fops = { +static const struct file_operations coda_psdev_fops = { owner: THIS_MODULE, read: coda_psdev_read, write: coda_psdev_write, only in patch2: unchanged: --- linux-2.4.37.4/fs/coda/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/coda/symlink.c 2009-07-26 12:42:14.345654173 -0400 @@ -50,6 +50,6 @@ fail: return error; } -struct address_space_operations coda_symlink_aops = { +const struct address_space_operations coda_symlink_aops = { readpage: coda_symlink_filler }; only in patch2: unchanged: --- linux-2.4.37.4/fs/cramfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/cramfs/inode.c 2009-07-26 12:42:14.348944237 -0400 @@ -29,10 +29,10 @@ #define CRAMFS_SB_FILES u.cramfs_sb.files #define CRAMFS_SB_FLAGS u.cramfs_sb.flags -static struct super_operations cramfs_ops; -static struct inode_operations cramfs_dir_inode_operations; -static struct file_operations cramfs_directory_operations; -static struct address_space_operations cramfs_aops; +static const struct super_operations cramfs_ops; +static const struct inode_operations cramfs_dir_inode_operations; +static const struct file_operations cramfs_directory_operations; +static const struct address_space_operations cramfs_aops; static DECLARE_MUTEX(read_mutex); @@ -424,7 +424,7 @@ static int cramfs_readpage(struct file * return 0; } -static struct address_space_operations cramfs_aops = { +static const struct address_space_operations cramfs_aops = { readpage: cramfs_readpage }; @@ -435,16 +435,16 @@ static struct address_space_operations c /* * A directory can only readdir */ -static struct file_operations cramfs_directory_operations = { +static const struct file_operations cramfs_directory_operations = { read: generic_read_dir, readdir: cramfs_readdir, }; -static struct inode_operations cramfs_dir_inode_operations = { +static const struct inode_operations cramfs_dir_inode_operations = { lookup: cramfs_lookup, }; -static struct super_operations cramfs_ops = { +static const struct super_operations cramfs_ops = { statfs: cramfs_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/devfs/base.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devfs/base.c 2009-07-26 14:31:25.129921598 -0400 @@ -871,16 +871,14 @@ static int devfsd_close (struct inode *i #ifdef CONFIG_DEVFS_DEBUG static ssize_t stat_read (struct file *file, char *buf, size_t len, loff_t *ppos); -static struct file_operations stat_fops = -{ +static const struct file_operations stat_fops = { .read = stat_read, }; #endif /* Devfs daemon file operations */ -static struct file_operations devfsd_fops = -{ +static const struct file_operations devfsd_fops = { .read = devfsd_read, .ioctl = devfsd_ioctl, .release = devfsd_close, @@ -1545,7 +1543,7 @@ static void devfsd_notify (struct devfs_ devfs_handle_t devfs_register (devfs_handle_t dir, const char *name, unsigned int flags, unsigned int major, unsigned int minor, - umode_t mode, void *ops, void *info) + umode_t mode, const void *ops, void *info) { char devtype = S_ISCHR (mode) ? DEVFS_SPECIAL_CHR : DEVFS_SPECIAL_BLK; int err; @@ -2599,8 +2597,7 @@ static void devfs_clear_inode (struct in if ( S_ISBLK (inode->i_mode) ) bdput (inode->i_bdev); } /* End Function devfs_clear_inode */ -static struct super_operations devfs_sops = -{ +static const struct super_operations devfs_sops = { .put_inode = force_delete, .clear_inode = devfs_clear_inode, .statfs = devfs_statfs, @@ -2822,13 +2819,11 @@ static int devfs_open (struct inode *ino return 0; } /* End Function devfs_open */ -static struct file_operations devfs_fops = -{ +static const struct file_operations devfs_fops = { .open = devfs_open, }; -static struct file_operations devfs_dir_fops = -{ +static const struct file_operations devfs_dir_fops = { .read = generic_read_dir, .readdir = devfs_readdir, .open = devfs_open, @@ -2871,8 +2866,7 @@ static void devfs_d_iput (struct dentry static int devfs_d_delete (struct dentry *dentry); -static struct dentry_operations devfs_dops = -{ +static const struct dentry_operations devfs_dops = { .d_delete = devfs_d_delete, .d_release = devfs_d_release, .d_iput = devfs_d_iput, @@ -2880,8 +2874,7 @@ static struct dentry_operations devfs_do static int devfs_d_revalidate_wait (struct dentry *dentry, int flags); -static struct dentry_operations devfs_wait_dops = -{ +static const struct dentry_operations devfs_wait_dops = { .d_delete = devfs_d_delete, .d_release = devfs_d_release, .d_iput = devfs_d_iput, @@ -3250,13 +3243,11 @@ static int devfs_follow_link (struct den return err; } /* End Function devfs_follow_link */ -static struct inode_operations devfs_iops = -{ +static const struct inode_operations devfs_iops = { .setattr = devfs_notify_change, }; -static struct inode_operations devfs_dir_iops = -{ +static const struct inode_operations devfs_dir_iops = { .lookup = devfs_lookup, .unlink = devfs_unlink, .symlink = devfs_symlink, @@ -3266,8 +3257,7 @@ static struct inode_operations devfs_dir .setattr = devfs_notify_change, }; -static struct inode_operations devfs_symlink_iops = -{ +static const struct inode_operations devfs_symlink_iops = { .readlink = devfs_readlink, .follow_link = devfs_follow_link, .setattr = devfs_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/devfs/util.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devfs/util.c 2009-07-26 13:05:36.511755665 -0400 @@ -120,7 +120,7 @@ EXPORT_SYMBOL(devfs_register_tape); void devfs_register_series (devfs_handle_t dir, const char *format, unsigned int num_entries, unsigned int flags, unsigned int major, unsigned int minor_start, - umode_t mode, void *ops, void *info) + umode_t mode, const void *ops, void *info) { unsigned int count; char devname[128]; only in patch2: unchanged: --- linux-2.4.37.4/fs/devices.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devices.c 2009-07-26 14:31:52.055831190 -0400 @@ -32,7 +32,7 @@ struct tty_driver *get_tty_driver(kdev_t struct device_struct { const char * name; - struct file_operations * fops; + const struct file_operations * fops; }; static rwlock_t chrdevs_lock = RW_LOCK_UNLOCKED; @@ -62,9 +62,9 @@ int get_device_list(char * page) Load the driver if needed. Increment the reference count of module in question. */ -static struct file_operations * get_chrfops(unsigned int major, unsigned int minor) +static const struct file_operations * get_chrfops(unsigned int major, unsigned int minor) { - struct file_operations *ret = NULL; + const struct file_operations *ret = NULL; if (!major || major >= MAX_CHRDEV) return NULL; @@ -95,7 +95,7 @@ static struct file_operations * get_chrf return ret; } -int register_chrdev(unsigned int major, const char * name, struct file_operations *fops) +int register_chrdev(unsigned int major, const char * name, const struct file_operations *fops) { if (major == 0) { write_lock(&chrdevs_lock); @@ -162,7 +162,7 @@ int chrdev_open(struct inode * inode, st * is contain the open that then fills in the correct operations * depending on the special file... */ -static struct file_operations def_chr_fops = { +static const struct file_operations def_chr_fops = { open: chrdev_open, }; @@ -193,7 +193,7 @@ static int sock_no_open(struct inode *ir return -ENXIO; } -static struct file_operations bad_sock_fops = { +static const struct file_operations bad_sock_fops = { open: sock_no_open }; only in patch2: unchanged: --- linux-2.4.37.4/fs/devpts/devpts_i.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devpts/devpts_i.h 2009-07-26 20:24:45.786457604 -0400 @@ -37,5 +37,5 @@ extern inline struct devpts_sb_info *SBI return (struct devpts_sb_info *)(sb->u.generic_sbp); } -extern struct inode_operations devpts_root_inode_operations; -extern struct file_operations devpts_root_operations; +extern const struct inode_operations devpts_root_inode_operations; +extern const struct file_operations devpts_root_operations; only in patch2: unchanged: --- linux-2.4.37.4/fs/devpts/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devpts/inode.c 2009-07-26 12:41:54.810813561 -0400 @@ -51,7 +51,7 @@ static void devpts_put_super(struct supe static int devpts_statfs(struct super_block *sb, struct statfs *buf); static int devpts_remount (struct super_block * sb, int * flags, char * data); -static struct super_operations devpts_sops = { +static const struct super_operations devpts_sops = { put_super: devpts_put_super, statfs: devpts_statfs, remount_fs: devpts_remount, only in patch2: unchanged: --- linux-2.4.37.4/fs/devpts/root.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/devpts/root.c 2009-07-26 12:42:02.014285482 -0400 @@ -20,16 +20,16 @@ static int devpts_root_readdir(struct fi static struct dentry *devpts_root_lookup(struct inode *,struct dentry *); static int devpts_revalidate(struct dentry *, int); -struct file_operations devpts_root_operations = { +const struct file_operations devpts_root_operations = { read: generic_read_dir, readdir: devpts_root_readdir, }; -struct inode_operations devpts_root_inode_operations = { +const struct inode_operations devpts_root_inode_operations = { lookup: devpts_root_lookup, }; -static struct dentry_operations devpts_dentry_operations = { +static const struct dentry_operations devpts_dentry_operations = { d_revalidate: devpts_revalidate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/efs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/efs/dir.c 2009-07-26 12:42:02.017755850 -0400 @@ -8,12 +8,12 @@ static int efs_readdir(struct file *, void *, filldir_t); -struct file_operations efs_dir_operations = { +const struct file_operations efs_dir_operations = { read: generic_read_dir, readdir: efs_readdir, }; -struct inode_operations efs_dir_inode_operations = { +const struct inode_operations efs_dir_inode_operations = { lookup: efs_lookup, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/efs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/efs/inode.c 2009-07-26 12:42:14.348944237 -0400 @@ -21,7 +21,7 @@ static int _efs_bmap(struct address_spac { return generic_block_bmap(mapping,block,efs_get_block); } -struct address_space_operations efs_aops = { +const struct address_space_operations efs_aops = { readpage: efs_readpage, sync_page: block_sync_page, bmap: _efs_bmap only in patch2: unchanged: --- linux-2.4.37.4/fs/efs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/efs/super.c 2009-07-26 12:41:54.814346376 -0400 @@ -15,7 +15,7 @@ static DECLARE_FSTYPE_DEV(efs_fs_type, "efs", efs_read_super); -static struct super_operations efs_superblock_operations = { +static const struct super_operations efs_superblock_operations = { read_inode: efs_read_inode, statfs: efs_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/efs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/efs/symlink.c 2009-07-26 12:42:14.352825502 -0400 @@ -52,6 +52,6 @@ fail: return err; } -struct address_space_operations efs_symlink_aops = { +const struct address_space_operations efs_symlink_aops = { readpage: efs_symlink_readpage }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/dir.c 2009-07-26 12:41:47.518013081 -0400 @@ -619,7 +619,7 @@ not_empty: return 0; } -struct file_operations ext2_dir_operations = { +const struct file_operations ext2_dir_operations = { read: generic_read_dir, readdir: ext2_readdir, ioctl: ext2_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/file.c 2009-07-26 12:42:02.017755850 -0400 @@ -38,7 +38,7 @@ static int ext2_release_file (struct ino * We have mostly NULL's here: the current defaults are ok for * the ext2 filesystem. */ -struct file_operations ext2_file_operations = { +const struct file_operations ext2_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -49,6 +49,6 @@ struct file_operations ext2_file_operati fsync: ext2_sync_file, }; -struct inode_operations ext2_file_inode_operations = { +const struct inode_operations ext2_file_inode_operations = { truncate: ext2_truncate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/inode.c 2009-07-26 12:42:14.357352641 -0400 @@ -608,7 +608,7 @@ static int ext2_direct_IO(int rw, struct { return generic_direct_IO(rw, inode, iobuf, blocknr, blocksize, ext2_get_block); } -struct address_space_operations ext2_aops = { +const struct address_space_operations ext2_aops = { readpage: ext2_readpage, writepage: ext2_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/namei.c 2009-07-26 12:42:02.021385851 -0400 @@ -342,7 +342,7 @@ out: return err; } -struct inode_operations ext2_dir_inode_operations = { +const struct inode_operations ext2_dir_inode_operations = { create: ext2_create, lookup: ext2_lookup, link: ext2_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/super.c 2009-07-26 12:41:54.817746559 -0400 @@ -147,7 +147,7 @@ void ext2_put_super (struct super_block return; } -static struct super_operations ext2_sops = { +static const struct super_operations ext2_sops = { read_inode: ext2_read_inode, write_inode: ext2_write_inode, put_inode: ext2_put_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/ext2/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext2/symlink.c 2009-07-26 12:42:02.025011162 -0400 @@ -32,7 +32,7 @@ static int ext2_follow_link(struct dentr return vfs_follow_link(nd, s); } -struct inode_operations ext2_fast_symlink_inode_operations = { +const struct inode_operations ext2_fast_symlink_inode_operations = { readlink: ext2_readlink, follow_link: ext2_follow_link, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/dir.c 2009-07-26 12:41:47.521578509 -0400 @@ -28,7 +28,7 @@ static unsigned char ext3_filetype_table static int ext3_readdir(struct file *, void *, filldir_t); -struct file_operations ext3_dir_operations = { +const struct file_operations ext3_dir_operations = { read: generic_read_dir, readdir: ext3_readdir, /* BKL held */ ioctl: ext3_ioctl, /* BKL held */ only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/file.c 2009-07-26 12:42:02.025011162 -0400 @@ -110,7 +110,7 @@ force_commit: return ret; } -struct file_operations ext3_file_operations = { +const struct file_operations ext3_file_operations = { llseek: generic_file_llseek, /* BKL held */ read: generic_file_read, /* BKL not held. Don't need */ write: ext3_file_write, /* BKL not held. Don't need */ @@ -121,7 +121,7 @@ struct file_operations ext3_file_operati fsync: ext3_sync_file, /* BKL held */ }; -struct inode_operations ext3_file_inode_operations = { +const struct inode_operations ext3_file_inode_operations = { truncate: ext3_truncate, /* BKL held */ setattr: ext3_setattr, /* BKL held */ }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/inode.c 2009-07-26 12:42:14.372981268 -0400 @@ -1389,7 +1389,7 @@ static int ext3_releasepage(struct page } -struct address_space_operations ext3_aops = { +const struct address_space_operations ext3_aops = { readpage: ext3_readpage, /* BKL not held. Don't need */ writepage: ext3_writepage, /* BKL not held. We take it */ sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/namei.c 2009-07-26 12:42:02.031986625 -0400 @@ -1111,7 +1111,7 @@ end_rename: /* * directories can handle most operations... */ -struct inode_operations ext3_dir_inode_operations = { +const struct inode_operations ext3_dir_inode_operations = { create: ext3_create, /* BKL held */ lookup: ext3_lookup, /* BKL held */ link: ext3_link, /* BKL held */ only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/super.c 2009-07-26 12:41:54.828003089 -0400 @@ -450,7 +450,7 @@ void ext3_put_super (struct super_block static struct dquot_operations ext3_qops; -static struct super_operations ext3_sops = { +static const struct super_operations ext3_sops = { read_inode: ext3_read_inode, /* BKL held */ write_inode: ext3_write_inode, /* BKL not held. Don't need */ dirty_inode: ext3_dirty_inode, /* BKL not held. We take it */ only in patch2: unchanged: --- linux-2.4.37.4/fs/ext3/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ext3/symlink.c 2009-07-26 12:42:02.035286535 -0400 @@ -33,7 +33,7 @@ static int ext3_follow_link(struct dentr return vfs_follow_link(nd, s); } -struct inode_operations ext3_fast_symlink_inode_operations = { +const struct inode_operations ext3_fast_symlink_inode_operations = { readlink: ext3_readlink, /* BKL not held. Don't need */ follow_link: ext3_follow_link, /* BKL not held. Don't need */ }; only in patch2: unchanged: --- linux-2.4.37.4/fs/fat/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/fat/dir.c 2009-07-26 12:41:47.531816262 -0400 @@ -29,7 +29,7 @@ #define PRINTK(X) -struct file_operations fat_dir_operations = { +const struct file_operations fat_dir_operations = { read: generic_read_dir, readdir: fat_readdir, ioctl: fat_dir_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/fs/fat/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/fat/file.c 2009-07-26 12:42:02.035286535 -0400 @@ -23,7 +23,7 @@ #define PRINTK(x) #define Printk(x) printk x -struct file_operations fat_file_operations = { +const struct file_operations fat_file_operations = { llseek: generic_file_llseek, read: fat_file_read, write: fat_file_write, @@ -31,7 +31,7 @@ struct file_operations fat_file_operatio fsync: file_fsync, }; -struct inode_operations fat_file_inode_operations = { +const struct inode_operations fat_file_inode_operations = { truncate: fat_truncate, setattr: fat_notify_change, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/fat/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/fat/inode.c 2009-07-26 13:54:39.429877438 -0400 @@ -537,7 +537,7 @@ int fat_dentry_to_fh(struct dentry *de, return 3; } -static struct super_operations fat_sops = { +static const struct super_operations fat_sops = { write_inode: fat_write_inode, delete_inode: fat_delete_inode, put_super: fat_put_super, @@ -557,7 +557,7 @@ static struct super_operations fat_sops */ struct super_block * fat_read_super(struct super_block *sb, void *data, int silent, - struct inode_operations *fs_dir_inode_ops) + const struct inode_operations *fs_dir_inode_ops) { struct inode *root_inode; struct buffer_head *bh; @@ -886,7 +886,7 @@ static int _fat_bmap(struct address_spac { return generic_block_bmap(mapping,block,fat_get_block); } -static struct address_space_operations fat_aops = { +static const struct address_space_operations fat_aops = { readpage: fat_readpage, writepage: fat_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/fifo.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/fifo.c 2009-07-26 12:41:47.535251116 -0400 @@ -152,6 +152,6 @@ err_nolock_nocleanup: * is contain the open that then fills in the correct operations * depending on the access mode of the file... */ -struct file_operations def_fifo_fops = { +const struct file_operations def_fifo_fops = { open: fifo_open, /* will set read or write pipe_fops */ }; only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_extern.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_extern.h 2009-07-26 14:07:11.675162659 -0400 @@ -64,8 +64,8 @@ extern void vxfs_read_inode(struct ino extern void vxfs_put_inode(struct inode *); /* vxfs_lookup.c */ -extern struct inode_operations vxfs_dir_inode_ops; -extern struct file_operations vxfs_dir_operations; +extern const struct inode_operations vxfs_dir_inode_ops; +extern const struct file_operations vxfs_dir_operations; /* vxfs_olt.c */ extern int vxfs_read_olt(struct super_block *, u_long); only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_immed.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_immed.c 2009-07-26 12:42:14.380796296 -0400 @@ -50,7 +50,7 @@ static int vxfs_immed_readpage(struct fi * Unliked all other operations we do not go through the pagecache, * but do all work directly on the inode. */ -struct inode_operations vxfs_immed_symlink_iops = { +const struct inode_operations vxfs_immed_symlink_iops = { .readlink = vxfs_immed_readlink, .follow_link = vxfs_immed_follow_link, }; @@ -58,7 +58,7 @@ struct inode_operations vxfs_immed_symli /* * Adress space operations for immed files and directories. */ -struct address_space_operations vxfs_immed_aops = { +const struct address_space_operations vxfs_immed_aops = { .readpage = vxfs_immed_readpage, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_inode.c 2009-07-26 14:07:40.351483498 -0400 @@ -42,12 +42,12 @@ #include "vxfs_extern.h" -extern struct address_space_operations vxfs_aops; -extern struct address_space_operations vxfs_immed_aops; +extern const struct address_space_operations vxfs_aops; +extern const struct address_space_operations vxfs_immed_aops; -extern struct inode_operations vxfs_immed_symlink_iops; +extern const struct inode_operations vxfs_immed_symlink_iops; -static struct file_operations vxfs_file_operations = { +static const struct file_operations vxfs_file_operations = { .open = generic_file_open, .llseek = generic_file_llseek, .read = generic_file_read, @@ -301,7 +301,7 @@ vxfs_read_inode(struct inode *ip) { struct super_block *sbp = ip->i_sb; struct vxfs_inode_info *vip; - struct address_space_operations *aops; + const struct address_space_operations *aops; ino_t ino = ip->i_ino; if (!(vip = __vxfs_iget(ino, VXFS_SBI(sbp)->vsi_ilist))) only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_lookup.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_lookup.c 2009-07-26 12:42:02.041902691 -0400 @@ -53,11 +53,11 @@ static struct dentry * vxfs_lookup(struct inode *, struct dentry *); static int vxfs_readdir(struct file *, void *, filldir_t); -struct inode_operations vxfs_dir_inode_ops = { +const struct inode_operations vxfs_dir_inode_ops = { .lookup = vxfs_lookup, }; -struct file_operations vxfs_dir_operations = { +const struct file_operations vxfs_dir_operations = { .readdir = vxfs_readdir, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_subr.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_subr.c 2009-07-26 12:42:14.384711086 -0400 @@ -44,7 +44,7 @@ static int vxfs_readpage(struct file *, struct page *); static int vxfs_bmap(struct address_space *, long); -struct address_space_operations vxfs_aops = { +const struct address_space_operations vxfs_aops = { .readpage = vxfs_readpage, .bmap = vxfs_bmap, .sync_page = block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/freevxfs/vxfs_super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/freevxfs/vxfs_super.c 2009-07-26 12:41:54.838269460 -0400 @@ -55,7 +55,7 @@ MODULE_LICENSE("Dual BSD/GPL"); static void vxfs_put_super(struct super_block *); static int vxfs_statfs(struct super_block *, struct statfs *); -static struct super_operations vxfs_super_ops = { +static const struct super_operations vxfs_super_ops = { .read_inode = vxfs_read_inode, .put_inode = vxfs_put_inode, .put_super = vxfs_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/dir_cap.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/dir_cap.c 2009-07-26 12:42:02.045801799 -0400 @@ -57,13 +57,13 @@ const struct hfs_name hfs_cap_reserved2[ #define DOT_FINDERINFO (&hfs_cap_reserved1[3]) #define DOT_ROOTINFO (&hfs_cap_reserved2[0]) -struct file_operations hfs_cap_dir_operations = { +const struct file_operations hfs_cap_dir_operations = { read: generic_read_dir, readdir: cap_readdir, fsync: file_fsync, }; -struct inode_operations hfs_cap_ndir_inode_operations = { +const struct inode_operations hfs_cap_ndir_inode_operations = { create: hfs_create, lookup: cap_lookup, unlink: hfs_unlink, @@ -73,12 +73,12 @@ struct inode_operations hfs_cap_ndir_ino setattr: hfs_notify_change, }; -struct inode_operations hfs_cap_fdir_inode_operations = { +const struct inode_operations hfs_cap_fdir_inode_operations = { lookup: cap_lookup, setattr: hfs_notify_change, }; -struct inode_operations hfs_cap_rdir_inode_operations = { +const struct inode_operations hfs_cap_rdir_inode_operations = { create: hfs_create, lookup: cap_lookup, setattr: hfs_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/dir_dbl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/dir_dbl.c 2009-07-26 12:42:02.045801799 -0400 @@ -56,13 +56,13 @@ const struct hfs_name hfs_dbl_reserved2[ #define ROOTINFO (&hfs_dbl_reserved2[0]) #define PCNT_ROOTINFO (&hfs_dbl_reserved2[1]) -struct file_operations hfs_dbl_dir_operations = { +const struct file_operations hfs_dbl_dir_operations = { read: generic_read_dir, readdir: dbl_readdir, fsync: file_fsync, }; -struct inode_operations hfs_dbl_dir_inode_operations = { +const struct inode_operations hfs_dbl_dir_inode_operations = { create: dbl_create, lookup: dbl_lookup, unlink: dbl_unlink, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/dir_nat.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/dir_nat.c 2009-07-26 12:42:02.049093809 -0400 @@ -62,13 +62,13 @@ const struct hfs_name hfs_nat_reserved2[ #define DOT_PARENT (&hfs_nat_reserved1[3]) #define ROOTINFO (&hfs_nat_reserved2[0]) -struct file_operations hfs_nat_dir_operations = { +const struct file_operations hfs_nat_dir_operations = { read: generic_read_dir, readdir: nat_readdir, fsync: file_fsync, }; -struct inode_operations hfs_nat_ndir_inode_operations = { +const struct inode_operations hfs_nat_ndir_inode_operations = { create: hfs_create, lookup: nat_lookup, unlink: hfs_unlink, @@ -78,7 +78,7 @@ struct inode_operations hfs_nat_ndir_ino setattr: hfs_notify_change, }; -struct inode_operations hfs_nat_hdir_inode_operations = { +const struct inode_operations hfs_nat_hdir_inode_operations = { create: hfs_create, lookup: nat_lookup, unlink: nat_hdr_unlink, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/file.c 2009-07-26 12:42:02.052954476 -0400 @@ -31,7 +31,7 @@ static void hfs_file_truncate(struct ino /*================ Global variables ================*/ -struct file_operations hfs_file_operations = { +const struct file_operations hfs_file_operations = { llseek: generic_file_llseek, read: hfs_file_read, write: hfs_file_write, @@ -39,7 +39,7 @@ struct file_operations hfs_file_operatio fsync: file_fsync, }; -struct inode_operations hfs_file_inode_operations = { +const struct inode_operations hfs_file_inode_operations = { truncate: hfs_file_truncate, setattr: hfs_notify_change, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/file_cap.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/file_cap.c 2009-07-26 12:42:02.056838983 -0400 @@ -45,14 +45,14 @@ static hfs_rwret_t cap_info_write(struct /*================ Global variables ================*/ -struct file_operations hfs_cap_info_operations = { +const struct file_operations hfs_cap_info_operations = { llseek: cap_info_llseek, read: cap_info_read, write: cap_info_write, fsync: file_fsync, }; -struct inode_operations hfs_cap_info_inode_operations = { +const struct inode_operations hfs_cap_info_inode_operations = { setattr: hfs_notify_change_cap, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/file_hdr.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/file_hdr.c 2009-07-26 12:42:02.063566156 -0400 @@ -45,14 +45,14 @@ static hfs_rwret_t hdr_write(struct file hfs_rwarg_t, loff_t *); /*================ Global variables ================*/ -struct file_operations hfs_hdr_operations = { +const struct file_operations hfs_hdr_operations = { llseek: hdr_llseek, read: hdr_read, write: hdr_write, fsync: file_fsync, }; -struct inode_operations hfs_hdr_inode_operations = { +const struct inode_operations hfs_hdr_inode_operations = { setattr: hfs_notify_change_hdr, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/hfs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/hfs.h 2009-07-26 20:24:51.152615236 -0400 @@ -546,5 +546,5 @@ static __inline__ void hfs_drop_special( } } -extern struct dentry_operations hfs_dentry_operations; +extern const struct dentry_operations hfs_dentry_operations; #endif only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/inode.c 2009-07-26 12:42:14.388000682 -0400 @@ -239,7 +239,7 @@ static int hfs_bmap(struct address_space { return generic_block_bmap(mapping,block,hfs_get_block); } -struct address_space_operations hfs_aops = { +const struct address_space_operations hfs_aops = { readpage: hfs_readpage, writepage: hfs_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/super.c 2009-07-26 12:41:54.845100867 -0400 @@ -43,7 +43,7 @@ static void hfs_write_super(struct super /*================ Global variables ================*/ -static struct super_operations hfs_super_operations = { +static const struct super_operations hfs_super_operations = { read_inode: hfs_read_inode, put_inode: hfs_put_inode, put_super: hfs_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfs/sysdep.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfs/sysdep.c 2009-07-26 14:33:20.042362009 -0400 @@ -23,8 +23,7 @@ static int hfs_revalidate_dentry(struct static int hfs_hash_dentry(struct dentry *, struct qstr *); static int hfs_compare_dentry(struct dentry *, struct qstr *, struct qstr *); static void hfs_dentry_iput(struct dentry *, struct inode *); -struct dentry_operations hfs_dentry_operations = -{ +const struct dentry_operations hfs_dentry_operations = { d_revalidate: hfs_revalidate_dentry, d_hash: hfs_hash_dentry, d_compare: hfs_compare_dentry, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfsplus/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfsplus/dir.c 2009-07-26 12:42:02.067299011 -0400 @@ -468,7 +468,7 @@ int hfsplus_rename(struct inode *old_dir return res; } -struct inode_operations hfsplus_dir_inode_operations = { +const struct inode_operations hfsplus_dir_inode_operations = { .lookup = hfsplus_lookup, .create = hfsplus_create, .link = hfsplus_link, @@ -480,7 +480,7 @@ struct inode_operations hfsplus_dir_inod .rename = hfsplus_rename, }; -struct file_operations hfsplus_dir_operations = { +const struct file_operations hfsplus_dir_operations = { .read = generic_read_dir, .readdir = hfsplus_readdir, #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) only in patch2: unchanged: --- linux-2.4.37.4/fs/hfsplus/hfsplus_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfsplus/hfsplus_fs.h 2009-07-26 20:24:54.090313599 -0400 @@ -284,7 +284,7 @@ void hfsplus_cat_write_inode(struct inod struct inode *hfsplus_new_inode(struct super_block *, int); void hfsplus_delete_inode(struct inode *); -extern struct address_space_operations hfsplus_btree_aops; +extern const struct address_space_operations hfsplus_btree_aops; /* options.c */ int parse_options(char *, struct hfsplus_sb_info *); only in patch2: unchanged: --- linux-2.4.37.4/fs/hfsplus/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfsplus/inode.c 2009-07-26 14:08:24.814145609 -0400 @@ -117,7 +117,7 @@ int hfsplus_releasepage(struct page *pag return res; } -struct address_space_operations hfsplus_btree_aops = { +const struct address_space_operations hfsplus_btree_aops = { .readpage = hfsplus_readpage, .writepage = hfsplus_writepage, .sync_page = block_sync_page, @@ -127,7 +127,7 @@ struct address_space_operations hfsplus_ .releasepage = hfsplus_releasepage, }; -struct address_space_operations hfsplus_aops = { +const struct address_space_operations hfsplus_aops = { .readpage = hfsplus_readpage, .writepage = hfsplus_writepage, .sync_page = block_sync_page, @@ -247,15 +247,15 @@ static int hfsplus_file_release(struct i return 0; } -extern struct inode_operations hfsplus_dir_inode_operations; -extern struct file_operations hfsplus_dir_operations; +extern const struct inode_operations hfsplus_dir_inode_operations; +extern const struct file_operations hfsplus_dir_operations; -struct inode_operations hfsplus_file_inode_operations = { +const struct inode_operations hfsplus_file_inode_operations = { .lookup = hfsplus_file_lookup, .truncate = hfsplus_truncate, }; -struct file_operations hfsplus_file_operations = { +const struct file_operations hfsplus_file_operations = { .llseek = generic_file_llseek, .read = generic_file_read, //.write = hfsplus_file_write, only in patch2: unchanged: --- linux-2.4.37.4/fs/hfsplus/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hfsplus/super.c 2009-07-26 12:41:54.841699747 -0400 @@ -255,7 +255,7 @@ int hfsplus_remount(struct super_block * return 0; } -static struct super_operations hfsplus_sops = { +static const struct super_operations hfsplus_sops = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) .alloc_inode = hfsplus_alloc_inode, .destroy_inode = hfsplus_destroy_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/dentry.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/dentry.c 2009-07-26 12:41:17.946661558 -0400 @@ -49,7 +49,7 @@ int hpfs_compare_dentry(struct dentry *d return 0; } -struct dentry_operations hpfs_dentry_operations = { +const struct dentry_operations hpfs_dentry_operations = { d_hash: hpfs_hash_dentry, d_compare: hpfs_compare_dentry, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/file.c 2009-07-26 12:42:14.391945595 -0400 @@ -112,7 +112,7 @@ static int _hpfs_bmap(struct address_spa { return generic_block_bmap(mapping,block,hpfs_get_block); } -struct address_space_operations hpfs_aops = { +const struct address_space_operations hpfs_aops = { readpage: hpfs_readpage, writepage: hpfs_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/hpfs_fn.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/hpfs_fn.h 2009-07-26 14:08:58.861110956 -0400 @@ -312,4 +312,4 @@ void hpfs_put_super(struct super_block * unsigned hpfs_count_one_bitmap(struct super_block *, secno); int hpfs_statfs(struct super_block *, struct statfs *); -extern struct address_space_operations hpfs_aops; +extern const struct address_space_operations hpfs_aops; only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/inode.c 2009-07-26 14:34:15.668235022 -0400 @@ -10,8 +10,7 @@ #include #include "hpfs_fn.h" -static struct file_operations hpfs_file_ops = -{ +static const struct file_operations hpfs_file_ops = { llseek: generic_file_llseek, read: generic_file_read, write: hpfs_file_write, @@ -21,14 +20,12 @@ static struct file_operations hpfs_file_ fsync: hpfs_file_fsync, }; -static struct inode_operations hpfs_file_iops = -{ +static const struct inode_operations hpfs_file_iops = { truncate: hpfs_truncate, setattr: hpfs_notify_change, }; -static struct file_operations hpfs_dir_ops = -{ +static const struct file_operations hpfs_dir_ops = { llseek: hpfs_dir_lseek, read: generic_read_dir, readdir: hpfs_readdir, @@ -37,8 +34,7 @@ static struct file_operations hpfs_dir_o fsync: hpfs_file_fsync, }; -static struct inode_operations hpfs_dir_iops = -{ +static const struct inode_operations hpfs_dir_iops = { create: hpfs_create, lookup: hpfs_lookup, unlink: hpfs_unlink, @@ -50,7 +46,7 @@ static struct inode_operations hpfs_dir_ setattr: hpfs_notify_change, }; -struct address_space_operations hpfs_symlink_aops = { +const struct address_space_operations hpfs_symlink_aops = { readpage: hpfs_symlink_readpage }; only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/namei.c 2009-07-26 14:08:38.887404814 -0400 @@ -225,7 +225,7 @@ int hpfs_mknod(struct inode *dir, struct return -ENOSPC; } -extern struct address_space_operations hpfs_symlink_aops; +extern const struct address_space_operations hpfs_symlink_aops; int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *symlink) { only in patch2: unchanged: --- linux-2.4.37.4/fs/hpfs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/hpfs/super.c 2009-07-26 14:33:46.095122820 -0400 @@ -150,8 +150,7 @@ int hpfs_statfs(struct super_block *s, s /* Super operations */ -static struct super_operations hpfs_sops = -{ +static const struct super_operations hpfs_sops = { read_inode: hpfs_read_inode, delete_inode: hpfs_delete_inode, put_super: hpfs_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/inode.c 2009-07-26 14:34:36.979654788 -0400 @@ -1200,7 +1200,7 @@ void iput(struct inode *inode) { if (inode) { struct super_block *sb = inode->i_sb; - struct super_operations *op = NULL; + const struct super_operations *op = NULL; if (inode->i_state == I_CLEAR) BUG(); only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/dcache.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/dcache.c 2009-07-26 14:35:19.794950573 -0400 @@ -112,8 +112,7 @@ static void presto_d_release(struct dent } } -struct dentry_operations presto_dentry_ops = -{ +const struct dentry_operations presto_dentry_ops = { .d_revalidate = presto_d_revalidate, .d_release = presto_d_release }; only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/dir.c 2009-07-26 14:35:01.752070100 -0400 @@ -248,7 +248,7 @@ struct dentry *presto_lookup(struct inod int minor; ino_t ino; unsigned int generation; - struct inode_operations *iops; + const struct inode_operations *iops; int is_ilookup = 0; ENTRY; @@ -918,8 +918,8 @@ int presto_permission(struct inode *inod if ( cache ) { /* we only override the file/dir permission operations */ - struct inode_operations *fiops = filter_c2cfiops(cache->cache_filter); - struct inode_operations *diops = filter_c2cdiops(cache->cache_filter); + const struct inode_operations *fiops = filter_c2cfiops(cache->cache_filter); + const struct inode_operations *diops = filter_c2cdiops(cache->cache_filter); if ( S_ISREG(mode) && fiops && fiops->permission ) { EXIT; @@ -1388,11 +1388,11 @@ int presto_ioctl(struct inode *inode, st return 0; } -struct file_operations presto_dir_fops = { +const struct file_operations presto_dir_fops = { .ioctl = presto_ioctl }; -struct inode_operations presto_dir_iops = { +const struct inode_operations presto_dir_iops = { .create = presto_create, .lookup = presto_lookup, .link = presto_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/file.c 2009-07-26 12:42:02.082479646 -0400 @@ -456,14 +456,14 @@ static ssize_t presto_file_write(struct return res; } -struct file_operations presto_file_fops = { +const struct file_operations presto_file_fops = { .write = presto_file_write, .open = presto_file_open, .release = presto_file_release, .ioctl = presto_ioctl }; -struct inode_operations presto_file_iops = { +const struct inode_operations presto_file_iops = { .permission = presto_permission, .setattr = presto_setattr, #ifdef CONFIG_FS_EXT_ATTR only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/inode.c 2009-07-26 12:42:02.082479646 -0400 @@ -172,14 +172,14 @@ exit: return ; } -struct super_operations presto_super_ops = { +const struct super_operations presto_super_ops = { .read_inode = presto_read_inode, .put_super = presto_put_super, }; /* symlinks can be chowned */ -struct inode_operations presto_sym_iops = { +const struct inode_operations presto_sym_iops = { .setattr = presto_setattr }; only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/methods.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/methods.c 2009-07-26 14:38:03.487676698 -0400 @@ -60,85 +60,85 @@ int filter_debug = 0xfffffff; static struct filter_fs filter_oppar[FILTER_FS_TYPES]; /* get to the upper methods (intermezzo, snapfs) */ -inline struct super_operations *filter_c2usops(struct filter_fs *cache) +inline const struct super_operations *filter_c2usops(struct filter_fs *cache) { return &cache->o_fops.filter_sops; } -inline struct inode_operations *filter_c2udiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2udiops(struct filter_fs *cache) { return &cache->o_fops.filter_dir_iops; } -inline struct inode_operations *filter_c2ufiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2ufiops(struct filter_fs *cache) { return &cache->o_fops.filter_file_iops; } -inline struct inode_operations *filter_c2usiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2usiops(struct filter_fs *cache) { return &cache->o_fops.filter_sym_iops; } -inline struct file_operations *filter_c2udfops(struct filter_fs *cache) +inline const struct file_operations *filter_c2udfops(struct filter_fs *cache) { return &cache->o_fops.filter_dir_fops; } -inline struct file_operations *filter_c2uffops(struct filter_fs *cache) +inline const struct file_operations *filter_c2uffops(struct filter_fs *cache) { return &cache->o_fops.filter_file_fops; } -inline struct file_operations *filter_c2usfops(struct filter_fs *cache) +inline const struct file_operations *filter_c2usfops(struct filter_fs *cache) { return &cache->o_fops.filter_sym_fops; } -inline struct dentry_operations *filter_c2udops(struct filter_fs *cache) +inline const struct dentry_operations *filter_c2udops(struct filter_fs *cache) { return &cache->o_fops.filter_dentry_ops; } /* get to the cache (lower) methods */ -inline struct super_operations *filter_c2csops(struct filter_fs *cache) +inline const struct super_operations *filter_c2csops(struct filter_fs *cache) { return cache->o_caops.cache_sops; } -inline struct inode_operations *filter_c2cdiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2cdiops(struct filter_fs *cache) { return cache->o_caops.cache_dir_iops; } -inline struct inode_operations *filter_c2cfiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2cfiops(struct filter_fs *cache) { return cache->o_caops.cache_file_iops; } -inline struct inode_operations *filter_c2csiops(struct filter_fs *cache) +inline const struct inode_operations *filter_c2csiops(struct filter_fs *cache) { return cache->o_caops.cache_sym_iops; } -inline struct file_operations *filter_c2cdfops(struct filter_fs *cache) +inline const struct file_operations *filter_c2cdfops(struct filter_fs *cache) { return cache->o_caops.cache_dir_fops; } -inline struct file_operations *filter_c2cffops(struct filter_fs *cache) +inline const struct file_operations *filter_c2cffops(struct filter_fs *cache) { return cache->o_caops.cache_file_fops; } -inline struct file_operations *filter_c2csfops(struct filter_fs *cache) +inline const struct file_operations *filter_c2csfops(struct filter_fs *cache) { return cache->o_caops.cache_sym_fops; } -inline struct dentry_operations *filter_c2cdops(struct filter_fs *cache) +inline const struct dentry_operations *filter_c2cdops(struct filter_fs *cache) { return cache->o_caops.cache_dentry_ops; } @@ -265,7 +265,7 @@ struct filter_fs *filter_get_filter_fs(c * and the underlying file system used for the cache. */ -void filter_setup_super_ops(struct filter_fs *cache, struct super_operations *cache_sops, struct super_operations *filter_sops) +void filter_setup_super_ops(struct filter_fs *cache, const struct super_operations *cache_sops, const struct super_operations *filter_sops) { /* Get ptr to the shared struct snapfs_ops structure. */ struct filter_ops *props = &cache->o_fops; @@ -307,11 +307,11 @@ void filter_setup_super_ops(struct filte } -void filter_setup_dir_ops(struct filter_fs *cache, struct inode *inode, struct inode_operations *filter_iops, struct file_operations *filter_fops) +void filter_setup_dir_ops(struct filter_fs *cache, struct inode *inode, const struct inode_operations *filter_iops, const struct file_operations *filter_fops) { - struct inode_operations *cache_filter_iops; - struct inode_operations *cache_iops = inode->i_op; - struct file_operations *cache_fops = inode->i_fop; + const struct inode_operations *cache_filter_iops; + const struct inode_operations *cache_iops = inode->i_op; + const struct file_operations *cache_fops = inode->i_fop; FENTRY; if ( cache->o_flags & FILTER_DID_DIR_OPS ) { @@ -382,11 +382,11 @@ void filter_setup_dir_ops(struct filter_ } -void filter_setup_file_ops(struct filter_fs *cache, struct inode *inode, struct inode_operations *filter_iops, struct file_operations *filter_fops) +void filter_setup_file_ops(struct filter_fs *cache, struct inode *inode, const struct inode_operations *filter_iops, const struct file_operations *filter_fops) { - struct inode_operations *pr_iops; - struct inode_operations *cache_iops = inode->i_op; - struct file_operations *cache_fops = inode->i_fop; + const struct inode_operations *pr_iops; + const struct inode_operations *cache_iops = inode->i_op; + const struct file_operations *cache_fops = inode->i_fop; FENTRY; if ( cache->o_flags & FILTER_DID_FILE_OPS ) { @@ -438,11 +438,11 @@ void filter_setup_file_ops(struct filter } /* XXX in 2.3 there are "fast" and "slow" symlink ops for ext2 XXX */ -void filter_setup_symlink_ops(struct filter_fs *cache, struct inode *inode, struct inode_operations *filter_iops, struct file_operations *filter_fops) +void filter_setup_symlink_ops(struct filter_fs *cache, struct inode *inode, const struct inode_operations *filter_iops, const struct file_operations *filter_fops) { - struct inode_operations *pr_iops; - struct inode_operations *cache_iops = inode->i_op; - struct file_operations *cache_fops = inode->i_fop; + const struct inode_operations *pr_iops; + const struct inode_operations *cache_iops = inode->i_op; + const struct file_operations *cache_fops = inode->i_fop; FENTRY; if ( cache->o_flags & FILTER_DID_SYMLINK_OPS ) { @@ -477,8 +477,8 @@ void filter_setup_symlink_ops(struct fil } void filter_setup_dentry_ops(struct filter_fs *cache, - struct dentry_operations *cache_dop, - struct dentry_operations *filter_dop) + const struct dentry_operations *cache_dop, + const struct dentry_operations *filter_dop) { if ( cache->o_flags & FILTER_DID_DENTRY_OPS ) { FEXIT; only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/psdev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/psdev.c 2009-07-26 12:41:47.586538529 -0400 @@ -364,7 +364,7 @@ static int presto_psdev_release(struct i return 0; } -static struct file_operations presto_psdev_fops = { +static const struct file_operations presto_psdev_fops = { .read = presto_psdev_read, .write = presto_psdev_write, .poll = presto_psdev_poll, only in patch2: unchanged: --- linux-2.4.37.4/fs/intermezzo/vfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/intermezzo/vfs.c 2009-07-26 14:12:47.672655904 -0400 @@ -79,7 +79,7 @@ # endif #endif -extern struct inode_operations presto_sym_iops; +extern const struct inode_operations presto_sym_iops; /* Write the last_rcvd values to the last_rcvd file. We don't know what the * UUID or last_ctime values are, so we have to read from the file first @@ -228,7 +228,7 @@ int presto_settime(struct presto_file_se int error = 0; struct dentry *dentry; struct inode *inode; - struct inode_operations *iops; + const struct inode_operations *iops; struct iattr iattr; ENTRY; @@ -363,7 +363,7 @@ int presto_do_setattr(struct presto_file { struct rec_info rec; struct inode *inode = dentry->d_inode; - struct inode_operations *iops; + const struct inode_operations *iops; int error; struct presto_version old_ver, new_ver; struct izo_rollback_data rb; @@ -521,7 +521,16 @@ int lento_setattr(const char *name, stru * acl journalling is in place. */ set_posix_acl=dentry->d_inode->i_op->set_posix_acl; - dentry->d_inode->i_op->set_posix_acl=NULL; +#ifdef CONFIG_PAX_KERNEXEC + { + unsigned long cr0; + pax_open_kernel(cr0); +#endif + dentry->d_inode->i_op->set_posix_acl=NULL; +#ifdef CONFIG_PAX_KERNEXEC + pax_close_kernel(cr0); + } +#endif #endif } @@ -537,8 +546,16 @@ int lento_setattr(const char *name, stru #ifdef CONFIG_FS_POSIX_ACL /* restore the inode_operations if we changed them*/ - if (iattr->ia_valid & ATTR_MODE) + if (iattr->ia_valid & ATTR_MODE) { +#ifdef CONFIG_PAX_KERNEXEC + unsigned long cr0; + pax_open_kernel(cr0); +#endif dentry->d_inode->i_op->set_posix_acl=set_posix_acl; +#ifdef CONFIG_PAX_KERNEXEC + pax_close_kernel(cr0); +#endif + } #endif only in patch2: unchanged: --- linux-2.4.37.4/fs/isofs/compress.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/isofs/compress.c 2009-07-26 12:42:14.399113572 -0400 @@ -330,7 +330,7 @@ eio: return err; } -struct address_space_operations zisofs_aops = { +const struct address_space_operations zisofs_aops = { readpage: zisofs_readpage, /* No sync_page operation supported? */ /* No bmap operation supported */ only in patch2: unchanged: --- linux-2.4.37.4/fs/isofs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/isofs/dir.c 2009-07-26 14:38:28.275631643 -0400 @@ -26,8 +26,7 @@ static int isofs_readdir(struct file *, void *, filldir_t); -struct file_operations isofs_dir_operations = -{ +const struct file_operations isofs_dir_operations = { read: generic_read_dir, readdir: isofs_readdir, }; @@ -35,8 +34,7 @@ struct file_operations isofs_dir_operati /* * directories can handle most operations... */ -struct inode_operations isofs_dir_inode_operations = -{ +const struct inode_operations isofs_dir_inode_operations = { lookup: isofs_lookup, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/isofs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/isofs/inode.c 2009-07-26 12:42:14.406196830 -0400 @@ -73,13 +73,13 @@ static void isofs_put_super(struct super static void isofs_read_inode(struct inode *); static int isofs_statfs (struct super_block *, struct statfs *); -static struct super_operations isofs_sops = { +static const struct super_operations isofs_sops = { read_inode: isofs_read_inode, put_super: isofs_put_super, statfs: isofs_statfs, }; -static struct dentry_operations isofs_dentry_ops[] = { +static const struct dentry_operations isofs_dentry_ops[] = { { d_hash: isofs_hash, d_compare: isofs_dentry_cmp, @@ -989,7 +989,7 @@ static int _isofs_bmap(struct address_sp return generic_block_bmap(mapping,block,isofs_get_block); } -static struct address_space_operations isofs_aops = { +static const struct address_space_operations isofs_aops = { readpage: isofs_readpage, sync_page: block_sync_page, bmap: _isofs_bmap only in patch2: unchanged: --- linux-2.4.37.4/fs/isofs/rock.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/isofs/rock.c 2009-07-26 12:42:14.414009543 -0400 @@ -618,6 +618,6 @@ static int rock_ridge_symlink_readpage(s return -EIO; } -struct address_space_operations isofs_symlink_aops = { +const struct address_space_operations isofs_symlink_aops = { readpage: rock_ridge_symlink_readpage }; only in patch2: unchanged: --- linux-2.4.37.4/fs/isofs/zisofs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/isofs/zisofs.h 2009-07-26 14:13:30.816395267 -0400 @@ -15,7 +15,7 @@ */ #ifdef CONFIG_ZISOFS -extern struct address_space_operations zisofs_aops; +extern const struct address_space_operations zisofs_aops; extern int __init zisofs_init(void); extern void __exit zisofs_cleanup(void); #endif only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs/inode-v23.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs/inode-v23.c 2009-07-26 14:39:46.398355319 -0400 @@ -60,12 +60,12 @@ static int jffs_remove(struct inode *dir, struct dentry *dentry, int type); -static struct super_operations jffs_ops; -static struct file_operations jffs_file_operations; -static struct inode_operations jffs_file_inode_operations; -static struct file_operations jffs_dir_operations; -static struct inode_operations jffs_dir_inode_operations; -static struct address_space_operations jffs_address_operations; +static const struct super_operations jffs_ops; +static const struct file_operations jffs_file_operations; +static const struct inode_operations jffs_file_inode_operations; +static const struct file_operations jffs_dir_operations; +static const struct inode_operations jffs_dir_inode_operations; +static const struct address_space_operations jffs_address_operations; kmem_cache_t *node_cache = NULL; kmem_cache_t *fm_cache = NULL; @@ -1574,7 +1574,7 @@ jffs_ioctl(struct inode *inode, struct f } /* jffs_ioctl() */ -static struct address_space_operations jffs_address_operations = { +static const struct address_space_operations jffs_address_operations = { readpage: jffs_readpage, prepare_write: jffs_prepare_write, commit_write: jffs_commit_write, @@ -1592,8 +1592,7 @@ static int jffs_fsync(struct file *f, st extern int generic_file_open(struct inode *, struct file *) __attribute__((weak)); extern loff_t generic_file_llseek(struct file *, loff_t, int) __attribute__((weak)); -static struct file_operations jffs_file_operations = -{ +static const struct file_operations jffs_file_operations = { open: generic_file_open, llseek: generic_file_llseek, read: generic_file_read, @@ -1604,21 +1603,18 @@ static struct file_operations jffs_file_ }; -static struct inode_operations jffs_file_inode_operations = -{ +static const struct inode_operations jffs_file_inode_operations = { lookup: jffs_lookup, /* lookup */ setattr: jffs_setattr, }; -static struct file_operations jffs_dir_operations = -{ +static const struct file_operations jffs_dir_operations = { readdir: jffs_readdir, }; -static struct inode_operations jffs_dir_inode_operations = -{ +static const struct inode_operations jffs_dir_inode_operations = { create: jffs_create, lookup: jffs_lookup, unlink: jffs_unlink, @@ -1724,8 +1720,7 @@ jffs_write_super(struct super_block *sb) jffs_garbage_collect_trigger(c); } -static struct super_operations jffs_ops = -{ +static const struct super_operations jffs_ops = { read_inode: jffs_read_inode, delete_inode: jffs_delete_inode, put_super: jffs_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs2/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs2/dir.c 2009-07-26 14:43:52.725840681 -0400 @@ -58,8 +58,7 @@ static int jffs2_mknod (struct inode *,s static int jffs2_rename (struct inode *, struct dentry *, struct inode *, struct dentry *); -struct file_operations jffs2_dir_operations = -{ +const struct file_operations jffs2_dir_operations = { read: generic_read_dir, readdir: jffs2_readdir, ioctl: jffs2_ioctl, @@ -67,8 +66,7 @@ struct file_operations jffs2_dir_operati }; -struct inode_operations jffs2_dir_inode_operations = -{ +const struct inode_operations jffs2_dir_inode_operations = { create: jffs2_create, lookup: jffs2_lookup, link: jffs2_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs2/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs2/file.c 2009-07-26 14:44:42.253601145 -0400 @@ -54,8 +54,7 @@ int jffs2_null_fsync(struct file *filp, return 0; } -struct file_operations jffs2_file_operations = -{ +const struct file_operations jffs2_file_operations = { llseek: generic_file_llseek, open: generic_file_open, read: generic_file_read, @@ -67,13 +66,11 @@ struct file_operations jffs2_file_operat /* jffs2_file_inode_operations */ -struct inode_operations jffs2_file_inode_operations = -{ +const struct inode_operations jffs2_file_inode_operations = { setattr: jffs2_setattr }; -struct address_space_operations jffs2_file_address_operations = -{ +const struct address_space_operations jffs2_file_address_operations = { readpage: jffs2_readpage, prepare_write: jffs2_prepare_write, commit_write: jffs2_commit_write only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs2/nodelist.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs2/nodelist.h 2009-07-26 20:24:57.413240815 -0400 @@ -307,13 +307,13 @@ void jffs2_stop_garbage_collect_thread(s void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c); /* dir.c */ -extern struct file_operations jffs2_dir_operations; -extern struct inode_operations jffs2_dir_inode_operations; +extern const struct file_operations jffs2_dir_operations; +extern const struct inode_operations jffs2_dir_inode_operations; /* file.c */ -extern struct file_operations jffs2_file_operations; -extern struct inode_operations jffs2_file_inode_operations; -extern struct address_space_operations jffs2_file_address_operations; +extern const struct file_operations jffs2_file_operations; +extern const struct inode_operations jffs2_file_inode_operations; +extern const struct address_space_operations jffs2_file_address_operations; int jffs2_null_fsync(struct file *, struct dentry *, int); int jffs2_setattr (struct dentry *dentry, struct iattr *iattr); int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg); @@ -341,7 +341,7 @@ int jffs2_scan_medium(struct jffs2_sb_in int jffs2_build_filesystem(struct jffs2_sb_info *c); /* symlink.c */ -extern struct inode_operations jffs2_symlink_inode_operations; +extern const struct inode_operations jffs2_symlink_inode_operations; /* erase.c */ void jffs2_erase_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs2/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs2/super.c 2009-07-26 14:44:04.221601691 -0400 @@ -60,8 +60,7 @@ static int jffs2_statfs (struct super_bl int jffs2_remount_fs (struct super_block *, int *, char *); extern void jffs2_clear_inode (struct inode *); -static struct super_operations jffs2_super_operations = -{ +static const struct super_operations jffs2_super_operations = { read_inode: jffs2_read_inode, // delete_inode: jffs2_delete_inode, put_super: jffs2_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/jffs2/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jffs2/symlink.c 2009-07-26 14:44:52.521822453 -0400 @@ -45,8 +45,7 @@ int jffs2_readlink(struct dentry *dentry, char *buffer, int buflen); int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); -struct inode_operations jffs2_symlink_inode_operations = -{ +const struct inode_operations jffs2_symlink_inode_operations = { readlink: jffs2_readlink, follow_link: jffs2_follow_link, setattr: jffs2_setattr only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/file.c 2009-07-26 12:42:02.086347789 -0400 @@ -96,7 +96,7 @@ static int jfs_release(struct inode *ino return 0; } -struct inode_operations jfs_file_inode_operations = { +const struct inode_operations jfs_file_inode_operations = { .truncate = jfs_truncate, .setxattr = jfs_setxattr, .getxattr = jfs_getxattr, @@ -104,7 +104,7 @@ struct inode_operations jfs_file_inode_o .removexattr = jfs_removexattr, }; -struct file_operations jfs_file_operations = { +const struct file_operations jfs_file_operations = { .open = jfs_open, .llseek = generic_file_llseek, .write = generic_file_write, only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/inode.c 2009-07-26 14:17:34.193078478 -0400 @@ -28,12 +28,12 @@ #include "jfs_debug.h" -extern struct inode_operations jfs_dir_inode_operations; -extern struct inode_operations jfs_file_inode_operations; -extern struct inode_operations jfs_symlink_inode_operations; -extern struct file_operations jfs_dir_operations; -extern struct file_operations jfs_file_operations; -struct address_space_operations jfs_aops; +extern const struct inode_operations jfs_dir_inode_operations; +extern const struct inode_operations jfs_file_inode_operations; +extern const struct inode_operations jfs_symlink_inode_operations; +extern const struct file_operations jfs_dir_operations; +extern const struct file_operations jfs_file_operations; +const struct address_space_operations jfs_aops; extern int freeZeroLink(struct inode *); void jfs_clear_inode(struct inode *inode) @@ -335,7 +335,7 @@ static int jfs_direct_IO(int rw, struct blocksize, jfs_get_block); } -struct address_space_operations jfs_aops = { +const struct address_space_operations jfs_aops = { .readpage = jfs_readpage, .writepage = jfs_writepage, .sync_page = block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/jfs_imap.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/jfs_imap.c 2009-07-26 14:18:07.326362702 -0400 @@ -68,7 +68,7 @@ /* * external references */ -extern struct address_space_operations jfs_aops; +extern const struct address_space_operations jfs_aops; /* * forward references only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/namei.c 2009-07-26 14:15:39.535114206 -0400 @@ -28,10 +28,10 @@ #include "jfs_xattr.h" #include "jfs_debug.h" -extern struct inode_operations jfs_file_inode_operations; -extern struct inode_operations jfs_symlink_inode_operations; -extern struct file_operations jfs_file_operations; -extern struct address_space_operations jfs_aops; +extern const struct inode_operations jfs_file_inode_operations; +extern const struct inode_operations jfs_symlink_inode_operations; +extern const struct file_operations jfs_file_operations; +extern const struct address_space_operations jfs_aops; extern int jfs_fsync(struct file *, struct dentry *, int); extern void jfs_truncate_nolock(struct inode *, loff_t); @@ -39,8 +39,8 @@ extern void jfs_truncate_nolock(struct i /* * forward references */ -struct inode_operations jfs_dir_inode_operations; -struct file_operations jfs_dir_operations; +const const struct inode_operations jfs_dir_inode_operations; +const const struct file_operations jfs_dir_operations; static s64 commitZeroLink(tid_t, struct inode *); @@ -1401,7 +1401,7 @@ static struct dentry *jfs_lookup(struct return ERR_PTR(0); } -struct inode_operations jfs_dir_inode_operations = { +const struct inode_operations jfs_dir_inode_operations = { .create = jfs_create, .lookup = jfs_lookup, .link = jfs_link, @@ -1417,7 +1417,7 @@ struct inode_operations jfs_dir_inode_op .removexattr = jfs_removexattr, }; -struct file_operations jfs_dir_operations = { +const struct file_operations jfs_dir_operations = { .read = generic_read_dir, .readdir = jfs_readdir, .fsync = jfs_fsync, only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/super.c 2009-07-26 12:41:54.858682831 -0400 @@ -35,7 +35,7 @@ MODULE_DESCRIPTION("The Journaled Filesy MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM"); MODULE_LICENSE("GPL"); -static struct super_operations jfs_super_operations; +static const struct super_operations jfs_super_operations; static struct file_system_type jfs_fs_type; int jfs_stop_threads; @@ -452,7 +452,7 @@ static int jfs_sync_fs(struct super_bloc return 0; } -static struct super_operations jfs_super_operations = { +static const struct super_operations jfs_super_operations = { .read_inode = jfs_read_inode, .dirty_inode = jfs_dirty_inode, .write_inode = jfs_write_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/jfs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/jfs/symlink.c 2009-07-26 12:42:02.114349535 -0400 @@ -32,7 +32,7 @@ static int jfs_readlink(struct dentry *d return vfs_readlink(dentry, buffer, buflen, s); } -struct inode_operations jfs_symlink_inode_operations = { +const struct inode_operations jfs_symlink_inode_operations = { .readlink = jfs_readlink, .follow_link = jfs_follow_link, .setxattr = jfs_setxattr, only in patch2: unchanged: --- linux-2.4.37.4/fs/minix/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/minix/dir.c 2009-07-26 12:41:47.600215673 -0400 @@ -14,7 +14,7 @@ typedef struct minix_dir_entry minix_dir static int minix_readdir(struct file *, void *, filldir_t); -struct file_operations minix_dir_operations = { +const struct file_operations minix_dir_operations = { read: generic_read_dir, readdir: minix_readdir, fsync: minix_sync_file, only in patch2: unchanged: --- linux-2.4.37.4/fs/minix/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/minix/file.c 2009-07-26 12:42:02.117643099 -0400 @@ -15,7 +15,7 @@ */ int minix_sync_file(struct file *, struct dentry *, int); -struct file_operations minix_file_operations = { +const struct file_operations minix_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -23,7 +23,7 @@ struct file_operations minix_file_operat fsync: minix_sync_file, }; -struct inode_operations minix_file_inode_operations = { +const struct inode_operations minix_file_inode_operations = { truncate: minix_truncate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/minix/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/minix/inode.c 2009-07-26 12:42:14.429643842 -0400 @@ -75,7 +75,7 @@ static void minix_put_super(struct super return; } -static struct super_operations minix_sops = { +static const struct super_operations minix_sops = { read_inode: minix_read_inode, write_inode: minix_write_inode, delete_inode: minix_delete_inode, @@ -317,7 +317,7 @@ static int minix_bmap(struct address_spa { return generic_block_bmap(mapping,block,minix_get_block); } -static struct address_space_operations minix_aops = { +static const struct address_space_operations minix_aops = { readpage: minix_readpage, writepage: minix_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/minix/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/minix/namei.c 2009-07-26 12:42:02.117643099 -0400 @@ -52,7 +52,7 @@ static int minix_hash(struct dentry *den return 0; } -struct dentry_operations minix_dentry_operations = { +const struct dentry_operations minix_dentry_operations = { d_hash: minix_hash, }; @@ -302,7 +302,7 @@ out: /* * directories can handle most operations... */ -struct inode_operations minix_dir_inode_operations = { +const struct inode_operations minix_dir_inode_operations = { create: minix_create, lookup: minix_lookup, link: minix_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/msdos/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/msdos/namei.c 2009-07-26 12:42:02.121414964 -0400 @@ -198,7 +198,7 @@ old_compare: } -static struct dentry_operations msdos_dentry_operations = { +static const struct dentry_operations msdos_dentry_operations = { d_hash: msdos_hash, d_compare: msdos_cmp, }; @@ -578,7 +578,7 @@ rename_done: /* The public inode operations for the msdos fs */ -struct inode_operations msdos_dir_inode_operations = { +const struct inode_operations msdos_dir_inode_operations = { create: msdos_create, lookup: msdos_lookup, unlink: msdos_unlink, only in patch2: unchanged: --- linux-2.4.37.4/fs/ncpfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ncpfs/dir.c 2009-07-26 14:45:27.629634469 -0400 @@ -45,15 +45,13 @@ static int ncp_rename(struct inode *, st extern int ncp_symlink(struct inode *, struct dentry *, const char *); #endif -struct file_operations ncp_dir_operations = -{ +const struct file_operations ncp_dir_operations = { read: generic_read_dir, readdir: ncp_readdir, ioctl: ncp_ioctl, }; -struct inode_operations ncp_dir_inode_operations = -{ +const struct inode_operations ncp_dir_inode_operations = { create: ncp_create, lookup: ncp_lookup, unlink: ncp_unlink, @@ -74,16 +72,14 @@ static int ncp_hash_dentry(struct dentry static int ncp_compare_dentry (struct dentry *, struct qstr *, struct qstr *); static int ncp_delete_dentry(struct dentry *); -static struct dentry_operations ncp_dentry_operations = -{ +static const struct dentry_operations ncp_dentry_operations = { d_revalidate: ncp_lookup_validate, d_hash: ncp_hash_dentry, d_compare: ncp_compare_dentry, d_delete: ncp_delete_dentry, }; -struct dentry_operations ncp_root_dentry_operations = -{ +const struct dentry_operations ncp_root_dentry_operations = { d_hash: ncp_hash_dentry, d_compare: ncp_compare_dentry, d_delete: ncp_delete_dentry, only in patch2: unchanged: --- linux-2.4.37.4/fs/ncpfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ncpfs/file.c 2009-07-26 14:45:44.622702312 -0400 @@ -279,8 +279,7 @@ static int ncp_release(struct inode *ino return 0; } -struct file_operations ncp_file_operations = -{ +const struct file_operations ncp_file_operations = { llseek: generic_file_llseek, read: ncp_file_read, write: ncp_file_write, @@ -290,7 +289,6 @@ struct file_operations ncp_file_operatio fsync: ncp_fsync, }; -struct inode_operations ncp_file_inode_operations = -{ +const struct inode_operations ncp_file_inode_operations = { setattr: ncp_notify_change, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ncpfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ncpfs/inode.c 2009-07-26 14:18:38.026695374 -0400 @@ -36,17 +36,16 @@ static void ncp_delete_inode(struct inod static void ncp_put_super(struct super_block *); static int ncp_statfs(struct super_block *, struct statfs *); -static struct super_operations ncp_sops = -{ +static const struct super_operations ncp_sops = { put_inode: force_delete, delete_inode: ncp_delete_inode, put_super: ncp_put_super, statfs: ncp_statfs, }; -extern struct dentry_operations ncp_root_dentry_operations; +extern const struct dentry_operations ncp_root_dentry_operations; #ifdef CONFIG_NCPFS_EXTRAS -extern struct address_space_operations ncp_symlink_aops; +extern const struct address_space_operations ncp_symlink_aops; extern int ncp_symlink(struct inode*, struct dentry*, const char*); #endif @@ -195,7 +194,7 @@ static void ncp_set_attr(struct inode *i ncp_update_inode(inode, nwinfo); } -static struct inode_operations ncp_symlink_inode_operations = { +static const struct inode_operations ncp_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, setattr: ncp_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/ncpfs/mmap.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ncpfs/mmap.c 2009-07-26 14:45:56.996104369 -0400 @@ -85,8 +85,7 @@ static struct page* ncp_file_mmap_nopage return page; } -static struct vm_operations_struct ncp_file_mmap = -{ +static const struct vm_operations_struct ncp_file_mmap = { nopage: ncp_file_mmap_nopage, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ncpfs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ncpfs/symlink.c 2009-07-26 12:42:14.429643842 -0400 @@ -97,7 +97,7 @@ fail: /* * symlinks can't do much... */ -struct address_space_operations ncp_symlink_aops = { +const struct address_space_operations ncp_symlink_aops = { readpage: ncp_symlink_readpage, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/nfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfs/dir.c 2009-07-26 12:42:02.144827548 -0400 @@ -47,7 +47,7 @@ static int nfs_rename(struct inode *, st struct inode *, struct dentry *); static int nfs_fsync_dir(struct file *, struct dentry *, int); -struct file_operations nfs_dir_operations = { +const struct file_operations nfs_dir_operations = { read: generic_read_dir, readdir: nfs_readdir, open: nfs_open, @@ -55,7 +55,7 @@ struct file_operations nfs_dir_operation fsync: nfs_fsync_dir }; -struct inode_operations nfs_dir_inode_operations = { +const struct inode_operations nfs_dir_inode_operations = { create: nfs_create, lookup: nfs_lookup, link: nfs_link, @@ -570,7 +570,7 @@ static void nfs_dentry_iput(struct dentr iput(inode); } -struct dentry_operations nfs_dentry_operations = { +const struct dentry_operations nfs_dentry_operations = { d_revalidate: nfs_lookup_revalidate, d_delete: nfs_dentry_delete, d_iput: nfs_dentry_iput, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfs/file.c 2009-07-26 12:42:14.433395238 -0400 @@ -41,7 +41,7 @@ static ssize_t nfs_file_write(struct fil static int nfs_file_flush(struct file *); static int nfs_fsync(struct file *, struct dentry *dentry, int datasync); -struct file_operations nfs_file_operations = { +const struct file_operations nfs_file_operations = { llseek: generic_file_llseek, read: nfs_file_read, write: nfs_file_write, @@ -53,7 +53,7 @@ struct file_operations nfs_file_operatio lock: nfs_lock, }; -struct inode_operations nfs_file_inode_operations = { +const struct inode_operations nfs_file_inode_operations = { permission: nfs_permission, revalidate: nfs_revalidate, setattr: nfs_notify_change, @@ -196,7 +196,7 @@ static int nfs_sync_page(struct page *pa return 0; } -struct address_space_operations nfs_file_aops = { +const struct address_space_operations nfs_file_aops = { readpage: nfs_readpage, sync_page: nfs_sync_page, writepage: nfs_writepage, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfs/inode.c 2009-07-26 12:41:54.869029318 -0400 @@ -54,7 +54,7 @@ static void nfs_umount_begin(struct supe static int nfs_statfs(struct super_block *, struct statfs *); static int nfs_show_options(struct seq_file *, struct vfsmount *); -static struct super_operations nfs_sops = { +static const struct super_operations nfs_sops = { read_inode: nfs_read_inode, write_inode: nfs_write_inode, delete_inode: nfs_delete_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfs/symlink.c 2009-07-26 12:42:02.152299810 -0400 @@ -100,7 +100,7 @@ static int nfs_follow_link(struct dentry /* * symlinks can't do much... */ -struct inode_operations nfs_symlink_inode_operations = { +const struct inode_operations nfs_symlink_inode_operations = { readlink: nfs_readlink, follow_link: nfs_follow_link, revalidate: nfs_revalidate, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfsd/export.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfsd/export.c 2009-07-26 12:42:25.024089621 -0400 @@ -715,7 +715,7 @@ static int e_show(struct seq_file *m, vo return 0; } -struct seq_operations nfs_exports_op = { +const struct seq_operations nfs_exports_op = { start: e_start, next: e_next, stop: e_stop, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfsd/nfsctl.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfsd/nfsctl.c 2009-07-26 14:19:07.657368363 -0400 @@ -46,12 +46,12 @@ static int nfsctl_getfs(struct nfsctl_fs static int nfsctl_ugidupdate(struct nfsctl_ugidmap *data); #endif -extern struct seq_operations nfs_exports_op; +extern const struct seq_operations nfs_exports_op; static int exports_open(struct inode *inode, struct file *file) { return seq_open(file, &nfs_exports_op); } -static struct file_operations exports_operations = { +static const struct file_operations exports_operations = { open: exports_open, read: seq_read, llseek: seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/fs/nfsd/vfs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/nfsd/vfs.c 2009-07-26 20:20:03.191012519 -0400 @@ -526,7 +526,7 @@ nfsd_close(struct file *filp) * after it. */ inline void nfsd_dosync(struct file *filp, struct dentry *dp, - struct file_operations *fop) + const struct file_operations *fop) { struct inode *inode = dp->d_inode; int (*fsync) (struct file *, struct dentry *, int); only in patch2: unchanged: --- linux-2.4.37.4/fs/ntfs/fs.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ntfs/fs.c 2009-07-26 12:42:02.160566348 -0400 @@ -33,8 +33,8 @@ #include /* Forward declarations. */ -static struct inode_operations ntfs_dir_inode_operations; -static struct file_operations ntfs_dir_operations; +static const struct inode_operations ntfs_dir_inode_operations; +static const struct file_operations ntfs_dir_operations; #define ITEM_SIZE 2040 @@ -557,7 +557,7 @@ err_ret: return ERR_PTR(err); } -static struct file_operations ntfs_file_operations = { +static const struct file_operations ntfs_file_operations = { llseek: generic_file_llseek, read: ntfs_read, #ifdef CONFIG_NTFS_RW @@ -566,7 +566,7 @@ static struct file_operations ntfs_file_ open: generic_file_open, }; -static struct inode_operations ntfs_inode_operations; +static const struct inode_operations ntfs_inode_operations; #ifdef CONFIG_NTFS_RW static int ntfs_create(struct inode* dir, struct dentry *d, int mode) @@ -680,12 +680,12 @@ static int _linux_ntfs_mkdir(struct inod } #endif -static struct file_operations ntfs_dir_operations = { +static const struct file_operations ntfs_dir_operations = { read: generic_read_dir, readdir: ntfs_readdir, }; -static struct inode_operations ntfs_dir_inode_operations = { +static const struct inode_operations ntfs_dir_inode_operations = { lookup: ntfs_lookup, #ifdef CONFIG_NTFS_RW create: ntfs_create, @@ -915,7 +915,7 @@ static int ntfs_remount_fs(struct super_ } /* Define the super block operation that are implemented */ -static struct super_operations ntfs_super_operations = { +static const struct super_operations ntfs_super_operations = { read_inode: ntfs_read_inode, #ifdef CONFIG_NTFS_RW write_inode: ntfs_write_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/openpromfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/openpromfs/inode.c 2009-07-26 12:42:02.164974626 -0400 @@ -594,28 +594,28 @@ int property_release (struct inode *inod return 0; } -static struct file_operations openpromfs_prop_ops = { +static const struct file_operations openpromfs_prop_ops = { read: property_read, write: property_write, release: property_release, }; -static struct file_operations openpromfs_nodenum_ops = { +static const struct file_operations openpromfs_nodenum_ops = { read: nodenum_read, }; -static struct file_operations openprom_operations = { +static const struct file_operations openprom_operations = { read: generic_read_dir, readdir: openpromfs_readdir, }; -static struct inode_operations openprom_alias_inode_operations = { +static const struct inode_operations openprom_alias_inode_operations = { create: openpromfs_create, lookup: openpromfs_lookup, unlink: openpromfs_unlink, }; -static struct inode_operations openprom_inode_operations = { +static const struct inode_operations openprom_inode_operations = { lookup: openpromfs_lookup, }; @@ -1032,7 +1032,7 @@ static int openprom_statfs(struct super_ return 0; } -static struct super_operations openprom_sops = { +static const struct super_operations openprom_sops = { read_inode: openprom_read_inode, statfs: openprom_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/proc/generic.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/proc/generic.c 2009-07-26 14:46:34.701531342 -0400 @@ -33,7 +33,7 @@ int proc_match(int len, const char *name return !memcmp(name, de->name, len); } -static struct file_operations proc_file_operations = { +static const struct file_operations proc_file_operations = { llseek: proc_file_lseek, read: proc_file_read, write: proc_file_write, @@ -229,7 +229,7 @@ static int proc_follow_link(struct dentr return vfs_follow_link(nd, s); } -static struct inode_operations proc_link_inode_operations = { +static const struct inode_operations proc_link_inode_operations = { readlink: proc_readlink, follow_link: proc_follow_link, }; @@ -245,8 +245,7 @@ static int proc_delete_dentry(struct den return 1; } -static struct dentry_operations proc_dentry_operations = -{ +static const struct dentry_operations proc_dentry_operations = { d_delete: proc_delete_dentry, }; @@ -351,7 +350,7 @@ int proc_readdir(struct file * filp, * use the in-memory "struct proc_dir_entry" tree to parse * the /proc directory. */ -static struct file_operations proc_dir_operations = { +static const struct file_operations proc_dir_operations = { read: generic_read_dir, readdir: proc_readdir, }; @@ -359,7 +358,7 @@ static struct file_operations proc_dir_o /* * proc directories can do almost nothing.. */ -static struct inode_operations proc_dir_inode_operations = { +static const struct inode_operations proc_dir_inode_operations = { lookup: proc_lookup, }; @@ -406,7 +405,7 @@ static void proc_kill_inodes(struct proc struct file * filp = list_entry(p, struct file, f_list); struct dentry * dentry = filp->f_dentry; struct inode * inode; - struct file_operations *fops; + const struct file_operations *fops; if (dentry->d_op != &proc_dentry_operations) continue; only in patch2: unchanged: --- linux-2.4.37.4/fs/proc/kcore.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/proc/kcore.c 2009-07-26 12:41:47.648055049 -0400 @@ -31,7 +31,7 @@ static loff_t lseek_kcore(struct file * static ssize_t read_kcore(struct file *, char *, size_t, loff_t *); -struct file_operations proc_kcore_operations = { +const struct file_operations proc_kcore_operations = { read: read_kcore, open: open_kcore, llseek: lseek_kcore, only in patch2: unchanged: --- linux-2.4.37.4/fs/proc/kmsg.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/proc/kmsg.c 2009-07-26 12:41:47.651488129 -0400 @@ -44,7 +44,7 @@ static unsigned int kmsg_poll(struct fil } -struct file_operations proc_kmsg_operations = { +const struct file_operations proc_kmsg_operations = { read: kmsg_read, poll: kmsg_poll, open: kmsg_open, only in patch2: unchanged: --- linux-2.4.37.4/fs/qnx4/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/qnx4/dir.c 2009-07-26 14:47:09.568570919 -0400 @@ -78,15 +78,13 @@ static int qnx4_readdir(struct file *fil return 0; } -struct file_operations qnx4_dir_operations = -{ +const struct file_operations qnx4_dir_operations = { read: generic_read_dir, readdir: qnx4_readdir, fsync: file_fsync, }; -struct inode_operations qnx4_dir_inode_operations = -{ +const struct inode_operations qnx4_dir_inode_operations = { lookup: qnx4_lookup, #ifdef CONFIG_QNX4FS_RW create: qnx4_create, only in patch2: unchanged: --- linux-2.4.37.4/fs/qnx4/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/qnx4/file.c 2009-07-26 14:47:24.148530204 -0400 @@ -22,8 +22,7 @@ * We have mostly NULL's here: the current defaults are ok for * the qnx4 filesystem. */ -struct file_operations qnx4_file_operations = -{ +const struct file_operations qnx4_file_operations = { llseek: generic_file_llseek, read: generic_file_read, #ifdef CONFIG_QNX4FS_RW @@ -35,8 +34,7 @@ struct file_operations qnx4_file_operati #endif }; -struct inode_operations qnx4_file_inode_operations = -{ +const struct inode_operations qnx4_file_inode_operations = { #ifdef CONFIG_QNX4FS_RW truncate: qnx4_truncate, #endif only in patch2: unchanged: --- linux-2.4.37.4/fs/qnx4/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/qnx4/inode.c 2009-07-26 14:47:47.666898757 -0400 @@ -30,7 +30,7 @@ #define QNX4_VERSION 4 #define QNX4_BMNAME ".bitmap" -static struct super_operations qnx4_sops; +static const struct super_operations qnx4_sops; #ifdef CONFIG_QNX4FS_RW @@ -125,8 +125,7 @@ static void qnx4_read_inode(struct inode static int qnx4_remount(struct super_block *sb, int *flags, char *data); static int qnx4_statfs(struct super_block *, struct statfs *); -static struct super_operations qnx4_sops = -{ +static const struct super_operations qnx4_sops = { read_inode: qnx4_read_inode, #ifdef CONFIG_QNX4FS_RW write_inode: qnx4_write_inode, @@ -428,7 +427,7 @@ static int qnx4_bmap(struct address_spac { return generic_block_bmap(mapping,block,qnx4_get_block); } -struct address_space_operations qnx4_aops = { +const struct address_space_operations qnx4_aops = { readpage: qnx4_readpage, writepage: qnx4_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/ramfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ramfs/inode.c 2009-07-26 12:42:14.440382048 -0400 @@ -35,10 +35,10 @@ /* some random number */ #define RAMFS_MAGIC 0x858458f6 -static struct super_operations ramfs_ops; -static struct address_space_operations ramfs_aops; -static struct file_operations ramfs_file_operations; -static struct inode_operations ramfs_dir_inode_operations; +static const struct super_operations ramfs_ops; +static const struct address_space_operations ramfs_aops; +static const struct file_operations ramfs_file_operations; +static const struct inode_operations ramfs_dir_inode_operations; static int ramfs_statfs(struct super_block *sb, struct statfs *buf) { @@ -271,21 +271,21 @@ static int ramfs_sync_file(struct file * return 0; } -static struct address_space_operations ramfs_aops = { +static const struct address_space_operations ramfs_aops = { readpage: ramfs_readpage, writepage: fail_writepage, prepare_write: ramfs_prepare_write, commit_write: ramfs_commit_write }; -static struct file_operations ramfs_file_operations = { +static const struct file_operations ramfs_file_operations = { read: generic_file_read, write: generic_file_write, mmap: generic_file_mmap, fsync: ramfs_sync_file, }; -static struct inode_operations ramfs_dir_inode_operations = { +static const struct inode_operations ramfs_dir_inode_operations = { create: ramfs_create, lookup: ramfs_lookup, link: ramfs_link, @@ -297,7 +297,7 @@ static struct inode_operations ramfs_dir rename: ramfs_rename, }; -static struct super_operations ramfs_ops = { +static const struct super_operations ramfs_ops = { statfs: ramfs_statfs, put_inode: force_delete, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/read_write.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/read_write.c 2009-07-26 12:41:47.668588799 -0400 @@ -29,7 +29,7 @@ #include -struct file_operations generic_ro_fops = { +const struct file_operations generic_ro_fops = { llseek: generic_file_llseek, read: generic_file_read, mmap: generic_file_mmap, only in patch2: unchanged: --- linux-2.4.37.4/fs/reiserfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/reiserfs/dir.c 2009-07-26 12:41:47.671995054 -0400 @@ -16,7 +16,7 @@ extern struct key MIN_KEY; static int reiserfs_readdir (struct file *, void *, filldir_t); int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ; -struct file_operations reiserfs_dir_operations = { +const struct file_operations reiserfs_dir_operations = { read: generic_read_dir, readdir: reiserfs_readdir, fsync: reiserfs_dir_fsync, only in patch2: unchanged: --- linux-2.4.37.4/fs/reiserfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/reiserfs/file.c 2009-07-26 14:48:33.511839492 -0400 @@ -129,7 +129,7 @@ static int reiserfs_setattr(struct dentr return error ; } -struct file_operations reiserfs_file_operations = { +const struct file_operations reiserfs_file_operations = { read: generic_file_read, write: generic_file_write, ioctl: reiserfs_ioctl, @@ -139,7 +139,7 @@ struct file_operations reiserfs_file_ope }; -struct inode_operations reiserfs_file_inode_operations = { +const struct inode_operations reiserfs_file_inode_operations = { truncate: reiserfs_vfs_truncate_file, setattr: reiserfs_setattr, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/reiserfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/reiserfs/inode.c 2009-07-26 12:42:14.454424920 -0400 @@ -2229,7 +2229,7 @@ static int reiserfs_direct_io(int rw, st reiserfs_get_block_direct_io) ; } -struct address_space_operations reiserfs_address_space_operations = { +const struct address_space_operations reiserfs_address_space_operations = { writepage: reiserfs_writepage, readpage: reiserfs_readpage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/reiserfs/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/reiserfs/namei.c 2009-07-26 12:42:02.187022246 -0400 @@ -1266,7 +1266,7 @@ static int reiserfs_rename (struct inode /* * directories can handle most operations... */ -struct inode_operations reiserfs_dir_inode_operations = { +const struct inode_operations reiserfs_dir_inode_operations = { //&reiserfs_dir_operations, /* default_file_ops */ create: reiserfs_create, lookup: reiserfs_lookup, only in patch2: unchanged: --- linux-2.4.37.4/fs/reiserfs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/reiserfs/super.c 2009-07-26 14:48:14.099818697 -0400 @@ -408,8 +408,7 @@ static void reiserfs_dirty_inode (struct unlock_kernel() ; } -struct super_operations reiserfs_sops = -{ +const struct super_operations reiserfs_sops = { read_inode: reiserfs_read_inode, read_inode2: reiserfs_read_inode2, write_inode: reiserfs_write_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/romfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/romfs/inode.c 2009-07-26 12:42:14.458943231 -0400 @@ -90,7 +90,7 @@ romfs_checksum(void *data, int size) return sum; } -static struct super_operations romfs_ops; +static const struct super_operations romfs_ops; static struct super_block * romfs_read_super(struct super_block *s, void *data, int silent) @@ -435,16 +435,16 @@ err_out: /* Mapping from our types to the kernel */ -static struct address_space_operations romfs_aops = { +static const struct address_space_operations romfs_aops = { readpage: romfs_readpage }; -static struct file_operations romfs_dir_operations = { +static const struct file_operations romfs_dir_operations = { read: generic_read_dir, readdir: romfs_readdir, }; -static struct inode_operations romfs_dir_inode_operations = { +static const struct inode_operations romfs_dir_inode_operations = { lookup: romfs_lookup, }; @@ -525,7 +525,7 @@ romfs_read_inode(struct inode *i) } } -static struct super_operations romfs_ops = { +static const struct super_operations romfs_ops = { read_inode: romfs_read_inode, statfs: romfs_statfs, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/seq_file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/seq_file.c 2009-07-26 20:21:29.812823876 -0400 @@ -25,7 +25,7 @@ * ERR_PTR(error). In the end of sequence they return %NULL. ->show() * returns 0 in case of success and negative number in case of error. */ -int seq_open(struct file *file, struct seq_operations *op) +int seq_open(struct file *file, const struct seq_operations *op) { struct seq_file *p = kmalloc(sizeof(*p), GFP_KERNEL); if (!p) @@ -364,7 +364,7 @@ int single_open(struct file *file, int ( int single_release(struct inode *inode, struct file *file) { - struct seq_operations *op = ((struct seq_file *)file->private_data)->op; + struct seq_operations *op = (struct seq_operations *)((struct seq_file *)file->private_data)->op; int res = seq_release(inode, file); kfree(op); return res; only in patch2: unchanged: --- linux-2.4.37.4/fs/smbfs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/smbfs/dir.c 2009-07-26 14:50:19.417085156 -0400 @@ -33,16 +33,14 @@ static int smb_rename(struct inode *, st static int smb_make_node(struct inode *,struct dentry *, int, int); static int smb_link(struct dentry *, struct inode *, struct dentry *); -struct file_operations smb_dir_operations = -{ +const struct file_operations smb_dir_operations = { read: generic_read_dir, readdir: smb_readdir, ioctl: smb_ioctl, open: smb_dir_open, }; -struct inode_operations smb_dir_inode_operations = -{ +const struct inode_operations smb_dir_inode_operations = { create: smb_create, lookup: smb_lookup, unlink: smb_unlink, @@ -53,8 +51,7 @@ struct inode_operations smb_dir_inode_op setattr: smb_notify_change, }; -struct inode_operations smb_dir_inode_operations_unix = -{ +const struct inode_operations smb_dir_inode_operations_unix = { create: smb_create, lookup: smb_lookup, unlink: smb_unlink, @@ -269,16 +266,14 @@ static int smb_hash_dentry(struct dentry static int smb_compare_dentry(struct dentry *, struct qstr *, struct qstr *); static int smb_delete_dentry(struct dentry *); -static struct dentry_operations smbfs_dentry_operations = -{ +static const struct dentry_operations smbfs_dentry_operations = { d_revalidate: smb_lookup_validate, d_hash: smb_hash_dentry, d_compare: smb_compare_dentry, d_delete: smb_delete_dentry, }; -static struct dentry_operations smbfs_dentry_operations_case = -{ +static const struct dentry_operations smbfs_dentry_operations_case = { d_revalidate: smb_lookup_validate, d_delete: smb_delete_dentry, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/smbfs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/smbfs/file.c 2009-07-26 14:50:55.463643787 -0400 @@ -288,7 +288,7 @@ static int smb_commit_write(struct file return status; } -struct address_space_operations smb_file_aops = { +const struct address_space_operations smb_file_aops = { readpage: smb_readpage, writepage: smb_writepage, prepare_write: smb_prepare_write, @@ -382,8 +382,7 @@ smb_file_permission(struct inode *inode, return error; } -struct file_operations smb_file_operations = -{ +const struct file_operations smb_file_operations = { llseek: generic_file_llseek, read: smb_file_read, write: smb_file_write, @@ -394,8 +393,7 @@ struct file_operations smb_file_operatio fsync: smb_fsync, }; -struct inode_operations smb_file_inode_operations = -{ +const struct inode_operations smb_file_inode_operations = { permission: smb_file_permission, revalidate: smb_revalidate_inode, setattr: smb_notify_change, only in patch2: unchanged: --- linux-2.4.37.4/fs/smbfs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/smbfs/inode.c 2009-07-26 14:51:16.701555022 -0400 @@ -50,8 +50,7 @@ static void smb_put_super(struct super_b static int smb_statfs(struct super_block *, struct statfs *); static int smb_show_options(struct seq_file *, struct vfsmount *); -static struct super_operations smb_sops = -{ +static const struct super_operations smb_sops = { put_inode: force_delete, delete_inode: smb_delete_inode, put_super: smb_put_super, only in patch2: unchanged: --- linux-2.4.37.4/fs/smbfs/proto.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/smbfs/proto.h 2009-07-26 14:22:22.893694819 -0400 @@ -32,9 +32,9 @@ extern int smb_proc_symlink(struct smb_s extern int smb_proc_link(struct smb_sb_info *server, struct dentry *dentry, struct dentry *new_dentry); extern void smb_install_null_ops(struct smb_ops *ops); /* dir.c */ -extern struct file_operations smb_dir_operations; -extern struct inode_operations smb_dir_inode_operations; -extern struct inode_operations smb_dir_inode_operations_unix; +extern const struct file_operations smb_dir_operations; +extern const struct inode_operations smb_dir_inode_operations; +extern const struct inode_operations smb_dir_inode_operations_unix; extern void smb_new_dentry(struct dentry *dentry); extern void smb_renew_times(struct dentry *dentry); /* cache.c */ @@ -59,13 +59,13 @@ extern int smb_revalidate_inode(struct d extern struct super_block *smb_read_super(struct super_block *sb, void *raw_data, int silent); extern int smb_notify_change(struct dentry *dentry, struct iattr *attr); /* file.c */ -extern struct address_space_operations smb_file_aops; -extern struct file_operations smb_file_operations; -extern struct inode_operations smb_file_inode_operations; +extern const struct address_space_operations smb_file_aops; +extern const struct file_operations smb_file_operations; +extern const struct inode_operations smb_file_inode_operations; /* ioctl.c */ extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* symlink.c */ extern int smb_read_link(struct dentry *dentry, char *buffer, int len); extern int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname); extern int smb_follow_link(struct dentry *dentry, struct nameidata *nd); -extern struct inode_operations smb_link_inode_operations; +extern const struct inode_operations smb_link_inode_operations; only in patch2: unchanged: --- linux-2.4.37.4/fs/smbfs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/smbfs/symlink.c 2009-07-26 14:51:07.562868444 -0400 @@ -83,8 +83,7 @@ out: return result; } -struct inode_operations smb_link_inode_operations = -{ +const struct inode_operations smb_link_inode_operations = { .readlink = smb_read_link, .follow_link = smb_follow_link, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/super.c 2009-07-26 14:51:52.894703030 -0400 @@ -263,7 +263,7 @@ struct file_system_type *get_fs_type(con */ static struct super_block *alloc_super(void) { - static struct super_operations empty_sops = {}; + static const struct super_operations empty_sops = {}; struct super_block *s = kmalloc(sizeof(struct super_block), GFP_USER); if (s) { memset(s, 0, sizeof(struct super_block)); @@ -828,7 +828,7 @@ void kill_super(struct super_block *sb) { struct dentry *root = sb->s_root; struct file_system_type *fs = sb->s_type; - struct super_operations *sop = sb->s_op; + const struct super_operations *sop = sb->s_op; if (!deactivate_super(sb)) return; only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/dir.c 2009-07-26 12:41:47.682256518 -0400 @@ -19,7 +19,7 @@ static int sysv_readdir(struct file *, void *, filldir_t); -struct file_operations sysv_dir_operations = { +const struct file_operations sysv_dir_operations = { read: generic_read_dir, readdir: sysv_readdir, fsync: sysv_sync_file, only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/file.c 2009-07-26 12:42:02.195669457 -0400 @@ -20,7 +20,7 @@ * We have mostly NULLs here: the current defaults are OK for * the coh filesystem. */ -struct file_operations sysv_file_operations = { +const struct file_operations sysv_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -28,7 +28,7 @@ struct file_operations sysv_file_operati fsync: sysv_sync_file, }; -struct inode_operations sysv_file_inode_operations = { +const struct inode_operations sysv_file_inode_operations = { truncate: sysv_truncate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/inode.c 2009-07-26 12:42:02.199779157 -0400 @@ -114,7 +114,7 @@ static inline void write3byte(struct sup } } -static struct inode_operations sysv_symlink_inode_operations = { +static const struct inode_operations sysv_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, }; @@ -261,7 +261,7 @@ static void sysv_delete_inode(struct ino unlock_kernel(); } -struct super_operations sysv_sops = { +const struct super_operations sysv_sops = { read_inode: sysv_read_inode, write_inode: sysv_write_inode, delete_inode: sysv_delete_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/itree.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/itree.c 2009-07-26 12:42:14.462730256 -0400 @@ -429,7 +429,7 @@ static int sysv_bmap(struct address_spac { return generic_block_bmap(mapping,block,get_block); } -struct address_space_operations sysv_aops = { +const struct address_space_operations sysv_aops = { readpage: sysv_readpage, writepage: sysv_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/namei.c 2009-07-26 12:42:02.199779157 -0400 @@ -60,7 +60,7 @@ static int sysv_hash(struct dentry *dent return 0; } -struct dentry_operations sysv_dentry_operations = { +const struct dentry_operations sysv_dentry_operations = { d_hash: sysv_hash, }; @@ -310,7 +310,7 @@ out: /* * directories can handle most operations... */ -struct inode_operations sysv_dir_inode_operations = { +const struct inode_operations sysv_dir_inode_operations = { create: sysv_create, lookup: sysv_lookup, link: sysv_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/sysv/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/sysv/symlink.c 2009-07-26 12:42:02.203505589 -0400 @@ -19,7 +19,7 @@ static int sysv_follow_link(struct dentr return vfs_follow_link(nd, s); } -struct inode_operations sysv_fast_symlink_inode_operations = { +const struct inode_operations sysv_fast_symlink_inode_operations = { readlink: sysv_readlink, follow_link: sysv_follow_link, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/dir.c 2009-07-26 12:41:47.685549796 -0400 @@ -45,7 +45,7 @@ static int do_udf_readdir(struct inode * /* readdir and lookup functions */ -struct file_operations udf_dir_operations = { +const struct file_operations udf_dir_operations = { read: generic_read_dir, readdir: udf_readdir, ioctl: udf_ioctl, only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/file.c 2009-07-26 12:42:14.466164973 -0400 @@ -142,7 +142,7 @@ out: return err; } -struct address_space_operations udf_adinicb_aops = { +const struct address_space_operations udf_adinicb_aops = { readpage: udf_adinicb_readpage, writepage: udf_adinicb_writepage, sync_page: block_sync_page, @@ -360,7 +360,7 @@ static int udf_open_file(struct inode * return 0; } -struct file_operations udf_file_operations = { +const struct file_operations udf_file_operations = { read: generic_file_read, ioctl: udf_ioctl, open: udf_open_file, @@ -370,6 +370,6 @@ struct file_operations udf_file_operatio fsync: udf_fsync_file, }; -struct inode_operations udf_file_inode_operations = { +const struct inode_operations udf_file_inode_operations = { truncate: udf_truncate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/inode.c 2009-07-26 12:42:14.477879229 -0400 @@ -151,7 +151,7 @@ static int udf_bmap(struct address_space return generic_block_bmap(mapping,block,udf_get_block); } -struct address_space_operations udf_aops = { +const struct address_space_operations udf_aops = { readpage: udf_readpage, writepage: udf_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/namei.c 2009-07-26 12:42:02.211253063 -0400 @@ -1287,7 +1287,7 @@ end_rename: return retval; } -struct inode_operations udf_dir_inode_operations = { +const struct inode_operations udf_dir_inode_operations = { lookup: udf_lookup, create: udf_create, link: udf_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/super.c 2009-07-26 12:41:54.913487045 -0400 @@ -99,7 +99,7 @@ static int udf_statfs(struct super_block static DECLARE_FSTYPE_DEV(udf_fstype, "udf", udf_read_super); /* Superblock operations */ -static struct super_operations udf_sb_ops = { +static const struct super_operations udf_sb_ops = { read_inode: udf_read_inode, write_inode: udf_write_inode, put_inode: udf_put_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/symlink.c 2009-07-26 12:42:14.482233442 -0400 @@ -124,6 +124,6 @@ out: /* * symlinks can't do much... */ -struct address_space_operations udf_symlink_aops = { +const struct address_space_operations udf_symlink_aops = { readpage: udf_symlink_filler, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/udf/udfdecl.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/udf/udfdecl.h 2009-07-26 20:25:19.220805555 -0400 @@ -50,13 +50,13 @@ struct task_struct; struct buffer_head; struct super_block; -extern struct inode_operations udf_dir_inode_operations; -extern struct file_operations udf_dir_operations; -extern struct inode_operations udf_file_inode_operations; -extern struct file_operations udf_file_operations; -extern struct address_space_operations udf_aops; -extern struct address_space_operations udf_adinicb_aops; -extern struct address_space_operations udf_symlink_aops; +extern const struct inode_operations udf_dir_inode_operations; +extern const struct file_operations udf_dir_operations; +extern const struct inode_operations udf_file_inode_operations; +extern const struct file_operations udf_file_operations; +extern const struct address_space_operations udf_aops; +extern const struct address_space_operations udf_adinicb_aops; +extern const struct address_space_operations udf_symlink_aops; struct udf_fileident_bh { only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/dir.c 2009-07-26 12:41:47.692519788 -0400 @@ -615,7 +615,7 @@ int ufs_empty_dir (struct inode * inode) return 1; } -struct file_operations ufs_dir_operations = { +const struct file_operations ufs_dir_operations = { read: generic_read_dir, readdir: ufs_readdir, fsync: file_fsync, only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/file.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/file.c 2009-07-26 12:42:02.215616939 -0400 @@ -41,7 +41,7 @@ * the ufs filesystem. */ -struct file_operations ufs_file_operations = { +const struct file_operations ufs_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -49,6 +49,6 @@ struct file_operations ufs_file_operatio open: generic_file_open, }; -struct inode_operations ufs_file_inode_operations = { +const struct inode_operations ufs_file_inode_operations = { truncate: ufs_truncate, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/inode.c 2009-07-26 12:42:14.485530675 -0400 @@ -467,7 +467,7 @@ static int ufs_bmap(struct address_space { return generic_block_bmap(mapping,block,ufs_getfrag_block); } -struct address_space_operations ufs_aops = { +const struct address_space_operations ufs_aops = { readpage: ufs_readpage, writepage: ufs_writepage, sync_page: block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/namei.c 2009-07-26 12:42:02.219467872 -0400 @@ -324,7 +324,7 @@ out: return err; } -struct inode_operations ufs_dir_inode_operations = { +const struct inode_operations ufs_dir_inode_operations = { create: ufs_create, lookup: ufs_lookup, link: ufs_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/super.c 2009-07-26 12:41:54.920328471 -0400 @@ -177,7 +177,7 @@ void ufs_print_cylinder_stuff(struct sup } #endif /* UFS_SUPER_DEBUG_MORE */ -static struct super_operations ufs_super_ops; +static const struct super_operations ufs_super_ops; static char error_buf[1024]; @@ -980,7 +980,7 @@ int ufs_statfs (struct super_block * sb, return 0; } -static struct super_operations ufs_super_ops = { +static const struct super_operations ufs_super_ops = { read_inode: ufs_read_inode, write_inode: ufs_write_inode, delete_inode: ufs_delete_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/ufs/symlink.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/ufs/symlink.c 2009-07-26 12:42:02.219467872 -0400 @@ -39,7 +39,7 @@ static int ufs_follow_link(struct dentry return vfs_follow_link(nd, s); } -struct inode_operations ufs_fast_symlink_inode_operations = { +const struct inode_operations ufs_fast_symlink_inode_operations = { readlink: ufs_readlink, follow_link: ufs_follow_link, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/umsdos/dir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/umsdos/dir.c 2009-07-26 14:52:32.862169837 -0400 @@ -45,8 +45,7 @@ static int umsdos_dentry_dput(struct den return 0; } -struct dentry_operations umsdos_dentry_operations = -{ +const struct dentry_operations umsdos_dentry_operations = { d_revalidate: umsdos_dentry_validate, d_delete: umsdos_dentry_dput, }; @@ -787,15 +786,13 @@ out_release: } -struct file_operations umsdos_dir_operations = -{ +const struct file_operations umsdos_dir_operations = { read: generic_read_dir, readdir: UMSDOS_readdir, ioctl: UMSDOS_ioctl_dir, }; -struct inode_operations umsdos_dir_inode_operations = -{ +const struct inode_operations umsdos_dir_inode_operations = { create: UMSDOS_create, lookup: UMSDOS_lookup, link: UMSDOS_link, only in patch2: unchanged: --- linux-2.4.37.4/fs/umsdos/inode.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/umsdos/inode.c 2009-07-26 14:24:23.387386906 -0400 @@ -20,7 +20,7 @@ #include #include -extern struct dentry_operations umsdos_dentry_operations; +extern const struct dentry_operations umsdos_dentry_operations; struct dentry *saved_root; /* Original root if changed */ struct inode *pseudo_root; /* Useful to simulate the pseudo DOS */ @@ -106,12 +106,12 @@ void umsdos_set_dirinfo_new (struct dent return; } -static struct inode_operations umsdos_file_inode_operations = { +static const struct inode_operations umsdos_file_inode_operations = { truncate: fat_truncate, setattr: UMSDOS_notify_change, }; -static struct inode_operations umsdos_symlink_inode_operations = { +static const struct inode_operations umsdos_symlink_inode_operations = { readlink: page_readlink, follow_link: page_follow_link, setattr: UMSDOS_notify_change, @@ -331,8 +331,7 @@ void UMSDOS_write_inode (struct inode *i } -static struct super_operations umsdos_sops = -{ +static const struct super_operations umsdos_sops = { write_inode: UMSDOS_write_inode, put_inode: UMSDOS_put_inode, delete_inode: fat_delete_inode, only in patch2: unchanged: --- linux-2.4.37.4/fs/umsdos/rdir.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/umsdos/rdir.c 2009-07-26 14:29:35.210455744 -0400 @@ -21,7 +21,7 @@ extern struct dentry *saved_root; extern struct inode *pseudo_root; -extern struct dentry_operations umsdos_dentry_operations; +extern const struct dentry_operations umsdos_dentry_operations; struct RDIR_FILLDIR { void *dirbuf; @@ -224,15 +224,13 @@ out: * have a "r" prefix (r for real) such as UMSDOS_rlookup, to differentiate * from the one with full UMSDOS semantics. */ -struct file_operations umsdos_rdir_operations = -{ +const struct file_operations umsdos_rdir_operations = { read: generic_read_dir, readdir: UMSDOS_rreaddir, ioctl: UMSDOS_ioctl_dir, }; -struct inode_operations umsdos_rdir_inode_operations = -{ +const struct inode_operations umsdos_rdir_inode_operations = { create: msdos_create, lookup: UMSDOS_rlookup, unlink: msdos_unlink, only in patch2: unchanged: --- linux-2.4.37.4/fs/vfat/namei.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/vfat/namei.c 2009-07-26 12:42:02.231397397 -0400 @@ -51,7 +51,7 @@ static int vfat_cmpi(struct dentry *dent static int vfat_cmp(struct dentry *dentry, struct qstr *a, struct qstr *b); static int vfat_revalidate(struct dentry *dentry, int); -static struct dentry_operations vfat_dentry_ops[4] = { +static const struct dentry_operations vfat_dentry_ops[4] = { { d_hash: vfat_hashi, d_compare: vfat_cmpi, @@ -1251,7 +1251,7 @@ rename_done: /* Public inode operations for the VFAT fs */ -struct inode_operations vfat_dir_inode_operations = { +const struct inode_operations vfat_dir_inode_operations = { create: vfat_create, lookup: vfat_lookup, unlink: vfat_unlink, only in patch2: unchanged: --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_aops.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_aops.c 2009-07-26 12:42:14.492139655 -0400 @@ -1287,7 +1287,7 @@ linvfs_direct_IO( } -struct address_space_operations linvfs_aops = { +const struct address_space_operations linvfs_aops = { .readpage = linvfs_readpage, .writepage = linvfs_writepage, .sync_page = block_sync_page, only in patch2: unchanged: --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_buf.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_buf.c 2009-07-26 14:52:57.377157642 -0400 @@ -1508,7 +1508,7 @@ xfs_mapping_buftarg( kdev_t kdev; struct inode *inode; struct address_space *mapping; - static struct address_space_operations mapping_aops = { + static const struct address_space_operations mapping_aops = { .sync_page = block_sync_page, }; only in patch2: unchanged: --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_iops.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_iops.c 2009-07-26 12:42:02.234698490 -0400 @@ -647,7 +647,7 @@ linvfs_removexattr( } -struct inode_operations linvfs_file_inode_operations = { +const struct inode_operations linvfs_file_inode_operations = { .permission = linvfs_permission, .truncate = linvfs_truncate, .revalidate = linvfs_revalidate, @@ -658,7 +658,7 @@ struct inode_operations linvfs_file_inod .removexattr = linvfs_removexattr, }; -struct inode_operations linvfs_dir_inode_operations = { +const struct inode_operations linvfs_dir_inode_operations = { .create = linvfs_create, .lookup = linvfs_lookup, .link = linvfs_link, @@ -677,7 +677,7 @@ struct inode_operations linvfs_dir_inode .removexattr = linvfs_removexattr, }; -struct inode_operations linvfs_symlink_inode_operations = { +const struct inode_operations linvfs_symlink_inode_operations = { .readlink = linvfs_readlink, .follow_link = linvfs_follow_link, .permission = linvfs_permission, only in patch2: unchanged: --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_iops.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_iops.h 2009-07-26 14:24:59.214803240 -0400 @@ -32,15 +32,15 @@ #ifndef __XFS_IOPS_H__ #define __XFS_IOPS_H__ -extern struct inode_operations linvfs_file_inode_operations; -extern struct inode_operations linvfs_dir_inode_operations; -extern struct inode_operations linvfs_symlink_inode_operations; - -extern struct file_operations linvfs_file_operations; -extern struct file_operations linvfs_invis_file_operations; -extern struct file_operations linvfs_dir_operations; +extern const struct inode_operations linvfs_file_inode_operations; +extern const struct inode_operations linvfs_dir_inode_operations; +extern const struct inode_operations linvfs_symlink_inode_operations; + +extern const struct file_operations linvfs_file_operations; +extern const struct file_operations linvfs_invis_file_operations; +extern const struct file_operations linvfs_dir_operations; -extern struct address_space_operations linvfs_aops; +extern const struct address_space_operations linvfs_aops; extern int linvfs_get_block(struct inode *, long, struct buffer_head *, int); extern void linvfs_unwritten_done(struct buffer_head *, int); only in patch2: unchanged: --- linux-2.4.37.4/fs/xfs/linux-2.4/xfs_super.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/fs/xfs/linux-2.4/xfs_super.c 2009-07-26 14:53:23.751034434 -0400 @@ -70,7 +70,7 @@ #include STATIC struct quotactl_ops linvfs_qops; -STATIC struct super_operations linvfs_sops; +STATIC const struct super_operations linvfs_sops; STATIC kmem_zone_t *linvfs_inode_zone; STATIC kmem_shaker_t xfs_inode_shaker; @@ -958,7 +958,7 @@ fail_vfsop: } -STATIC struct super_operations linvfs_sops = { +STATIC const struct super_operations linvfs_sops = { .alloc_inode = linvfs_alloc_inode, .destroy_inode = linvfs_destroy_inode, .write_inode = linvfs_write_inode, only in patch2: unchanged: --- linux-2.4.37.4/include/linux/affs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/affs_fs.h 2009-07-26 13:41:51.778026959 -0400 @@ -78,17 +78,17 @@ extern void affs_dir_truncate(struct i /* jump tables */ -extern struct inode_operations affs_file_inode_operations; -extern struct inode_operations affs_dir_inode_operations; -extern struct inode_operations affs_symlink_inode_operations; -extern struct file_operations affs_file_operations; -extern struct file_operations affs_file_operations_ofs; -extern struct file_operations affs_dir_operations; -extern struct address_space_operations affs_symlink_aops; -extern struct address_space_operations affs_aops; -extern struct address_space_operations affs_aops_ofs; +extern const struct inode_operations affs_file_inode_operations; +extern const struct inode_operations affs_dir_inode_operations; +extern const struct inode_operations affs_symlink_inode_operations; +extern const struct file_operations affs_file_operations; +extern const struct file_operations affs_file_operations_ofs; +extern const struct file_operations affs_dir_operations; +extern const struct address_space_operations affs_symlink_aops; +extern const struct address_space_operations affs_aops; +extern const struct address_space_operations affs_aops_ofs; -extern struct dentry_operations affs_dentry_operations; -extern struct dentry_operations affs_dentry_operations_intl; +extern const struct dentry_operations affs_dentry_operations; +extern const struct dentry_operations affs_dentry_operations_intl; #endif only in patch2: unchanged: --- linux-2.4.37.4/include/linux/bfs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/bfs_fs.h 2009-07-26 13:46:40.738492682 -0400 @@ -79,13 +79,13 @@ struct bfs_super_block { #ifdef __KERNEL__ /* file.c */ -extern struct inode_operations bfs_file_inops; -extern struct file_operations bfs_file_operations; -extern struct address_space_operations bfs_aops; +extern const struct inode_operations bfs_file_inops; +extern const struct file_operations bfs_file_operations; +extern const struct address_space_operations bfs_aops; /* dir.c */ -extern struct inode_operations bfs_dir_inops; -extern struct file_operations bfs_dir_operations; +extern const struct inode_operations bfs_dir_inops; +extern const struct file_operations bfs_dir_operations; #endif /* __KERNEL__ */ #endif /* _LINUX_BFS_FS_H */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/coda_linux.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/coda_linux.h 2009-07-26 20:24:44.357425760 -0400 @@ -24,16 +24,16 @@ #include /* operations */ -extern struct inode_operations coda_dir_inode_operations; -extern struct inode_operations coda_file_inode_operations; -extern struct inode_operations coda_ioctl_inode_operations; - -extern struct address_space_operations coda_file_aops; -extern struct address_space_operations coda_symlink_aops; - -extern struct file_operations coda_dir_operations; -extern struct file_operations coda_file_operations; -extern struct file_operations coda_ioctl_operations; +extern const struct inode_operations coda_dir_inode_operations; +extern const struct inode_operations coda_file_inode_operations; +extern const struct inode_operations coda_ioctl_inode_operations; + +extern const struct address_space_operations coda_file_aops; +extern const struct address_space_operations coda_symlink_aops; + +extern const struct file_operations coda_dir_operations; +extern const struct file_operations coda_file_operations; +extern const struct file_operations coda_ioctl_operations; /* operations shared over more than one file */ int coda_open(struct inode *i, struct file *f); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/dcache.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/dcache.h 2009-07-26 13:25:02.884329188 -0400 @@ -77,7 +77,7 @@ struct dentry { int d_mounted; struct qstr d_name; unsigned long d_time; /* used by d_revalidate */ - struct dentry_operations *d_op; + const struct dentry_operations *d_op; struct super_block * d_sb; /* The root of the dentry tree */ unsigned long d_vfs_flags; void * d_fsdata; /* fs-specific data */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/devfs_fs_kernel.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/devfs_fs_kernel.h 2009-07-26 20:22:15.872728769 -0400 @@ -64,7 +64,7 @@ extern void devfs_put (devfs_handle_t de extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name, unsigned int flags, unsigned int major, unsigned int minor, - umode_t mode, void *ops, void *info); + umode_t mode, const void *ops, void *info); extern void devfs_unregister (devfs_handle_t de); extern int devfs_mk_symlink (devfs_handle_t dir, const char *name, unsigned int flags, const char *link, @@ -95,7 +95,7 @@ extern void devfs_auto_unregister (devfs extern devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master); extern const char *devfs_get_name (devfs_handle_t de, unsigned int *namelen); extern int devfs_register_chrdev (unsigned int major, const char *name, - struct file_operations *fops); + const struct file_operations *fops); extern int devfs_register_blkdev (unsigned int major, const char *name, struct block_device_operations *bdops); extern int devfs_unregister_chrdev (unsigned int major, const char *name); @@ -106,7 +106,7 @@ extern void devfs_register_series (devfs unsigned int num_entries, unsigned int flags, unsigned int major, unsigned int minor_start, - umode_t mode, void *ops, void *info); + umode_t mode, const void *ops, void *info); extern int devfs_alloc_major (char type); extern void devfs_dealloc_major (char type, int major); extern kdev_t devfs_alloc_devnum (char type); @@ -136,7 +136,7 @@ static inline devfs_handle_t devfs_regis unsigned int major, unsigned int minor, umode_t mode, - void *ops, void *info) + const void *ops, void *info) { return NULL; } @@ -242,7 +242,7 @@ static inline const char *devfs_get_name return NULL; } static inline int devfs_register_chrdev (unsigned int major, const char *name, - struct file_operations *fops) + const struct file_operations *fops) { return register_chrdev (major, name, fops); } @@ -271,7 +271,7 @@ static inline void devfs_register_series unsigned int flags, unsigned int major, unsigned int minor_start, - umode_t mode, void *ops, void *info) + umode_t mode, const void *ops, void *info) { return; } only in patch2: unchanged: --- linux-2.4.37.4/include/linux/efs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/efs_fs.h 2009-07-26 20:24:45.967578021 -0400 @@ -45,9 +45,9 @@ static const char cprt[] = "EFS: "EFS_VE #define SUPER_INFO(s) &((s)->u.efs_sb) #endif -extern struct inode_operations efs_dir_inode_operations; -extern struct file_operations efs_dir_operations; -extern struct address_space_operations efs_symlink_aops; +extern const struct inode_operations efs_dir_inode_operations; +extern const struct file_operations efs_dir_operations; +extern const struct address_space_operations efs_symlink_aops; extern struct super_block *efs_read_super(struct super_block *, void *, int); extern int efs_statfs(struct super_block *, struct statfs *); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/ext2_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/ext2_fs.h 2009-07-26 13:48:10.436692567 -0400 @@ -639,20 +639,20 @@ extern int ext2_statfs (struct super_blo */ /* dir.c */ -extern struct file_operations ext2_dir_operations; +extern const struct file_operations ext2_dir_operations; /* file.c */ -extern struct inode_operations ext2_file_inode_operations; -extern struct file_operations ext2_file_operations; +extern const struct inode_operations ext2_file_inode_operations; +extern const struct file_operations ext2_file_operations; /* inode.c */ -extern struct address_space_operations ext2_aops; +extern const struct address_space_operations ext2_aops; /* namei.c */ -extern struct inode_operations ext2_dir_inode_operations; +extern const struct inode_operations ext2_dir_inode_operations; /* symlink.c */ -extern struct inode_operations ext2_fast_symlink_inode_operations; +extern const struct inode_operations ext2_fast_symlink_inode_operations; #endif /* __KERNEL__ */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/ext3_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/ext3_fs.h 2009-07-26 13:48:36.560885783 -0400 @@ -702,20 +702,20 @@ extern const char *ext3_decode_error(str */ /* dir.c */ -extern struct file_operations ext3_dir_operations; +extern const struct file_operations ext3_dir_operations; /* file.c */ -extern struct inode_operations ext3_file_inode_operations; -extern struct file_operations ext3_file_operations; +extern const struct inode_operations ext3_file_inode_operations; +extern const struct file_operations ext3_file_operations; /* inode.c */ -extern struct address_space_operations ext3_aops; +extern const struct address_space_operations ext3_aops; /* namei.c */ -extern struct inode_operations ext3_dir_inode_operations; +extern const struct inode_operations ext3_dir_inode_operations; /* symlink.c */ -extern struct inode_operations ext3_fast_symlink_inode_operations; +extern const struct inode_operations ext3_fast_symlink_inode_operations; #endif /* __KERNEL__ */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/fsfilter.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/fsfilter.h 2009-07-26 15:14:41.833552044 -0400 @@ -33,17 +33,17 @@ struct filter_ops { struct cache_ops { /* operations on the file store */ - struct super_operations *cache_sops; + const struct super_operations *cache_sops; - struct inode_operations *cache_dir_iops; - struct inode_operations *cache_file_iops; - struct inode_operations *cache_sym_iops; + const struct inode_operations *cache_dir_iops; + const struct inode_operations *cache_file_iops; + const struct inode_operations *cache_sym_iops; - struct file_operations *cache_dir_fops; - struct file_operations *cache_file_fops; - struct file_operations *cache_sym_fops; + const struct file_operations *cache_dir_fops; + const struct file_operations *cache_file_fops; + const struct file_operations *cache_sym_fops; - struct dentry_operations *cache_dentry_ops; + const struct dentry_operations *cache_dentry_ops; }; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/hfs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/hfs_fs.h 2009-07-26 20:24:52.404447124 -0400 @@ -244,25 +244,25 @@ extern int hfs_rename(struct inode *, st /* dir_cap.c */ extern const struct hfs_name hfs_cap_reserved1[]; extern const struct hfs_name hfs_cap_reserved2[]; -extern struct inode_operations hfs_cap_ndir_inode_operations; -extern struct inode_operations hfs_cap_fdir_inode_operations; -extern struct inode_operations hfs_cap_rdir_inode_operations; -extern struct file_operations hfs_cap_dir_operations; +extern const struct inode_operations hfs_cap_ndir_inode_operations; +extern const struct inode_operations hfs_cap_fdir_inode_operations; +extern const struct inode_operations hfs_cap_rdir_inode_operations; +extern const struct file_operations hfs_cap_dir_operations; extern void hfs_cap_drop_dentry(struct dentry *, const ino_t); /* dir_dbl.c */ extern const struct hfs_name hfs_dbl_reserved1[]; extern const struct hfs_name hfs_dbl_reserved2[]; -extern struct inode_operations hfs_dbl_dir_inode_operations; -extern struct file_operations hfs_dbl_dir_operations; +extern const struct inode_operations hfs_dbl_dir_inode_operations; +extern const struct file_operations hfs_dbl_dir_operations; extern void hfs_dbl_drop_dentry(struct dentry *, const ino_t); /* dir_nat.c */ extern const struct hfs_name hfs_nat_reserved1[]; extern const struct hfs_name hfs_nat_reserved2[]; -extern struct inode_operations hfs_nat_ndir_inode_operations; -extern struct inode_operations hfs_nat_hdir_inode_operations; -extern struct file_operations hfs_nat_dir_operations; +extern const struct inode_operations hfs_nat_ndir_inode_operations; +extern const struct inode_operations hfs_nat_hdir_inode_operations; +extern const struct file_operations hfs_nat_dir_operations; extern void hfs_nat_drop_dentry(struct dentry *, const ino_t); /* file.c */ @@ -271,16 +271,16 @@ extern hfs_s32 hfs_do_read(struct inode extern hfs_s32 hfs_do_write(struct inode *, struct hfs_fork *, hfs_u32, const char *, hfs_u32); extern void hfs_file_fix_mode(struct hfs_cat_entry *entry); -extern struct inode_operations hfs_file_inode_operations; -extern struct file_operations hfs_file_operations; +extern const struct inode_operations hfs_file_inode_operations; +extern const struct file_operations hfs_file_operations; /* file_cap.c */ -extern struct inode_operations hfs_cap_info_inode_operations; -extern struct file_operations hfs_cap_info_operations; +extern const struct inode_operations hfs_cap_info_inode_operations; +extern const struct file_operations hfs_cap_info_operations; /* file_hdr.c */ -extern struct inode_operations hfs_hdr_inode_operations; -extern struct file_operations hfs_hdr_operations; +extern const struct inode_operations hfs_hdr_inode_operations; +extern const struct file_operations hfs_hdr_operations; extern const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout; extern const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout; extern const struct hfs_hdr_layout hfs_nat_hdr_layout; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/input.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/input.h 2009-07-26 20:22:45.432811196 -0400 @@ -685,7 +685,7 @@ struct input_handler { struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev); void (*disconnect)(struct input_handle *handle); - struct file_operations *fops; + const struct file_operations *fops; int minor; struct input_handle *handle; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/intermezzo_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/intermezzo_fs.h 2009-07-26 13:52:12.961374064 -0400 @@ -337,7 +337,7 @@ int presto_lento_up(int minor); int izo_psdev_setchannel(struct file *file, int fd); /* inode.c */ -extern struct super_operations presto_super_ops; +extern const struct super_operations presto_super_ops; void presto_set_ops(struct inode *inode, struct filter_fs *filter); /* dcache.c */ @@ -348,15 +348,15 @@ struct presto_dentry_data *izo_alloc_dda int presto_set_dd(struct dentry *); int presto_init_ddata_cache(void); void presto_cleanup_ddata_cache(void); -extern struct dentry_operations presto_dentry_ops; +extern const struct dentry_operations presto_dentry_ops; /* dir.c */ -extern struct inode_operations presto_dir_iops; -extern struct inode_operations presto_file_iops; -extern struct inode_operations presto_sym_iops; -extern struct file_operations presto_dir_fops; -extern struct file_operations presto_file_fops; -extern struct file_operations presto_sym_fops; +extern const struct inode_operations presto_dir_iops; +extern const struct inode_operations presto_file_iops; +extern const struct inode_operations presto_sym_iops; +extern const struct file_operations presto_dir_fops; +extern const struct file_operations presto_file_fops; +extern const struct file_operations presto_sym_fops; int presto_setattr(struct dentry *de, struct iattr *iattr); int presto_settime(struct presto_file_set *fset, struct dentry *newobj, struct dentry *parent, struct dentry *target, only in patch2: unchanged: --- linux-2.4.37.4/include/linux/iso_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/iso_fs.h 2009-07-26 13:52:38.007338791 -0400 @@ -222,9 +222,9 @@ extern struct dentry *isofs_lookup(struc extern struct buffer_head *isofs_bread(struct inode *inode, unsigned int block); extern int isofs_get_blocks(struct inode *, long, struct buffer_head **, unsigned long); -extern struct inode_operations isofs_dir_inode_operations; -extern struct file_operations isofs_dir_operations; -extern struct address_space_operations isofs_symlink_aops; +extern const struct inode_operations isofs_dir_inode_operations; +extern const struct file_operations isofs_dir_operations; +extern const struct address_space_operations isofs_symlink_aops; /* The following macros are used to check for memory leaks. */ #ifdef LEAK_CHECK only in patch2: unchanged: --- linux-2.4.37.4/include/linux/minix_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/minix_fs.h 2009-07-26 13:53:03.724386228 -0400 @@ -123,11 +123,11 @@ extern ino_t minix_inode_by_name(struct extern int minix_sync_file(struct file *, struct dentry *, int); -extern struct inode_operations minix_file_inode_operations; -extern struct inode_operations minix_dir_inode_operations; -extern struct file_operations minix_file_operations; -extern struct file_operations minix_dir_operations; -extern struct dentry_operations minix_dentry_operations; +extern const struct inode_operations minix_file_inode_operations; +extern const struct inode_operations minix_dir_inode_operations; +extern const struct file_operations minix_file_operations; +extern const struct file_operations minix_dir_operations; +extern const struct dentry_operations minix_dentry_operations; #endif /* __KERNEL__ */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/miscdevice.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/miscdevice.h 2009-07-26 20:22:35.726606466 -0400 @@ -43,7 +43,7 @@ struct miscdevice { int minor; const char *name; - struct file_operations *fops; + const struct file_operations *fops; struct miscdevice * next, * prev; devfs_handle_t devfs_handle; }; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/msdos_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/msdos_fs.h 2009-07-26 20:24:49.335949800 -0400 @@ -256,7 +256,7 @@ extern int fat_get_cluster(struct inode extern int fat_free(struct inode *inode, int skip); /* fat/dir.c */ -extern struct file_operations fat_dir_operations; +extern const struct file_operations fat_dir_operations; extern int fat_search_long(struct inode *inode, const char *name, int name_len, int anycase, loff_t *spos, loff_t *lpos); extern int fat_readdir(struct file *filp, void *dirent, filldir_t filldir); @@ -268,8 +268,8 @@ extern int fat_add_entries(struct inode extern int fat_new_dir(struct inode *dir, struct inode *parent, int is_vfat); /* fat/file.c */ -extern struct file_operations fat_file_operations; -extern struct inode_operations fat_file_inode_operations; +extern const struct file_operations fat_file_operations; +extern const struct inode_operations fat_file_inode_operations; extern ssize_t fat_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos); extern int fat_get_block(struct inode *inode, long iblock, @@ -290,7 +290,7 @@ extern void fat_clear_inode(struct inode extern void fat_put_super(struct super_block *sb); extern struct super_block * fat_read_super(struct super_block *sb, void *data, int silent, - struct inode_operations *fs_dir_inode_ops); + const struct inode_operations *fs_dir_inode_ops); extern int fat_statfs(struct super_block *sb, struct statfs *buf); extern void fat_write_inode(struct inode *inode, int wait); extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/msdos_fs_sb.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/msdos_fs_sb.h 2009-07-26 15:18:25.097929138 -0400 @@ -48,7 +48,7 @@ struct msdos_sb_info { struct nls_table *nls_disk; /* Codepage used on disk */ struct nls_table *nls_io; /* Charset used for input and display */ struct cvf_format* cvf_format; - void *dir_ops; /* Opaque; default directory operations */ + const void *dir_ops; /* Opaque; default directory operations */ void *private_data; int dir_per_block; /* dir entries per block */ int dir_per_block_bits; /* log2(dir_per_block) */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/ncp_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/ncp_fs.h 2009-07-26 20:25:05.705894007 -0400 @@ -230,8 +230,8 @@ void ncp_update_inode(struct inode *, st void ncp_update_inode2(struct inode *, struct ncp_entry_info *); /* linux/fs/ncpfs/dir.c */ -extern struct inode_operations ncp_dir_inode_operations; -extern struct file_operations ncp_dir_operations; +extern const struct inode_operations ncp_dir_inode_operations; +extern const struct file_operations ncp_dir_operations; int ncp_conn_logged_in(struct super_block *); int ncp_date_dos2unix(__u16 time, __u16 date); void ncp_date_unix2dos(int unix_date, __u16 * time, __u16 * date); @@ -251,8 +251,8 @@ void ncp_lock_server(struct ncp_server * void ncp_unlock_server(struct ncp_server *server); /* linux/fs/ncpfs/file.c */ -extern struct inode_operations ncp_file_inode_operations; -extern struct file_operations ncp_file_operations; +extern const struct inode_operations ncp_file_inode_operations; +extern const struct file_operations ncp_file_operations; int ncp_make_open(struct inode *, int); /* linux/fs/ncpfs/mmap.c */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/nfs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/nfs_fs.h 2009-07-26 20:22:16.432636295 -0400 @@ -159,9 +159,9 @@ extern int nfs_notify_change(struct dent /* * linux/fs/nfs/file.c */ -extern struct inode_operations nfs_file_inode_operations; -extern struct file_operations nfs_file_operations; -extern struct address_space_operations nfs_file_aops; +extern const struct inode_operations nfs_file_inode_operations; +extern const struct file_operations nfs_file_operations; +extern const struct address_space_operations nfs_file_aops; static __inline__ struct rpc_cred * nfs_file_cred(struct file *file) @@ -179,14 +179,14 @@ nfs_file_cred(struct file *file) /* * linux/fs/nfs/dir.c */ -extern struct inode_operations nfs_dir_inode_operations; -extern struct file_operations nfs_dir_operations; -extern struct dentry_operations nfs_dentry_operations; +extern const struct inode_operations nfs_dir_inode_operations; +extern const struct file_operations nfs_dir_operations; +extern const struct dentry_operations nfs_dentry_operations; /* * linux/fs/nfs/symlink.c */ -extern struct inode_operations nfs_symlink_inode_operations; +extern const struct inode_operations nfs_symlink_inode_operations; /* * linux/fs/nfs/locks.c only in patch2: unchanged: --- linux-2.4.37.4/include/linux/phonedev.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/phonedev.h 2009-07-26 13:56:08.007316873 -0400 @@ -10,7 +10,7 @@ struct phone_device { struct phone_device *next; - struct file_operations *f_op; + const struct file_operations *f_op; int (*open) (struct phone_device *, struct file *); int board; /* Device private index */ int minor; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/proc_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/proc_fs.h 2009-07-26 20:22:15.871590722 -0400 @@ -59,8 +59,8 @@ struct proc_dir_entry { uid_t uid; gid_t gid; unsigned long size; - struct inode_operations * proc_iops; - struct file_operations * proc_fops; + const struct inode_operations * proc_iops; + const struct file_operations * proc_fops; get_info_t *get_info; struct module *owner; struct proc_dir_entry *next, *parent, *subdir; @@ -112,9 +112,9 @@ extern int proc_match(int, const char *, extern int proc_readdir(struct file *, void *, filldir_t); extern struct dentry *proc_lookup(struct inode *, struct dentry *); -extern struct file_operations proc_kcore_operations; -extern struct file_operations proc_kmsg_operations; -extern struct file_operations ppc_htab_operations; +extern const struct file_operations proc_kcore_operations; +extern const struct file_operations proc_kmsg_operations; +extern const struct file_operations ppc_htab_operations; /* * proc_tty.c @@ -175,7 +175,7 @@ static inline struct proc_dir_entry *pro } static inline struct proc_dir_entry *proc_net_fops_create(const char *name, - mode_t mode, struct file_operations *fops) + mode_t mode, const struct file_operations *fops) { struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/qnx4_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/qnx4_fs.h 2009-07-26 13:57:11.490742718 -0400 @@ -105,10 +105,10 @@ extern struct buffer_head *qnx4_getblk(s extern struct buffer_head *qnx4_bread(struct inode *, int, int); extern int qnx4_create(struct inode *dir, struct dentry *dentry, int mode); -extern struct inode_operations qnx4_file_inode_operations; -extern struct inode_operations qnx4_dir_inode_operations; -extern struct file_operations qnx4_file_operations; -extern struct file_operations qnx4_dir_operations; +extern const struct inode_operations qnx4_file_inode_operations; +extern const struct inode_operations qnx4_dir_inode_operations; +extern const struct file_operations qnx4_file_operations; +extern const struct file_operations qnx4_dir_operations; extern int qnx4_is_free(struct super_block *sb, long block); extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/random.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/random.h 2009-07-26 12:51:48.949950548 -0400 @@ -73,7 +73,7 @@ extern __u32 secure_tcpv6_sequence_numbe extern __u32 secure_ipv6_id(__u32 *daddr); #ifndef MODULE -extern struct file_operations random_fops, urandom_fops; +extern const struct file_operations random_fops, urandom_fops; #endif #endif /* __KERNEL___ */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/reiserfs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/reiserfs_fs.h 2009-07-26 20:25:13.862319910 -0400 @@ -1968,8 +1968,8 @@ int reiserfs_journal_in_proc( char *buff #endif /* dir.c */ -extern struct inode_operations reiserfs_dir_inode_operations; -extern struct file_operations reiserfs_dir_operations; +extern const struct inode_operations reiserfs_dir_inode_operations; +extern const struct file_operations reiserfs_dir_operations; /* tail_conversion.c */ int direct2indirect (struct reiserfs_transaction_handle *, struct inode *, struct path *, struct buffer_head *, loff_t); @@ -1978,9 +1978,9 @@ void reiserfs_unmap_buffer(struct buffer /* file.c */ -extern struct inode_operations reiserfs_file_inode_operations; -extern struct file_operations reiserfs_file_operations; -extern struct address_space_operations reiserfs_address_space_operations ; +extern const struct inode_operations reiserfs_file_inode_operations; +extern const struct file_operations reiserfs_file_operations; +extern const struct address_space_operations reiserfs_address_space_operations ; int get_new_buffer (struct reiserfs_transaction_handle *th, struct buffer_head *, struct buffer_head **, struct path *); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/seq_file.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/seq_file.h 2009-07-26 12:53:13.241450926 -0400 @@ -19,7 +19,7 @@ struct seq_file { size_t count; loff_t index; struct semaphore sem; - struct seq_operations *op; + const struct seq_operations *op; void *private; }; @@ -30,7 +30,7 @@ struct seq_operations { int (*show) (struct seq_file *m, void *v); }; -int seq_open(struct file *, struct seq_operations *); +int seq_open(struct file *, const struct seq_operations *); ssize_t seq_read(struct file *, char *, size_t, loff_t *); loff_t seq_lseek(struct file *, loff_t, int); int seq_release(struct inode *, struct file *); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/sound.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/sound.h 2009-07-26 13:44:16.703564531 -0400 @@ -27,11 +27,11 @@ * Sound core interface functions */ -extern int register_sound_special(struct file_operations *fops, int unit); -extern int register_sound_mixer(struct file_operations *fops, int dev); -extern int register_sound_midi(struct file_operations *fops, int dev); -extern int register_sound_dsp(struct file_operations *fops, int dev); -extern int register_sound_synth(struct file_operations *fops, int dev); +extern int register_sound_special(const struct file_operations *fops, int unit); +extern int register_sound_mixer(const struct file_operations *fops, int dev); +extern int register_sound_midi(const struct file_operations *fops, int dev); +extern int register_sound_dsp(const struct file_operations *fops, int dev); +extern int register_sound_synth(const struct file_operations *fops, int dev); extern void unregister_sound_special(int unit); extern void unregister_sound_mixer(int unit); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/sysv_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/sysv_fs.h 2009-07-26 20:25:18.266990844 -0400 @@ -324,14 +324,14 @@ extern void sysv_set_link(struct sysv_di extern struct sysv_dir_entry *sysv_dotdot(struct inode*, struct page**); extern ino_t sysv_inode_by_name(struct dentry*); -extern struct inode_operations sysv_file_inode_operations; -extern struct inode_operations sysv_dir_inode_operations; -extern struct inode_operations sysv_fast_symlink_inode_operations; -extern struct file_operations sysv_file_operations; -extern struct file_operations sysv_dir_operations; -extern struct address_space_operations sysv_aops; -extern struct super_operations sysv_sops; -extern struct dentry_operations sysv_dentry_operations; +extern const struct inode_operations sysv_file_inode_operations; +extern const struct inode_operations sysv_dir_inode_operations; +extern const struct inode_operations sysv_fast_symlink_inode_operations; +extern const struct file_operations sysv_file_operations; +extern const struct file_operations sysv_dir_operations; +extern const struct address_space_operations sysv_aops; +extern const struct super_operations sysv_sops; +extern const struct dentry_operations sysv_dentry_operations; extern struct sysv_inode *sysv_raw_inode(struct super_block *, unsigned, struct buffer_head **); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/ufs_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/ufs_fs.h 2009-07-26 13:45:05.335348819 -0400 @@ -520,7 +520,7 @@ extern struct ufs_cg_private_info * ufs_ extern void ufs_put_cylinder (struct super_block *, unsigned); /* dir.c */ -extern struct inode_operations ufs_dir_inode_operations; +extern const struct inode_operations ufs_dir_inode_operations; extern int ufs_check_dir_entry (const char *, struct inode *, struct ufs_dir_entry *, struct buffer_head *, unsigned long); extern int ufs_add_link (struct dentry *, struct inode *); extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); @@ -532,10 +532,10 @@ extern struct ufs_dir_entry * ufs_dotdot extern void ufs_set_link(struct inode *, struct ufs_dir_entry *, struct buffer_head *, struct inode *); /* file.c */ -extern struct inode_operations ufs_file_inode_operations; -extern struct file_operations ufs_file_operations; +extern const struct inode_operations ufs_file_inode_operations; +extern const struct file_operations ufs_file_operations; -extern struct address_space_operations ufs_aops; +extern const struct address_space_operations ufs_aops; /* ialloc.c */ extern void ufs_free_inode (struct inode *inode); @@ -552,7 +552,7 @@ extern struct buffer_head * ufs_getfrag extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); /* namei.c */ -extern struct file_operations ufs_dir_operations; +extern const struct file_operations ufs_dir_operations; /* super.c */ extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); @@ -561,7 +561,7 @@ extern void ufs_panic (struct super_bloc extern void ufs_write_super (struct super_block *); /* symlink.c */ -extern struct inode_operations ufs_fast_symlink_inode_operations; +extern const struct inode_operations ufs_fast_symlink_inode_operations; /* truncate.c */ extern void ufs_truncate (struct inode *); only in patch2: unchanged: --- linux-2.4.37.4/include/linux/umsdos_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/umsdos_fs.h 2009-07-26 13:45:28.025044527 -0400 @@ -173,10 +173,10 @@ struct umsdos_ioctl { #include #endif -extern struct inode_operations umsdos_dir_inode_operations; -extern struct inode_operations umsdos_rdir_inode_operations; -extern struct file_operations umsdos_dir_operations; -extern struct file_operations umsdos_rdir_operations; +extern const struct inode_operations umsdos_dir_inode_operations; +extern const struct inode_operations umsdos_rdir_inode_operations; +extern const struct file_operations umsdos_dir_operations; +extern const struct file_operations umsdos_rdir_operations; #include only in patch2: unchanged: --- linux-2.4.37.4/include/linux/usbdevice_fs.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/usbdevice_fs.h 2009-07-26 13:34:34.944307698 -0400 @@ -181,10 +181,10 @@ struct dev_state { /* internal methods & data */ extern struct usb_driver usbdevfs_driver; -extern struct file_operations usbdevfs_drivers_fops; -extern struct file_operations usbdevfs_devices_fops; -extern struct file_operations usbdevfs_device_file_operations; -extern struct inode_operations usbdevfs_device_inode_operations; +extern const struct file_operations usbdevfs_drivers_fops; +extern const struct file_operations usbdevfs_devices_fops; +extern const struct file_operations usbdevfs_device_file_operations; +extern const struct inode_operations usbdevfs_device_inode_operations; extern void usbdevfs_conn_disc_event(void); #endif /* __KERNEL__ */ only in patch2: unchanged: --- linux-2.4.37.4/include/linux/usb.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/usb.h 2009-07-26 20:23:06.627842136 -0400 @@ -456,7 +456,7 @@ struct usb_driver { struct list_head driver_list; - struct file_operations *fops; + const struct file_operations *fops; int minor; struct semaphore serialize; only in patch2: unchanged: --- linux-2.4.37.4/include/linux/videodev.h 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/include/linux/videodev.h 2009-07-26 20:23:12.873550855 -0400 @@ -20,7 +20,7 @@ struct video_device int minor; /* device ops + callbacks */ - struct file_operations *fops; + const struct file_operations *fops; void (*release)(struct video_device *vfd); /* old, obsolete interface -- dropped in 2.5.x, don't use it */ only in patch2: unchanged: --- linux-2.4.37.4/kernel/resource.c 2009-07-26 12:39:27.556893002 -0400 +++ linux-2.4.37.4/kernel/resource.c 2009-07-26 12:42:25.038747913 -0400 @@ -67,7 +67,7 @@ static int r_show(struct seq_file *m, vo return 0; } -static struct seq_operations resource_op = { +static const struct seq_operations resource_op = { .start = r_start, .next = r_next, .stop = r_stop, @@ -94,14 +94,14 @@ static int iomem_open(struct inode *inod return res; } -struct file_operations proc_ioports_operations = { +const struct file_operations proc_ioports_operations = { .open = ioports_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; -struct file_operations proc_iomem_operations = { +const struct file_operations proc_iomem_operations = { .open = iomem_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/mm/slab.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/mm/slab.c 2009-07-26 12:42:25.049481196 -0400 @@ -2017,7 +2017,7 @@ static int s_show(struct seq_file *m, vo * + further values on SMP and with statistics enabled */ -struct seq_operations slabinfo_op = { +const struct seq_operations slabinfo_op = { start: s_start, next: s_next, stop: s_stop, only in patch2: unchanged: --- linux-2.4.37.4/mm/swap_state.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/mm/swap_state.c 2009-07-26 12:42:14.515601779 -0400 @@ -31,7 +31,7 @@ static int swap_writepage(struct page *p return 0; } -static struct address_space_operations swap_aops = { +static const struct address_space_operations swap_aops = { writepage: swap_writepage, sync_page: block_sync_page, }; only in patch2: unchanged: --- linux-2.4.37.4/net/8021q/vlanproc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/8021q/vlanproc.c 2009-07-26 12:41:47.733542992 -0400 @@ -75,7 +75,7 @@ static char term_msg[] = "***KERNEL: * Generic /proc/net/vlan/ file and inode operations */ -static struct file_operations vlan_fops = { +static const struct file_operations vlan_fops = { read: vlan_proc_read, ioctl: NULL, /* vlan_proc_ioctl */ }; @@ -84,7 +84,7 @@ static struct file_operations vlan_fops * /proc/net/vlan/ file and inode operations */ -static struct file_operations vlandev_fops = { +static const struct file_operations vlandev_fops = { read: vlan_proc_read, ioctl: NULL, /* vlan_proc_ioctl */ }; only in patch2: unchanged: --- linux-2.4.37.4/net/atm/br2684.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/atm/br2684.c 2009-07-26 12:41:47.736914886 -0400 @@ -773,7 +773,7 @@ static ssize_t br2684_proc_read(struct f return len; } -static struct file_operations br2684_proc_operations = { +static const struct file_operations br2684_proc_operations = { read: br2684_proc_read, }; only in patch2: unchanged: --- linux-2.4.37.4/net/atm/mpoa_proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/atm/mpoa_proc.c 2009-07-26 12:41:47.740380980 -0400 @@ -41,7 +41,7 @@ static int parse_qos(const char *buff, i /* * Define allowed FILE OPERATIONS */ -static struct file_operations mpc_file_operations = { +static const struct file_operations mpc_file_operations = { read: proc_mpc_read, write: proc_mpc_write, }; only in patch2: unchanged: --- linux-2.4.37.4/net/atm/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/atm/proc.c 2009-07-26 12:42:25.054355527 -0400 @@ -54,11 +54,11 @@ static ssize_t proc_dev_atm_read(struct static ssize_t proc_spec_atm_read(struct file *file,char *buf,size_t count, loff_t *pos); -static struct file_operations proc_dev_atm_operations = { +static const struct file_operations proc_dev_atm_operations = { read: proc_dev_atm_read, }; -static struct file_operations proc_spec_atm_operations = { +static const struct file_operations proc_spec_atm_operations = { read: proc_spec_atm_read, }; @@ -244,7 +244,7 @@ static int clip_seq_show(struct seq_file return 0; } -static struct seq_operations arp_seq_ops = { +static const struct seq_operations arp_seq_ops = { .start = clip_seq_start, .next = neigh_seq_next, .stop = neigh_seq_stop, @@ -282,7 +282,7 @@ out_kfree: goto out; } -static struct file_operations arp_seq_fops = { +static const struct file_operations arp_seq_fops = { .open = arp_seq_open, .read = seq_read, .llseek = seq_lseek, only in patch2: unchanged: --- linux-2.4.37.4/net/core/neighbour.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/core/neighbour.c 2009-07-26 12:42:25.066077112 -0400 @@ -63,7 +63,7 @@ void neigh_changeaddr(struct neigh_table static int neigh_glbl_allocs; static struct neigh_table *neigh_tables; -static struct file_operations neigh_stat_seq_fops; +static const struct file_operations neigh_stat_seq_fops; /* Neighbour hash table buckets are protected with rwlock tbl->lock. @@ -1894,7 +1894,7 @@ static int neigh_stat_seq_show(struct se return 0; } -static struct seq_operations neigh_stat_seq_ops = { +static const struct seq_operations neigh_stat_seq_ops = { .start = neigh_stat_seq_start, .next = neigh_stat_seq_next, .stop = neigh_stat_seq_stop, @@ -1912,7 +1912,7 @@ static int neigh_stat_seq_open(struct in return ret; }; -static struct file_operations neigh_stat_seq_fops = { +static const struct file_operations neigh_stat_seq_fops = { .owner = THIS_MODULE, .open = neigh_stat_seq_open, .read = seq_read, only in patch2: unchanged: --- linux-2.4.37.4/net/decnet/dn_neigh.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/decnet/dn_neigh.c 2009-07-26 12:42:25.069997005 -0400 @@ -550,7 +550,7 @@ static void *dn_neigh_seq_start(struct s NEIGH_SEQ_NEIGH_ONLY); } -static struct seq_operations dn_neigh_seq_ops = { +static const struct seq_operations dn_neigh_seq_ops = { .start = dn_neigh_seq_start, .next = neigh_seq_next, .stop = neigh_seq_stop, @@ -581,7 +581,7 @@ out_kfree: goto out; } -static struct file_operations dn_neigh_seq_fops = { +static const struct file_operations dn_neigh_seq_fops = { .owner = THIS_MODULE, .open = dn_neigh_seq_open, .read = seq_read, only in patch2: unchanged: --- linux-2.4.37.4/net/ipv4/arp.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/ipv4/arp.c 2009-07-26 12:42:25.077807754 -0400 @@ -1311,7 +1311,7 @@ static void *arp_seq_start(struct seq_fi /* ------------------------------------------------------------------------ */ -static struct seq_operations arp_seq_ops = { +static const struct seq_operations arp_seq_ops = { .start = arp_seq_start, .next = neigh_seq_next, .stop = neigh_seq_stop, @@ -1341,7 +1341,7 @@ out_kfree: goto out; } -static struct file_operations arp_seq_fops = { +static const struct file_operations arp_seq_fops = { .owner = THIS_MODULE, .open = arp_seq_open, .read = seq_read, only in patch2: unchanged: --- linux-2.4.37.4/net/netlink/netlink_dev.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/netlink/netlink_dev.c 2009-07-26 12:41:47.771003666 -0400 @@ -159,7 +159,7 @@ static int netlink_ioctl(struct inode *i } -static struct file_operations netlink_fops = { +static const struct file_operations netlink_fops = { owner: THIS_MODULE, llseek: no_llseek, read: netlink_read, only in patch2: unchanged: --- linux-2.4.37.4/net/packet/af_packet.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/packet/af_packet.c 2009-07-26 12:42:07.779113266 -0400 @@ -1614,7 +1614,7 @@ static void packet_mm_close(struct vm_ar atomic_dec(&sk->protinfo.af_packet->mapped); } -static struct vm_operations_struct packet_mmap_ops = { +static const struct vm_operations_struct packet_mmap_ops = { open: packet_mm_open, close: packet_mm_close, }; only in patch2: unchanged: --- linux-2.4.37.4/net/sctp/proc.c 2009-07-19 19:27:44.000000000 -0400 +++ linux-2.4.37.4/net/sctp/proc.c 2009-07-26 12:41:47.774426035 -0400 @@ -100,7 +100,7 @@ static int sctp_snmp_seq_open(struct ino return single_open(file, sctp_snmp_seq_show, NULL); } -static struct file_operations sctp_snmp_seq_fops = { +static const struct file_operations sctp_snmp_seq_fops = { .owner = THIS_MODULE, .open = sctp_snmp_seq_open, .read = seq_read, @@ -194,7 +194,7 @@ static int sctp_eps_seq_open(struct inod return single_open(file, sctp_eps_seq_show, NULL); } -static struct file_operations sctp_eps_seq_fops = { +static const struct file_operations sctp_eps_seq_fops = { .open = sctp_eps_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -260,7 +260,7 @@ static int sctp_assocs_seq_open(struct i return single_open(file, sctp_assocs_seq_show, NULL); } -static struct file_operations sctp_assocs_seq_fops = { +static const struct file_operations sctp_assocs_seq_fops = { .open = sctp_assocs_seq_open, .read = seq_read, .llseek = seq_lseek,