diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fs.h | 4 | ||||
-rw-r--r-- | include/linux/swap.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9d77309da153..38356ab827c9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -638,6 +638,10 @@ struct address_space_operations { | |||
638 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | 638 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, |
639 | unsigned long); | 639 | unsigned long); |
640 | int (*error_remove_page)(struct address_space *, struct page *); | 640 | int (*error_remove_page)(struct address_space *, struct page *); |
641 | |||
642 | /* swapfile support */ | ||
643 | int (*swap_activate)(struct file *file); | ||
644 | int (*swap_deactivate)(struct file *file); | ||
641 | }; | 645 | }; |
642 | 646 | ||
643 | extern const struct address_space_operations empty_aops; | 647 | extern const struct address_space_operations empty_aops; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index e62425ded2ed..ab230b1ebf61 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -151,6 +151,7 @@ enum { | |||
151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | 151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ |
152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ | 152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ |
153 | SWP_BLKDEV = (1 << 6), /* its a block device */ | 153 | SWP_BLKDEV = (1 << 6), /* its a block device */ |
154 | SWP_FILE = (1 << 7), /* set after swap_activate success */ | ||
154 | /* add others here before... */ | 155 | /* add others here before... */ |
155 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | 156 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ |
156 | }; | 157 | }; |
@@ -320,6 +321,7 @@ static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | |||
320 | /* linux/mm/page_io.c */ | 321 | /* linux/mm/page_io.c */ |
321 | extern int swap_readpage(struct page *); | 322 | extern int swap_readpage(struct page *); |
322 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 323 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
324 | extern int swap_set_page_dirty(struct page *page); | ||
323 | extern void end_swap_bio_read(struct bio *bio, int err); | 325 | extern void end_swap_bio_read(struct bio *bio, int err); |
324 | 326 | ||
325 | /* linux/mm/swap_state.c */ | 327 | /* linux/mm/swap_state.c */ |