mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
[PATCH] mark struct inode_operations const 3
Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
92e1d5be91
commit
c5ef1c42c5
48 changed files with 103 additions and 103 deletions
|
@ -551,7 +551,7 @@ struct inode {
|
|||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
struct mutex i_mutex;
|
||||
struct rw_semaphore i_alloc_sem;
|
||||
struct inode_operations *i_op;
|
||||
const struct inode_operations *i_op;
|
||||
const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
|
||||
struct super_block *i_sb;
|
||||
struct file_lock *i_flock;
|
||||
|
@ -1828,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *);
|
|||
extern int __page_symlink(struct inode *inode, const char *symname, int len,
|
||||
gfp_t gfp_mask);
|
||||
extern int page_symlink(struct inode *inode, const char *symname, int len);
|
||||
extern struct inode_operations page_symlink_inode_operations;
|
||||
extern const struct inode_operations page_symlink_inode_operations;
|
||||
extern int generic_readlink(struct dentry *, char __user *, int);
|
||||
extern void generic_fillattr(struct inode *, struct kstat *);
|
||||
extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
|
||||
|
@ -1873,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page,
|
|||
extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
|
||||
extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
|
||||
extern const struct file_operations simple_dir_operations;
|
||||
extern struct inode_operations simple_dir_inode_operations;
|
||||
extern const struct inode_operations simple_dir_inode_operations;
|
||||
struct tree_descr { char *name; const struct file_operations *ops; int mode; };
|
||||
struct dentry *d_alloc_name(struct dentry *, const char *);
|
||||
extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue