aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r--fs/hugetlbfs/inode.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 4f4cd132b571..8c718a3d413f 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -33,11 +33,11 @@
33/* some random number */ 33/* some random number */
34#define HUGETLBFS_MAGIC 0x958458f6 34#define HUGETLBFS_MAGIC 0x958458f6
35 35
36static struct super_operations hugetlbfs_ops; 36static const struct super_operations hugetlbfs_ops;
37static const struct address_space_operations hugetlbfs_aops; 37static const struct address_space_operations hugetlbfs_aops;
38const struct file_operations hugetlbfs_file_operations; 38const struct file_operations hugetlbfs_file_operations;
39static struct inode_operations hugetlbfs_dir_inode_operations; 39static const struct inode_operations hugetlbfs_dir_inode_operations;
40static struct inode_operations hugetlbfs_inode_operations; 40static const struct inode_operations hugetlbfs_inode_operations;
41 41
42static struct backing_dev_info hugetlbfs_backing_dev_info = { 42static struct backing_dev_info hugetlbfs_backing_dev_info = {
43 .ra_pages = 0, /* No readahead */ 43 .ra_pages = 0, /* No readahead */
@@ -449,10 +449,13 @@ static int hugetlbfs_symlink(struct inode *dir,
449} 449}
450 450
451/* 451/*
452 * For direct-IO reads into hugetlb pages 452 * mark the head page dirty
453 */ 453 */
454static int hugetlbfs_set_page_dirty(struct page *page) 454static int hugetlbfs_set_page_dirty(struct page *page)
455{ 455{
456 struct page *head = (struct page *)page_private(page);
457
458 SetPageDirty(head);
456 return 0; 459 return 0;
457} 460}
458 461
@@ -560,7 +563,7 @@ const struct file_operations hugetlbfs_file_operations = {
560 .get_unmapped_area = hugetlb_get_unmapped_area, 563 .get_unmapped_area = hugetlb_get_unmapped_area,
561}; 564};
562 565
563static struct inode_operations hugetlbfs_dir_inode_operations = { 566static const struct inode_operations hugetlbfs_dir_inode_operations = {
564 .create = hugetlbfs_create, 567 .create = hugetlbfs_create,
565 .lookup = simple_lookup, 568 .lookup = simple_lookup,
566 .link = simple_link, 569 .link = simple_link,
@@ -573,11 +576,11 @@ static struct inode_operations hugetlbfs_dir_inode_operations = {
573 .setattr = hugetlbfs_setattr, 576 .setattr = hugetlbfs_setattr,
574}; 577};
575 578
576static struct inode_operations hugetlbfs_inode_operations = { 579static const struct inode_operations hugetlbfs_inode_operations = {
577 .setattr = hugetlbfs_setattr, 580 .setattr = hugetlbfs_setattr,
578}; 581};
579 582
580static struct super_operations hugetlbfs_ops = { 583static const struct super_operations hugetlbfs_ops = {
581 .alloc_inode = hugetlbfs_alloc_inode, 584 .alloc_inode = hugetlbfs_alloc_inode,
582 .destroy_inode = hugetlbfs_destroy_inode, 585 .destroy_inode = hugetlbfs_destroy_inode,
583 .statfs = hugetlbfs_statfs, 586 .statfs = hugetlbfs_statfs,