diff options
Diffstat (limited to 'include/linux/pagemap.h')
| -rw-r--r-- | include/linux/pagemap.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 01ca0856caf..34da5230faa 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -18,9 +18,14 @@ | |||
| 18 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page | 18 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page |
| 19 | * allocation mode flags. | 19 | * allocation mode flags. |
| 20 | */ | 20 | */ |
| 21 | #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ | 21 | enum mapping_flags { |
| 22 | #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ | 22 | AS_EIO = __GFP_BITS_SHIFT + 0, /* IO error on async write */ |
| 23 | #define AS_MM_ALL_LOCKS (__GFP_BITS_SHIFT + 2) /* under mm_take_all_locks() */ | 23 | AS_ENOSPC = __GFP_BITS_SHIFT + 1, /* ENOSPC on async write */ |
| 24 | AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */ | ||
| 25 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
| 26 | AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */ | ||
| 27 | #endif | ||
| 28 | }; | ||
| 24 | 29 | ||
| 25 | static inline void mapping_set_error(struct address_space *mapping, int error) | 30 | static inline void mapping_set_error(struct address_space *mapping, int error) |
| 26 | { | 31 | { |
| @@ -33,7 +38,6 @@ static inline void mapping_set_error(struct address_space *mapping, int error) | |||
| 33 | } | 38 | } |
| 34 | 39 | ||
| 35 | #ifdef CONFIG_UNEVICTABLE_LRU | 40 | #ifdef CONFIG_UNEVICTABLE_LRU |
| 36 | #define AS_UNEVICTABLE (__GFP_BITS_SHIFT + 2) /* e.g., ramdisk, SHM_LOCK */ | ||
| 37 | 41 | ||
| 38 | static inline void mapping_set_unevictable(struct address_space *mapping) | 42 | static inline void mapping_set_unevictable(struct address_space *mapping) |
| 39 | { | 43 | { |
| @@ -380,6 +384,11 @@ static inline void wait_on_page_writeback(struct page *page) | |||
| 380 | extern void end_page_writeback(struct page *page); | 384 | extern void end_page_writeback(struct page *page); |
| 381 | 385 | ||
| 382 | /* | 386 | /* |
| 387 | * Add an arbitrary waiter to a page's wait queue | ||
| 388 | */ | ||
| 389 | extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter); | ||
| 390 | |||
| 391 | /* | ||
| 383 | * Fault a userspace page into pagetables. Return non-zero on a fault. | 392 | * Fault a userspace page into pagetables. Return non-zero on a fault. |
| 384 | * | 393 | * |
| 385 | * This assumes that two userspace pages are always sufficient. That's | 394 | * This assumes that two userspace pages are always sufficient. That's |
