diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (patch) | |
tree | e1a9804a8af427f700aaba4b386cf8679b317e83 /fs/reiserfs | |
parent | 92e1d5be91a0e3ffa5c4697eeb09b2aa22792122 (diff) |
[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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/file.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 5109f1d5e7ff..abfada2f52db 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -1556,7 +1556,7 @@ const struct file_operations reiserfs_file_operations = { | |||
1556 | .splice_write = generic_file_splice_write, | 1556 | .splice_write = generic_file_splice_write, |
1557 | }; | 1557 | }; |
1558 | 1558 | ||
1559 | struct inode_operations reiserfs_file_inode_operations = { | 1559 | const struct inode_operations reiserfs_file_inode_operations = { |
1560 | .truncate = reiserfs_vfs_truncate_file, | 1560 | .truncate = reiserfs_vfs_truncate_file, |
1561 | .setattr = reiserfs_setattr, | 1561 | .setattr = reiserfs_setattr, |
1562 | .setxattr = reiserfs_setxattr, | 1562 | .setxattr = reiserfs_setxattr, |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 23f5cd5bbf56..a2161840bc7c 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -1525,7 +1525,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1525 | /* | 1525 | /* |
1526 | * directories can handle most operations... | 1526 | * directories can handle most operations... |
1527 | */ | 1527 | */ |
1528 | struct inode_operations reiserfs_dir_inode_operations = { | 1528 | const struct inode_operations reiserfs_dir_inode_operations = { |
1529 | //&reiserfs_dir_operations, /* default_file_ops */ | 1529 | //&reiserfs_dir_operations, /* default_file_ops */ |
1530 | .create = reiserfs_create, | 1530 | .create = reiserfs_create, |
1531 | .lookup = reiserfs_lookup, | 1531 | .lookup = reiserfs_lookup, |
@@ -1548,7 +1548,7 @@ struct inode_operations reiserfs_dir_inode_operations = { | |||
1548 | * symlink operations.. same as page_symlink_inode_operations, with xattr | 1548 | * symlink operations.. same as page_symlink_inode_operations, with xattr |
1549 | * stuff added | 1549 | * stuff added |
1550 | */ | 1550 | */ |
1551 | struct inode_operations reiserfs_symlink_inode_operations = { | 1551 | const struct inode_operations reiserfs_symlink_inode_operations = { |
1552 | .readlink = generic_readlink, | 1552 | .readlink = generic_readlink, |
1553 | .follow_link = page_follow_link_light, | 1553 | .follow_link = page_follow_link_light, |
1554 | .put_link = page_put_link, | 1554 | .put_link = page_put_link, |
@@ -1564,7 +1564,7 @@ struct inode_operations reiserfs_symlink_inode_operations = { | |||
1564 | /* | 1564 | /* |
1565 | * special file operations.. just xattr/acl stuff | 1565 | * special file operations.. just xattr/acl stuff |
1566 | */ | 1566 | */ |
1567 | struct inode_operations reiserfs_special_inode_operations = { | 1567 | const struct inode_operations reiserfs_special_inode_operations = { |
1568 | .setattr = reiserfs_setattr, | 1568 | .setattr = reiserfs_setattr, |
1569 | .setxattr = reiserfs_setxattr, | 1569 | .setxattr = reiserfs_setxattr, |
1570 | .getxattr = reiserfs_getxattr, | 1570 | .getxattr = reiserfs_getxattr, |