mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
[PATCH] Make most file operations structs in fs/ const
This is a conversion to make the various file_operations structs in fs/ const. Basically a regexp job, with a few manual fixups The goal is both to increase correctness (harder to accidentally write to shared datastructures) and reducing the false sharing of cachelines with things that get dirty in .data (while .rodata is nicely read only and thus cache clean) Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
99ac48f54a
commit
4b6f5d20b0
@ -101,7 +101,7 @@ static struct super_operations ibmasmfs_s_ops = {
|
||||
.drop_inode = generic_delete_inode,
|
||||
};
|
||||
|
||||
static struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
|
||||
static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
|
||||
|
||||
static struct file_system_type ibmasmfs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
|
@ -39,8 +39,8 @@
|
||||
|
||||
extern struct file_system_type v9fs_fs_type;
|
||||
extern struct address_space_operations v9fs_addr_operations;
|
||||
extern struct file_operations v9fs_file_operations;
|
||||
extern struct file_operations v9fs_dir_operations;
|
||||
extern const struct file_operations v9fs_file_operations;
|
||||
extern const struct file_operations v9fs_dir_operations;
|
||||
extern struct dentry_operations v9fs_dentry_operations;
|
||||
|
||||
struct inode *v9fs_get_inode(struct super_block *sb, int mode);
|
||||
|
@ -204,7 +204,7 @@ int v9fs_dir_release(struct inode *inode, struct file *filp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations v9fs_dir_operations = {
|
||||
const struct file_operations v9fs_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = v9fs_dir_readdir,
|
||||
.open = v9fs_file_open,
|
||||
|
@ -266,7 +266,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
|
||||
return total;
|
||||
}
|
||||
|
||||
struct file_operations v9fs_file_operations = {
|
||||
const struct file_operations v9fs_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = v9fs_file_read,
|
||||
.write = v9fs_file_write,
|
||||
|
@ -85,7 +85,7 @@ void __adfs_error(struct super_block *sb, const char *function,
|
||||
|
||||
/* dir_*.c */
|
||||
extern struct inode_operations adfs_dir_inode_operations;
|
||||
extern struct file_operations adfs_dir_operations;
|
||||
extern const struct file_operations adfs_dir_operations;
|
||||
extern struct dentry_operations adfs_dentry_operations;
|
||||
extern struct adfs_dir_ops adfs_f_dir_ops;
|
||||
extern struct adfs_dir_ops adfs_fplus_dir_ops;
|
||||
@ -94,7 +94,7 @@ 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 file_operations adfs_file_operations;
|
||||
|
||||
static inline __u32 signed_asl(__u32 val, signed int shift)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ adfs_dir_lookup_byname(struct inode *inode, struct qstr *name, struct object_inf
|
||||
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,
|
||||
|
@ -25,7 +25,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,
|
||||
|
@ -192,9 +192,9 @@ extern void affs_dir_truncate(struct inode *);
|
||||
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 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 struct address_space_operations affs_symlink_aops;
|
||||
extern struct address_space_operations affs_aops;
|
||||
extern struct address_space_operations affs_aops_ofs;
|
||||
|
@ -17,7 +17,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,
|
||||
|
@ -25,7 +25,7 @@ static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext);
|
||||
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 = generic_file_write,
|
||||
|
@ -32,7 +32,7 @@ static int afs_d_delete(struct dentry *dentry);
|
||||
static int afs_dir_lookup_filldir(void *_cookie, const char *name, int nlen,
|
||||
loff_t fpos, ino_t ino, unsigned dtype);
|
||||
|
||||
struct file_operations afs_dir_file_operations = {
|
||||
const struct file_operations afs_dir_file_operations = {
|
||||
.open = afs_dir_open,
|
||||
.readdir = afs_dir_readdir,
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ extern struct cachefs_index_def afs_cache_cell_index_def;
|
||||
* dir.c
|
||||
*/
|
||||
extern struct inode_operations afs_dir_inode_operations;
|
||||
extern struct file_operations afs_dir_file_operations;
|
||||
extern const struct file_operations afs_dir_file_operations;
|
||||
|
||||
/*
|
||||
* file.c
|
||||
@ -105,7 +105,7 @@ extern struct cachefs_netfs afs_cache_netfs;
|
||||
* mntpt.c
|
||||
*/
|
||||
extern struct inode_operations afs_mntpt_inode_operations;
|
||||
extern struct file_operations afs_mntpt_file_operations;
|
||||
extern const struct file_operations afs_mntpt_file_operations;
|
||||
extern struct afs_timer afs_mntpt_expiry_timer;
|
||||
extern struct afs_timer_ops afs_mntpt_expiry_timer_ops;
|
||||
extern unsigned long afs_mntpt_expiry_timeout;
|
||||
|
@ -32,7 +32,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir,
|
||||
static int afs_mntpt_open(struct inode *inode, struct file *file);
|
||||
static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
|
||||
|
||||
struct file_operations afs_mntpt_file_operations = {
|
||||
const struct file_operations afs_mntpt_file_operations = {
|
||||
.open = afs_mntpt_open,
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ static struct seq_operations afs_proc_cells_ops = {
|
||||
.show = afs_proc_cells_show,
|
||||
};
|
||||
|
||||
static struct file_operations afs_proc_cells_fops = {
|
||||
static const struct file_operations afs_proc_cells_fops = {
|
||||
.open = afs_proc_cells_open,
|
||||
.read = seq_read,
|
||||
.write = afs_proc_cells_write,
|
||||
@ -53,7 +53,7 @@ static ssize_t afs_proc_rootcell_write(struct file *file,
|
||||
const char __user *buf,
|
||||
size_t size, loff_t *_pos);
|
||||
|
||||
static struct file_operations afs_proc_rootcell_fops = {
|
||||
static const struct file_operations afs_proc_rootcell_fops = {
|
||||
.open = afs_proc_rootcell_open,
|
||||
.read = afs_proc_rootcell_read,
|
||||
.write = afs_proc_rootcell_write,
|
||||
@ -77,7 +77,7 @@ static struct seq_operations afs_proc_cell_volumes_ops = {
|
||||
.show = afs_proc_cell_volumes_show,
|
||||
};
|
||||
|
||||
static struct file_operations afs_proc_cell_volumes_fops = {
|
||||
static const struct file_operations afs_proc_cell_volumes_fops = {
|
||||
.open = afs_proc_cell_volumes_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
@ -101,7 +101,7 @@ static struct seq_operations afs_proc_cell_vlservers_ops = {
|
||||
.show = afs_proc_cell_vlservers_show,
|
||||
};
|
||||
|
||||
static struct file_operations afs_proc_cell_vlservers_fops = {
|
||||
static const struct file_operations afs_proc_cell_vlservers_fops = {
|
||||
.open = afs_proc_cell_vlservers_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
@ -124,7 +124,7 @@ static struct seq_operations afs_proc_cell_servers_ops = {
|
||||
.show = afs_proc_cell_servers_show,
|
||||
};
|
||||
|
||||
static struct file_operations afs_proc_cell_servers_fops = {
|
||||
static const struct file_operations afs_proc_cell_servers_fops = {
|
||||
.open = afs_proc_cell_servers_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
@ -146,7 +146,7 @@ struct autofs_dir_ent *autofs_expire(struct super_block *,struct autofs_sb_info
|
||||
|
||||
extern struct inode_operations autofs_root_inode_operations;
|
||||
extern struct inode_operations autofs_symlink_inode_operations;
|
||||
extern struct file_operations autofs_root_operations;
|
||||
extern const struct file_operations autofs_root_operations;
|
||||
|
||||
/* Initializing function */
|
||||
|
||||
|
@ -26,7 +26,7 @@ static int autofs_root_rmdir(struct inode *,struct dentry *);
|
||||
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,
|
||||
|
@ -176,8 +176,8 @@ extern struct inode_operations autofs4_dir_inode_operations;
|
||||
extern struct inode_operations autofs4_root_inode_operations;
|
||||
extern struct inode_operations autofs4_indirect_root_inode_operations;
|
||||
extern struct inode_operations autofs4_direct_root_inode_operations;
|
||||
extern struct file_operations autofs4_dir_operations;
|
||||
extern struct file_operations autofs4_root_operations;
|
||||
extern const struct file_operations autofs4_dir_operations;
|
||||
extern const struct file_operations autofs4_root_operations;
|
||||
|
||||
/* Initializing function */
|
||||
|
||||
|
@ -32,7 +32,7 @@ static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t fil
|
||||
static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
|
||||
static void *autofs4_follow_link(struct dentry *, struct nameidata *);
|
||||
|
||||
struct file_operations autofs4_root_operations = {
|
||||
const struct file_operations autofs4_root_operations = {
|
||||
.open = dcache_dir_open,
|
||||
.release = dcache_dir_close,
|
||||
.read = generic_read_dir,
|
||||
@ -40,7 +40,7 @@ struct file_operations autofs4_root_operations = {
|
||||
.ioctl = autofs4_root_ioctl,
|
||||
};
|
||||
|
||||
struct file_operations autofs4_dir_operations = {
|
||||
const struct file_operations autofs4_dir_operations = {
|
||||
.open = autofs4_dir_open,
|
||||
.release = autofs4_dir_close,
|
||||
.read = generic_read_dir,
|
||||
|
@ -22,7 +22,7 @@ static int return_EIO(void)
|
||||
|
||||
#define EIO_ERROR ((void *) (return_EIO))
|
||||
|
||||
static struct file_operations bad_file_ops =
|
||||
static const struct file_operations bad_file_ops =
|
||||
{
|
||||
.llseek = EIO_ERROR,
|
||||
.aio_read = EIO_ERROR,
|
||||
|
@ -64,7 +64,7 @@ static const struct super_operations befs_sops = {
|
||||
/* slab cache for befs_inode_info objects */
|
||||
static kmem_cache_t *befs_inode_cachep;
|
||||
|
||||
static struct file_operations befs_dir_operations = {
|
||||
static const struct file_operations befs_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = befs_readdir,
|
||||
};
|
||||
|
@ -49,11 +49,11 @@ static inline struct bfs_inode_info *BFS_I(struct inode *inode)
|
||||
|
||||
/* file.c */
|
||||
extern struct inode_operations bfs_file_inops;
|
||||
extern struct file_operations bfs_file_operations;
|
||||
extern const struct file_operations bfs_file_operations;
|
||||
extern 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 file_operations bfs_dir_operations;
|
||||
|
||||
#endif /* _FS_BFS_BFS_H */
|
||||
|
@ -70,7 +70,7 @@ static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir)
|
||||
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,
|
||||
|
@ -17,7 +17,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,
|
||||
|
@ -600,7 +600,7 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
|
||||
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,
|
||||
};
|
||||
@ -668,7 +668,7 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
|
||||
return count;
|
||||
}
|
||||
|
||||
static struct file_operations bm_register_operations = {
|
||||
static const struct file_operations bm_register_operations = {
|
||||
.write = bm_register_write,
|
||||
};
|
||||
|
||||
@ -715,7 +715,7 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer,
|
||||
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,
|
||||
};
|
||||
|
@ -1087,7 +1087,7 @@ struct address_space_operations def_blk_aops = {
|
||||
.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,
|
||||
|
@ -406,7 +406,7 @@ static void cdev_purge(struct cdev *cdev)
|
||||
* is contain the open that then fills in the correct operations
|
||||
* depending on the special file...
|
||||
*/
|
||||
struct file_operations def_chr_fops = {
|
||||
const struct file_operations def_chr_fops = {
|
||||
.open = chrdev_open,
|
||||
};
|
||||
|
||||
|
@ -583,7 +583,7 @@ struct inode_operations cifs_symlink_inode_ops = {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct file_operations cifs_file_ops = {
|
||||
const struct file_operations cifs_file_ops = {
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.readv = generic_file_readv,
|
||||
@ -607,7 +607,7 @@ struct file_operations cifs_file_ops = {
|
||||
#endif /* CONFIG_CIFS_EXPERIMENTAL */
|
||||
};
|
||||
|
||||
struct file_operations cifs_file_direct_ops = {
|
||||
const struct file_operations cifs_file_direct_ops = {
|
||||
/* no mmap, no aio, no readv -
|
||||
BB reevaluate whether they can be done with directio, no cache */
|
||||
.read = cifs_user_read,
|
||||
@ -626,7 +626,7 @@ struct file_operations cifs_file_direct_ops = {
|
||||
.dir_notify = cifs_dir_notify,
|
||||
#endif /* CONFIG_CIFS_EXPERIMENTAL */
|
||||
};
|
||||
struct file_operations cifs_file_nobrl_ops = {
|
||||
const struct file_operations cifs_file_nobrl_ops = {
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.readv = generic_file_readv,
|
||||
@ -649,7 +649,7 @@ struct file_operations cifs_file_nobrl_ops = {
|
||||
#endif /* CONFIG_CIFS_EXPERIMENTAL */
|
||||
};
|
||||
|
||||
struct file_operations cifs_file_direct_nobrl_ops = {
|
||||
const struct file_operations cifs_file_direct_nobrl_ops = {
|
||||
/* no mmap, no aio, no readv -
|
||||
BB reevaluate whether they can be done with directio, no cache */
|
||||
.read = cifs_user_read,
|
||||
@ -668,7 +668,7 @@ struct file_operations cifs_file_direct_nobrl_ops = {
|
||||
#endif /* CONFIG_CIFS_EXPERIMENTAL */
|
||||
};
|
||||
|
||||
struct file_operations cifs_dir_ops = {
|
||||
const struct file_operations cifs_dir_ops = {
|
||||
.readdir = cifs_readdir,
|
||||
.release = cifs_closedir,
|
||||
.read = generic_read_dir,
|
||||
|
@ -61,10 +61,10 @@ extern struct inode_operations cifs_file_inode_ops;
|
||||
extern struct inode_operations cifs_symlink_inode_ops;
|
||||
|
||||
/* Functions related to files and directories */
|
||||
extern struct file_operations cifs_file_ops;
|
||||
extern struct file_operations cifs_file_direct_ops; /* if directio mount */
|
||||
extern struct file_operations cifs_file_nobrl_ops;
|
||||
extern struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount */
|
||||
extern const struct file_operations cifs_file_ops;
|
||||
extern const struct file_operations cifs_file_direct_ops; /* if directio mount */
|
||||
extern const struct file_operations cifs_file_nobrl_ops;
|
||||
extern const struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount */
|
||||
extern int cifs_open(struct inode *inode, struct file *file);
|
||||
extern int cifs_close(struct inode *inode, struct file *file);
|
||||
extern int cifs_closedir(struct inode *inode, struct file *file);
|
||||
@ -76,7 +76,7 @@ extern int cifs_lock(struct file *, int, struct file_lock *);
|
||||
extern int cifs_fsync(struct file *, struct dentry *, int);
|
||||
extern int cifs_flush(struct file *);
|
||||
extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
|
||||
extern struct file_operations cifs_dir_ops;
|
||||
extern const struct file_operations cifs_dir_ops;
|
||||
extern int cifs_dir_open(struct inode *inode, struct file *file);
|
||||
extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir);
|
||||
extern int cifs_dir_notify(struct file *, unsigned long arg);
|
||||
|
@ -82,7 +82,7 @@ struct inode_operations coda_dir_inode_operations =
|
||||
.setattr = coda_setattr,
|
||||
};
|
||||
|
||||
struct file_operations coda_dir_operations = {
|
||||
const struct file_operations coda_dir_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = coda_readdir,
|
||||
|
@ -288,7 +288,7 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
|
||||
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,
|
||||
|
@ -36,7 +36,7 @@ struct inode_operations coda_ioctl_inode_operations =
|
||||
.setattr = coda_setattr,
|
||||
};
|
||||
|
||||
struct file_operations coda_ioctl_operations = {
|
||||
const struct file_operations coda_ioctl_operations = {
|
||||
.owner = THIS_MODULE,
|
||||
.ioctl = coda_pioctl,
|
||||
};
|
||||
|
@ -342,7 +342,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
|
||||
}
|
||||
|
||||
|
||||
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,
|
||||
|
@ -72,9 +72,9 @@ extern void configfs_release_fs(void);
|
||||
|
||||
extern struct rw_semaphore configfs_rename_sem;
|
||||
extern struct super_block * configfs_sb;
|
||||
extern struct file_operations configfs_dir_operations;
|
||||
extern struct file_operations configfs_file_operations;
|
||||
extern struct file_operations bin_fops;
|
||||
extern const struct file_operations configfs_dir_operations;
|
||||
extern const struct file_operations configfs_file_operations;
|
||||
extern const struct file_operations bin_fops;
|
||||
extern struct inode_operations configfs_dir_inode_operations;
|
||||
extern struct inode_operations configfs_symlink_inode_operations;
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ static loff_t configfs_dir_lseek(struct file * file, loff_t offset, int origin)
|
||||
return offset;
|
||||
}
|
||||
|
||||
struct file_operations configfs_dir_operations = {
|
||||
const struct file_operations configfs_dir_operations = {
|
||||
.open = configfs_dir_open,
|
||||
.release = configfs_dir_close,
|
||||
.llseek = configfs_dir_lseek,
|
||||
|
@ -322,7 +322,7 @@ static int configfs_release(struct inode * inode, struct file * filp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations configfs_file_operations = {
|
||||
const struct file_operations configfs_file_operations = {
|
||||
.read = configfs_read_file,
|
||||
.write = configfs_write_file,
|
||||
.llseek = generic_file_llseek,
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
static struct super_operations cramfs_ops;
|
||||
static struct inode_operations cramfs_dir_inode_operations;
|
||||
static struct file_operations cramfs_directory_operations;
|
||||
static const struct file_operations cramfs_directory_operations;
|
||||
static struct address_space_operations cramfs_aops;
|
||||
|
||||
static DEFINE_MUTEX(read_mutex);
|
||||
@ -512,7 +512,7 @@ static struct address_space_operations cramfs_aops = {
|
||||
/*
|
||||
* A directory can only readdir
|
||||
*/
|
||||
static struct file_operations cramfs_directory_operations = {
|
||||
static const struct file_operations cramfs_directory_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = cramfs_readdir,
|
||||
|
@ -39,7 +39,7 @@ static int default_open(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations debugfs_file_operations = {
|
||||
const struct file_operations debugfs_file_operations = {
|
||||
.read = default_read_file,
|
||||
.write = default_write_file,
|
||||
.open = default_open,
|
||||
@ -213,7 +213,7 @@ static ssize_t write_file_bool(struct file *file, const char __user *user_buf,
|
||||
return count;
|
||||
}
|
||||
|
||||
static struct file_operations fops_bool = {
|
||||
static const struct file_operations fops_bool = {
|
||||
.read = read_file_bool,
|
||||
.write = write_file_bool,
|
||||
.open = default_open,
|
||||
|
@ -856,14 +856,14 @@ static int devfsd_close(struct inode *inode, struct file *file);
|
||||
#ifdef CONFIG_DEVFS_DEBUG
|
||||
static ssize_t stat_read(struct file *file, char __user *buf, size_t len,
|
||||
loff_t * ppos);
|
||||
static struct file_operations stat_fops = {
|
||||
static const struct file_operations stat_fops = {
|
||||
.open = nonseekable_open,
|
||||
.read = stat_read,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Devfs daemon file operations */
|
||||
static struct file_operations devfsd_fops = {
|
||||
static const struct file_operations devfsd_fops = {
|
||||
.open = nonseekable_open,
|
||||
.read = devfsd_read,
|
||||
.ioctl = devfsd_ioctl,
|
||||
@ -1842,8 +1842,8 @@ static int try_modload(struct devfs_entry *parent, struct fs_info *fs_info,
|
||||
|
||||
static struct inode_operations devfs_iops;
|
||||
static struct inode_operations devfs_dir_iops;
|
||||
static struct file_operations devfs_fops;
|
||||
static struct file_operations devfs_dir_fops;
|
||||
static const struct file_operations devfs_fops;
|
||||
static const struct file_operations devfs_dir_fops;
|
||||
static struct inode_operations devfs_symlink_iops;
|
||||
|
||||
static int devfs_notify_change(struct dentry *dentry, struct iattr *iattr)
|
||||
@ -2061,11 +2061,11 @@ static int devfs_open(struct inode *inode, struct file *file)
|
||||
return err;
|
||||
} /* 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,
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
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,
|
||||
};
|
||||
|
@ -290,7 +290,7 @@ static kmem_cache_t *pwq_cache __read_mostly;
|
||||
static struct vfsmount *eventpoll_mnt __read_mostly;
|
||||
|
||||
/* File callbacks that implement the eventpoll file behaviour */
|
||||
static struct file_operations eventpoll_fops = {
|
||||
static const struct file_operations eventpoll_fops = {
|
||||
.release = ep_eventpoll_close,
|
||||
.poll = ep_eventpoll_poll
|
||||
};
|
||||
|
@ -658,7 +658,7 @@ int ext2_empty_dir (struct inode * inode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations ext2_dir_operations = {
|
||||
const struct file_operations ext2_dir_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = ext2_readdir,
|
||||
|
@ -154,12 +154,12 @@ extern void ext2_write_super (struct super_block *);
|
||||
*/
|
||||
|
||||
/* 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 struct file_operations ext2_xip_file_operations;
|
||||
extern const struct file_operations ext2_file_operations;
|
||||
extern const struct file_operations ext2_xip_file_operations;
|
||||
|
||||
/* inode.c */
|
||||
extern struct address_space_operations ext2_aops;
|
||||
|
@ -39,7 +39,7 @@ static int ext2_release_file (struct inode * inode, struct file * filp)
|
||||
* 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,
|
||||
@ -56,7 +56,7 @@ struct file_operations ext2_file_operations = {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EXT2_FS_XIP
|
||||
struct file_operations ext2_xip_file_operations = {
|
||||
const struct file_operations ext2_xip_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = xip_file_read,
|
||||
.write = xip_file_write,
|
||||
|
@ -39,7 +39,7 @@ static int ext3_dx_readdir(struct file * filp,
|
||||
static int ext3_release_dir (struct inode * inode,
|
||||
struct file * filp);
|
||||
|
||||
struct file_operations ext3_dir_operations = {
|
||||
const struct file_operations ext3_dir_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = ext3_readdir, /* we take BKL. needed?*/
|
||||
|
@ -105,7 +105,7 @@ ext3_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct file_operations ext3_file_operations = {
|
||||
const struct file_operations ext3_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
|
@ -741,7 +741,7 @@ static int fat_dir_ioctl(struct inode * inode, struct file * filp,
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct file_operations fat_dir_operations = {
|
||||
const struct file_operations fat_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = fat_readdir,
|
||||
.ioctl = fat_dir_ioctl,
|
||||
|
@ -112,7 +112,7 @@ int fat_generic_ioctl(struct inode *inode, struct file *filp,
|
||||
}
|
||||
}
|
||||
|
||||
struct file_operations fat_file_operations = {
|
||||
const struct file_operations fat_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
|
@ -145,6 +145,6 @@ static int fifo_open(struct inode *inode, struct file *filp)
|
||||
* 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 */
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ extern void vxfs_clear_inode(struct inode *);
|
||||
|
||||
/* vxfs_lookup.c */
|
||||
extern struct inode_operations vxfs_dir_inode_ops;
|
||||
extern struct file_operations vxfs_dir_operations;
|
||||
extern const struct file_operations vxfs_dir_operations;
|
||||
|
||||
/* vxfs_olt.c */
|
||||
extern int vxfs_read_olt(struct super_block *, u_long);
|
||||
|
@ -56,7 +56,7 @@ 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,
|
||||
};
|
||||
|
||||
|
@ -922,7 +922,7 @@ static int fuse_dev_release(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations fuse_dev_operations = {
|
||||
const struct file_operations fuse_dev_operations = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = no_llseek,
|
||||
.read = fuse_dev_read,
|
||||
|
@ -1170,7 +1170,7 @@ static struct inode_operations fuse_dir_inode_operations = {
|
||||
.removexattr = fuse_removexattr,
|
||||
};
|
||||
|
||||
static struct file_operations fuse_dir_operations = {
|
||||
static const struct file_operations fuse_dir_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = fuse_readdir,
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static struct file_operations fuse_direct_io_file_operations;
|
||||
static const struct file_operations fuse_direct_io_file_operations;
|
||||
|
||||
static int fuse_send_open(struct inode *inode, struct file *file, int isdir,
|
||||
struct fuse_open_out *outargp)
|
||||
@ -611,7 +611,7 @@ static int fuse_set_page_dirty(struct page *page)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct file_operations fuse_file_operations = {
|
||||
static const struct file_operations fuse_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_file_read,
|
||||
.write = generic_file_write,
|
||||
@ -623,7 +623,7 @@ static struct file_operations fuse_file_operations = {
|
||||
.sendfile = generic_file_sendfile,
|
||||
};
|
||||
|
||||
static struct file_operations fuse_direct_io_file_operations = {
|
||||
static const struct file_operations fuse_direct_io_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = fuse_direct_read,
|
||||
.write = fuse_direct_write,
|
||||
|
@ -346,7 +346,7 @@ static inline u64 get_node_id(struct inode *inode)
|
||||
}
|
||||
|
||||
/** Device operations */
|
||||
extern struct file_operations fuse_dev_operations;
|
||||
extern const struct file_operations fuse_dev_operations;
|
||||
|
||||
/**
|
||||
* This is the single global spinlock which protects FUSE's structures
|
||||
|
@ -313,7 +313,7 @@ static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
return res;
|
||||
}
|
||||
|
||||
struct file_operations hfs_dir_operations = {
|
||||
const struct file_operations hfs_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = hfs_readdir,
|
||||
.llseek = generic_file_llseek,
|
||||
|
@ -169,7 +169,7 @@ extern int hfs_cat_move(u32, struct inode *, struct qstr *,
|
||||
extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, struct qstr *);
|
||||
|
||||
/* dir.c */
|
||||
extern struct file_operations hfs_dir_operations;
|
||||
extern const struct file_operations hfs_dir_operations;
|
||||
extern struct inode_operations hfs_dir_inode_operations;
|
||||
|
||||
/* extent.c */
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "hfs_fs.h"
|
||||
#include "btree.h"
|
||||
|
||||
static struct file_operations hfs_file_operations;
|
||||
static const struct file_operations hfs_file_operations;
|
||||
static struct inode_operations hfs_file_inode_operations;
|
||||
|
||||
/*================ Variable-like macros ================*/
|
||||
@ -601,7 +601,7 @@ int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr)
|
||||
}
|
||||
|
||||
|
||||
static struct file_operations hfs_file_operations = {
|
||||
static const struct file_operations hfs_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_file_read,
|
||||
.write = generic_file_write,
|
||||
|
@ -483,7 +483,7 @@ struct inode_operations hfsplus_dir_inode_operations = {
|
||||
.rename = hfsplus_rename,
|
||||
};
|
||||
|
||||
struct file_operations hfsplus_dir_operations = {
|
||||
const struct file_operations hfsplus_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = hfsplus_readdir,
|
||||
.ioctl = hfsplus_ioctl,
|
||||
|
@ -280,7 +280,7 @@ static struct inode_operations hfsplus_file_inode_operations = {
|
||||
.listxattr = hfsplus_listxattr,
|
||||
};
|
||||
|
||||
static struct file_operations hfsplus_file_operations = {
|
||||
static const struct file_operations hfsplus_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_file_read,
|
||||
.write = generic_file_write,
|
||||
|
@ -384,7 +384,7 @@ int hostfs_fsync(struct file *file, struct dentry *dentry, int datasync)
|
||||
return fsync_file(HOSTFS_I(dentry->d_inode)->fd, datasync);
|
||||
}
|
||||
|
||||
static struct file_operations hostfs_file_fops = {
|
||||
static const struct file_operations hostfs_file_fops = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_file_read,
|
||||
.sendfile = generic_file_sendfile,
|
||||
@ -399,7 +399,7 @@ static struct file_operations hostfs_file_fops = {
|
||||
.fsync = hostfs_fsync,
|
||||
};
|
||||
|
||||
static struct file_operations hostfs_dir_fops = {
|
||||
static const struct file_operations hostfs_dir_fops = {
|
||||
.llseek = generic_file_llseek,
|
||||
.readdir = hostfs_readdir,
|
||||
.read = generic_read_dir,
|
||||
|
@ -310,7 +310,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
struct file_operations hpfs_dir_ops =
|
||||
const struct file_operations hpfs_dir_ops =
|
||||
{
|
||||
.llseek = hpfs_dir_lseek,
|
||||
.read = generic_read_dir,
|
||||
|
@ -119,7 +119,7 @@ static ssize_t hpfs_file_write(struct file *file, const char __user *buf,
|
||||
return retval;
|
||||
}
|
||||
|
||||
struct file_operations hpfs_file_ops =
|
||||
const struct file_operations hpfs_file_ops =
|
||||
{
|
||||
.llseek = generic_file_llseek,
|
||||
.read = generic_file_read,
|
||||
|
@ -240,7 +240,7 @@ void hpfs_set_dentry_operations(struct dentry *);
|
||||
/* dir.c */
|
||||
|
||||
struct dentry *hpfs_lookup(struct inode *, struct dentry *, struct nameidata *);
|
||||
extern struct file_operations hpfs_dir_ops;
|
||||
extern const struct file_operations hpfs_dir_ops;
|
||||
|
||||
/* dnode.c */
|
||||
|
||||
@ -266,7 +266,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, char *, char *, int);
|
||||
/* file.c */
|
||||
|
||||
int hpfs_file_fsync(struct file *, struct dentry *, int);
|
||||
extern struct file_operations hpfs_file_ops;
|
||||
extern const struct file_operations hpfs_file_ops;
|
||||
extern struct inode_operations hpfs_file_iops;
|
||||
extern struct address_space_operations hpfs_aops;
|
||||
|
||||
|
@ -558,7 +558,7 @@ static loff_t hppfs_llseek(struct file *file, loff_t off, int where)
|
||||
return(default_llseek(file, off, where));
|
||||
}
|
||||
|
||||
static struct file_operations hppfs_file_fops = {
|
||||
static const struct file_operations hppfs_file_fops = {
|
||||
.owner = NULL,
|
||||
.llseek = hppfs_llseek,
|
||||
.read = hppfs_read,
|
||||
@ -609,7 +609,7 @@ static int hppfs_fsync(struct file *file, struct dentry *dentry, int datasync)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static struct file_operations hppfs_dir_fops = {
|
||||
static const struct file_operations hppfs_dir_fops = {
|
||||
.owner = NULL,
|
||||
.readdir = hppfs_readdir,
|
||||
.open = hppfs_dir_open,
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
static struct super_operations hugetlbfs_ops;
|
||||
static struct address_space_operations hugetlbfs_aops;
|
||||
struct file_operations hugetlbfs_file_operations;
|
||||
const struct file_operations hugetlbfs_file_operations;
|
||||
static struct inode_operations hugetlbfs_dir_inode_operations;
|
||||
static struct inode_operations hugetlbfs_inode_operations;
|
||||
|
||||
@ -566,7 +566,7 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
|
||||
inode_init_once(&ei->vfs_inode);
|
||||
}
|
||||
|
||||
struct file_operations hugetlbfs_file_operations = {
|
||||
const struct file_operations hugetlbfs_file_operations = {
|
||||
.mmap = hugetlbfs_file_mmap,
|
||||
.fsync = simple_sync_file,
|
||||
.get_unmapped_area = hugetlb_get_unmapped_area,
|
||||
|
@ -920,7 +920,7 @@ static long inotify_ioctl(struct file *file, unsigned int cmd,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct file_operations inotify_fops = {
|
||||
static const struct file_operations inotify_fops = {
|
||||
.poll = inotify_poll,
|
||||
.read = inotify_read,
|
||||
.release = inotify_release,
|
||||
|
@ -16,7 +16,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,
|
||||
|
@ -175,6 +175,6 @@ isofs_normalize_block_and_offset(struct iso_directory_record* de,
|
||||
}
|
||||
|
||||
extern struct inode_operations isofs_dir_inode_operations;
|
||||
extern struct file_operations isofs_dir_operations;
|
||||
extern const struct file_operations isofs_dir_operations;
|
||||
extern struct address_space_operations isofs_symlink_aops;
|
||||
extern struct export_operations isofs_export_ops;
|
||||
|
@ -55,9 +55,9 @@
|
||||
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 const struct file_operations jffs_file_operations;
|
||||
static struct inode_operations jffs_file_inode_operations;
|
||||
static struct file_operations jffs_dir_operations;
|
||||
static const struct file_operations jffs_dir_operations;
|
||||
static struct inode_operations jffs_dir_inode_operations;
|
||||
static struct address_space_operations jffs_address_operations;
|
||||
|
||||
@ -1629,7 +1629,7 @@ static int jffs_fsync(struct file *f, struct dentry *d, int datasync)
|
||||
}
|
||||
|
||||
|
||||
static struct file_operations jffs_file_operations =
|
||||
static const struct file_operations jffs_file_operations =
|
||||
{
|
||||
.open = generic_file_open,
|
||||
.llseek = generic_file_llseek,
|
||||
@ -1649,7 +1649,7 @@ static struct inode_operations jffs_file_inode_operations =
|
||||
};
|
||||
|
||||
|
||||
static struct file_operations jffs_dir_operations =
|
||||
static const struct file_operations jffs_dir_operations =
|
||||
{
|
||||
.readdir = jffs_readdir,
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t);
|
||||
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,
|
||||
|
@ -38,7 +38,7 @@ int jffs2_fsync(struct file *filp, struct dentry *dentry, int datasync)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations jffs2_file_operations =
|
||||
const struct file_operations jffs2_file_operations =
|
||||
{
|
||||
.llseek = generic_file_llseek,
|
||||
.open = generic_file_open,
|
||||
|
@ -159,11 +159,11 @@ void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c);
|
||||
void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c);
|
||||
|
||||
/* dir.c */
|
||||
extern struct file_operations jffs2_dir_operations;
|
||||
extern const struct file_operations jffs2_dir_operations;
|
||||
extern struct inode_operations jffs2_dir_inode_operations;
|
||||
|
||||
/* file.c */
|
||||
extern struct file_operations jffs2_file_operations;
|
||||
extern const struct file_operations jffs2_file_operations;
|
||||
extern struct inode_operations jffs2_file_inode_operations;
|
||||
extern struct address_space_operations jffs2_file_address_operations;
|
||||
int jffs2_fsync(struct file *, struct dentry *, int);
|
||||
|
@ -100,7 +100,7 @@ struct inode_operations jfs_file_inode_operations = {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct file_operations jfs_file_operations = {
|
||||
const struct file_operations jfs_file_operations = {
|
||||
.open = jfs_open,
|
||||
.llseek = generic_file_llseek,
|
||||
.write = generic_file_write,
|
||||
|
@ -35,9 +35,9 @@ extern void jfs_set_inode_flags(struct inode *);
|
||||
|
||||
extern struct address_space_operations jfs_aops;
|
||||
extern struct inode_operations jfs_dir_inode_operations;
|
||||
extern struct file_operations jfs_dir_operations;
|
||||
extern const struct file_operations jfs_dir_operations;
|
||||
extern struct inode_operations jfs_file_inode_operations;
|
||||
extern struct file_operations jfs_file_operations;
|
||||
extern const struct file_operations jfs_file_operations;
|
||||
extern struct inode_operations jfs_symlink_inode_operations;
|
||||
extern struct dentry_operations jfs_ci_dentry_operations;
|
||||
#endif /* _H_JFS_INODE */
|
||||
|
@ -1519,7 +1519,7 @@ struct inode_operations jfs_dir_inode_operations = {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct file_operations jfs_dir_operations = {
|
||||
const struct file_operations jfs_dir_operations = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = jfs_readdir,
|
||||
.fsync = jfs_fsync,
|
||||
|
@ -179,7 +179,7 @@ ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t
|
||||
return -EISDIR;
|
||||
}
|
||||
|
||||
struct file_operations simple_dir_operations = {
|
||||
const struct file_operations simple_dir_operations = {
|
||||
.open = dcache_dir_open,
|
||||
.release = dcache_dir_close,
|
||||
.llseek = dcache_dir_lseek,
|
||||
|
@ -14,7 +14,7 @@ typedef struct minix_dir_entry minix_dirent;
|
||||
|
||||
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,
|
||||
|
@ -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,
|
||||
|
@ -81,8 +81,8 @@ 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 const struct file_operations minix_file_operations;
|
||||
extern const struct file_operations minix_dir_operations;
|
||||
extern struct dentry_operations minix_dentry_operations;
|
||||
|
||||
static inline struct minix_sb_info *minix_sb(struct super_block *sb)
|
||||
|
@ -49,7 +49,7 @@ extern int ncp_symlink(struct inode *, struct dentry *, const char *);
|
||||
#define ncp_symlink NULL
|
||||
#endif
|
||||
|
||||
struct file_operations ncp_dir_operations =
|
||||
const struct file_operations ncp_dir_operations =
|
||||
{
|
||||
.read = generic_read_dir,
|
||||
.readdir = ncp_readdir,
|
||||
|
@ -283,7 +283,7 @@ static int ncp_release(struct inode *inode, struct file *file) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations ncp_file_operations =
|
||||
const struct file_operations ncp_file_operations =
|
||||
{
|
||||
.llseek = remote_llseek,
|
||||
.read = ncp_file_read,
|
||||
|
@ -54,7 +54,7 @@ static int nfs_rename(struct inode *, struct dentry *,
|
||||
static int nfs_fsync_dir(struct file *, struct dentry *, int);
|
||||
static loff_t nfs_llseek_dir(struct file *, loff_t, int);
|
||||
|
||||
struct file_operations nfs_dir_operations = {
|
||||
const struct file_operations nfs_dir_operations = {
|
||||
.llseek = nfs_llseek_dir,
|
||||
.read = generic_read_dir,
|
||||
.readdir = nfs_readdir,
|
||||
|
@ -49,7 +49,7 @@ static int nfs_check_flags(int flags);
|
||||
static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl);
|
||||
static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
|
||||
|
||||
struct file_operations nfs_file_operations = {
|
||||
const struct file_operations nfs_file_operations = {
|
||||
.llseek = nfs_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
|
@ -134,7 +134,7 @@ static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size
|
||||
return simple_transaction_read(file, buf, size, pos);
|
||||
}
|
||||
|
||||
static struct file_operations transaction_ops = {
|
||||
static const struct file_operations transaction_ops = {
|
||||
.write = nfsctl_transaction_write,
|
||||
.read = nfsctl_transaction_read,
|
||||
.release = simple_transaction_release,
|
||||
@ -146,7 +146,7 @@ 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,
|
||||
|
@ -80,7 +80,7 @@ static int nfsd_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, nfsd_proc_show, NULL);
|
||||
}
|
||||
|
||||
static struct file_operations nfsd_proc_fops = {
|
||||
static const struct file_operations nfsd_proc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = nfsd_proc_open,
|
||||
.read = seq_read,
|
||||
|
@ -1553,7 +1553,7 @@ static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry,
|
||||
|
||||
#endif /* NTFS_RW */
|
||||
|
||||
struct file_operations ntfs_dir_ops = {
|
||||
const struct file_operations ntfs_dir_ops = {
|
||||
.llseek = generic_file_llseek, /* Seek inside directory. */
|
||||
.read = generic_read_dir, /* Return -EISDIR. */
|
||||
.readdir = ntfs_readdir, /* Read directory contents. */
|
||||
|
@ -2294,7 +2294,7 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry,
|
||||
|
||||
#endif /* NTFS_RW */
|
||||
|
||||
struct file_operations ntfs_file_ops = {
|
||||
const struct file_operations ntfs_file_ops = {
|
||||
.llseek = generic_file_llseek, /* Seek inside file. */
|
||||
.read = generic_file_read, /* Read from file. */
|
||||
.aio_read = generic_file_aio_read, /* Async read from file. */
|
||||
@ -2337,6 +2337,6 @@ struct inode_operations ntfs_file_inode_ops = {
|
||||
#endif /* NTFS_RW */
|
||||
};
|
||||
|
||||
struct file_operations ntfs_empty_file_ops = {};
|
||||
const struct file_operations ntfs_empty_file_ops = {};
|
||||
|
||||
struct inode_operations ntfs_empty_inode_ops = {};
|
||||
|
@ -60,13 +60,13 @@ extern struct kmem_cache *ntfs_index_ctx_cache;
|
||||
extern struct address_space_operations ntfs_aops;
|
||||
extern struct address_space_operations ntfs_mst_aops;
|
||||
|
||||
extern struct file_operations ntfs_file_ops;
|
||||
extern const struct file_operations ntfs_file_ops;
|
||||
extern struct inode_operations ntfs_file_inode_ops;
|
||||
|
||||
extern struct file_operations ntfs_dir_ops;
|
||||
extern const struct file_operations ntfs_dir_ops;
|
||||
extern struct inode_operations ntfs_dir_inode_ops;
|
||||
|
||||
extern struct file_operations ntfs_empty_file_ops;
|
||||
extern const struct file_operations ntfs_empty_file_ops;
|
||||
extern struct inode_operations ntfs_empty_inode_ops;
|
||||
|
||||
extern struct export_operations ntfs_export_ops;
|
||||
|
@ -2017,7 +2017,7 @@ static int ocfs2_dlm_debug_open(struct inode *inode, struct file *file)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct file_operations ocfs2_dlm_debug_fops = {
|
||||
static const struct file_operations ocfs2_dlm_debug_fops = {
|
||||
.open = ocfs2_dlm_debug_open,
|
||||
.release = ocfs2_dlm_debug_release,
|
||||
.read = seq_read,
|
||||
|
@ -1176,7 +1176,7 @@ struct inode_operations ocfs2_special_file_iops = {
|
||||
.getattr = ocfs2_getattr,
|
||||
};
|
||||
|
||||
struct file_operations ocfs2_fops = {
|
||||
const struct file_operations ocfs2_fops = {
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.sendfile = generic_file_sendfile,
|
||||
@ -1188,7 +1188,7 @@ struct file_operations ocfs2_fops = {
|
||||
.aio_write = ocfs2_file_aio_write,
|
||||
};
|
||||
|
||||
struct file_operations ocfs2_dops = {
|
||||
const struct file_operations ocfs2_dops = {
|
||||
.read = generic_read_dir,
|
||||
.readdir = ocfs2_readdir,
|
||||
.fsync = ocfs2_sync_file,
|
||||
|
@ -26,8 +26,8 @@
|
||||
#ifndef OCFS2_FILE_H
|
||||
#define OCFS2_FILE_H
|
||||
|
||||
extern struct file_operations ocfs2_fops;
|
||||
extern struct file_operations ocfs2_dops;
|
||||
extern const struct file_operations ocfs2_fops;
|
||||
extern const struct file_operations ocfs2_dops;
|
||||
extern struct inode_operations ocfs2_file_iops;
|
||||
extern struct inode_operations ocfs2_special_file_iops;
|
||||
struct ocfs2_alloc_context;
|
||||
|
@ -581,17 +581,17 @@ int property_release (struct inode *inode, struct file *filp)
|
||||
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,
|
||||
};
|
||||
|
@ -568,7 +568,7 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
|
||||
* 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,
|
||||
.readv = pipe_readv,
|
||||
@ -580,7 +580,7 @@ struct file_operations read_fifo_fops = {
|
||||
.fasync = pipe_read_fasync,
|
||||
};
|
||||
|
||||
struct file_operations write_fifo_fops = {
|
||||
const struct file_operations write_fifo_fops = {
|
||||
.llseek = no_llseek,
|
||||
.read = bad_pipe_r,
|
||||
.write = pipe_write,
|
||||
@ -592,7 +592,7 @@ struct file_operations write_fifo_fops = {
|
||||
.fasync = pipe_write_fasync,
|
||||
};
|
||||
|
||||
struct file_operations rdwr_fifo_fops = {
|
||||
const struct file_operations rdwr_fifo_fops = {
|
||||
.llseek = no_llseek,
|
||||
.read = pipe_read,
|
||||
.readv = pipe_readv,
|
||||
|
@ -31,7 +31,7 @@ static int open_kcore(struct inode * inode, struct file * filp)
|
||||
|
||||
static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
|
||||
|
||||
struct file_operations proc_kcore_operations = {
|
||||
const struct file_operations proc_kcore_operations = {
|
||||
.read = read_kcore,
|
||||
.open = open_kcore,
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ static unsigned int kmsg_poll(struct file *file, poll_table *wait)
|
||||
}
|
||||
|
||||
|
||||
struct file_operations proc_kmsg_operations = {
|
||||
const struct file_operations proc_kmsg_operations = {
|
||||
.read = kmsg_read,
|
||||
.poll = kmsg_poll,
|
||||
.open = kmsg_open,
|
||||
|
@ -172,7 +172,7 @@ static int open_vmcore(struct inode *inode, struct file *filp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations proc_vmcore_operations = {
|
||||
const struct file_operations proc_vmcore_operations = {
|
||||
.read = read_vmcore,
|
||||
.open = open_vmcore,
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct file_operations qnx4_dir_operations =
|
||||
const struct file_operations qnx4_dir_operations =
|
||||
{
|
||||
.read = generic_read_dir,
|
||||
.readdir = qnx4_readdir,
|
||||
|
@ -19,7 +19,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,
|
||||
|
@ -32,7 +32,7 @@ struct address_space_operations ramfs_aops = {
|
||||
.commit_write = simple_commit_write
|
||||
};
|
||||
|
||||
struct file_operations ramfs_file_operations = {
|
||||
const struct file_operations ramfs_file_operations = {
|
||||
.read = generic_file_read,
|
||||
.write = generic_file_write,
|
||||
.mmap = generic_file_mmap,
|
||||
|
@ -33,7 +33,7 @@ struct address_space_operations ramfs_aops = {
|
||||
.commit_write = simple_commit_write
|
||||
};
|
||||
|
||||
struct file_operations ramfs_file_operations = {
|
||||
const struct file_operations ramfs_file_operations = {
|
||||
.mmap = ramfs_nommu_mmap,
|
||||
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
|
||||
.read = generic_file_read,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user