diff options
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r-- | fs/hugetlbfs/inode.c | 17 |
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 | ||
36 | static struct super_operations hugetlbfs_ops; | 36 | static const struct super_operations hugetlbfs_ops; |
37 | static const struct address_space_operations hugetlbfs_aops; | 37 | static const struct address_space_operations hugetlbfs_aops; |
38 | const struct file_operations hugetlbfs_file_operations; | 38 | const struct file_operations hugetlbfs_file_operations; |
39 | static struct inode_operations hugetlbfs_dir_inode_operations; | 39 | static const struct inode_operations hugetlbfs_dir_inode_operations; |
40 | static struct inode_operations hugetlbfs_inode_operations; | 40 | static const struct inode_operations hugetlbfs_inode_operations; |
41 | 41 | ||
42 | static struct backing_dev_info hugetlbfs_backing_dev_info = { | 42 | static 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 | */ |
454 | static int hugetlbfs_set_page_dirty(struct page *page) | 454 | static 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 | ||
563 | static struct inode_operations hugetlbfs_dir_inode_operations = { | 566 | static 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 | ||
576 | static struct inode_operations hugetlbfs_inode_operations = { | 579 | static const struct inode_operations hugetlbfs_inode_operations = { |
577 | .setattr = hugetlbfs_setattr, | 580 | .setattr = hugetlbfs_setattr, |
578 | }; | 581 | }; |
579 | 582 | ||
580 | static struct super_operations hugetlbfs_ops = { | 583 | static 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, |