Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Macros for manipulating and testing page->flags |
| 3 | */ |
| 4 | |
| 5 | #ifndef PAGE_FLAGS_H |
| 6 | #define PAGE_FLAGS_H |
| 7 | |
Andrew Morton | f886ed4 | 2006-06-23 02:03:06 -0700 | [diff] [blame] | 8 | #include <linux/types.h> |
Christoph Lameter | 6d77795 | 2007-05-06 14:49:40 -0700 | [diff] [blame] | 9 | #include <linux/mm_types.h> |
Andrew Morton | f886ed4 | 2006-06-23 02:03:06 -0700 | [diff] [blame] | 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | /* |
| 12 | * Various page->flags bits: |
| 13 | * |
| 14 | * PG_reserved is set for special pages, which can never be swapped out. Some |
| 15 | * of them might not even exist (eg empty_bad_page)... |
| 16 | * |
Nick Piggin | da6052f | 2006-09-25 23:31:35 -0700 | [diff] [blame] | 17 | * The PG_private bitflag is set on pagecache pages if they contain filesystem |
| 18 | * specific data (which is normally at page->private). It can be used by |
| 19 | * private allocations for its own usage. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | * |
Nick Piggin | da6052f | 2006-09-25 23:31:35 -0700 | [diff] [blame] | 21 | * During initiation of disk I/O, PG_locked is set. This bit is set before I/O |
| 22 | * and cleared when writeback _starts_ or when read _completes_. PG_writeback |
| 23 | * is set before writeback starts and cleared when it finishes. |
| 24 | * |
| 25 | * PG_locked also pins a page in pagecache, and blocks truncation of the file |
| 26 | * while it is held. |
| 27 | * |
| 28 | * page_waitqueue(page) is a wait queue of all tasks waiting for the page |
| 29 | * to become unlocked. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | * |
| 31 | * PG_uptodate tells whether the page's contents is valid. When a read |
| 32 | * completes, the page becomes uptodate, unless a disk I/O error happened. |
| 33 | * |
Nick Piggin | da6052f | 2006-09-25 23:31:35 -0700 | [diff] [blame] | 34 | * PG_referenced, PG_reclaim are used for page reclaim for anonymous and |
| 35 | * file-backed pagecache (see mm/vmscan.c). |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | * |
| 37 | * PG_error is set to indicate that an I/O error occurred on this page. |
| 38 | * |
| 39 | * PG_arch_1 is an architecture specific page state bit. The generic code |
| 40 | * guarantees that this bit is cleared for a page when it first is entered into |
| 41 | * the page cache. |
| 42 | * |
| 43 | * PG_highmem pages are not permanently mapped into the kernel virtual address |
| 44 | * space, they need to be kmapped separately for doing IO on the pages. The |
| 45 | * struct page (these bits with information) are always mapped into kernel |
| 46 | * address space... |
Nick Piggin | da6052f | 2006-09-25 23:31:35 -0700 | [diff] [blame] | 47 | * |
| 48 | * PG_buddy is set to indicate that the page is free and in the buddy system |
| 49 | * (see mm/page_alloc.c). |
| 50 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | */ |
| 52 | |
| 53 | /* |
| 54 | * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break |
Andy Whitcroft | 91fc8ab | 2006-04-10 22:53:01 -0700 | [diff] [blame] | 55 | * locked- and dirty-page accounting. |
| 56 | * |
| 57 | * The page flags field is split into two parts, the main flags area |
| 58 | * which extends from the low bits upwards, and the fields area which |
| 59 | * extends from the high bits downwards. |
| 60 | * |
| 61 | * | FIELD | ... | FLAGS | |
| 62 | * N-1 ^ 0 |
| 63 | * (N-FLAGS_RESERVED) |
| 64 | * |
| 65 | * The fields area is reserved for fields mapping zone, node and SPARSEMEM |
| 66 | * section. The boundry between these two areas is defined by |
| 67 | * FLAGS_RESERVED which defines the width of the fields section |
| 68 | * (see linux/mmzone.h). New flags must _not_ overlap with this area. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | */ |
| 70 | #define PG_locked 0 /* Page is locked. Don't touch. */ |
| 71 | #define PG_error 1 |
| 72 | #define PG_referenced 2 |
| 73 | #define PG_uptodate 3 |
| 74 | |
| 75 | #define PG_dirty 4 |
| 76 | #define PG_lru 5 |
| 77 | #define PG_active 6 |
| 78 | #define PG_slab 7 /* slab debug (Suparna wants this) */ |
| 79 | |
Nick Piggin | 5409bae | 2007-02-28 20:12:27 -0800 | [diff] [blame] | 80 | #define PG_owner_priv_1 8 /* Owner use. If pagecache, fs may use*/ |
Badari Pulavarty | cbe37d0 | 2005-06-21 17:14:52 -0700 | [diff] [blame] | 81 | #define PG_arch_1 9 |
| 82 | #define PG_reserved 10 |
Nick Piggin | da6052f | 2006-09-25 23:31:35 -0700 | [diff] [blame] | 83 | #define PG_private 11 /* If pagecache, has fs-private data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | |
Badari Pulavarty | cbe37d0 | 2005-06-21 17:14:52 -0700 | [diff] [blame] | 85 | #define PG_writeback 12 /* Page is under writeback */ |
Badari Pulavarty | cbe37d0 | 2005-06-21 17:14:52 -0700 | [diff] [blame] | 86 | #define PG_compound 14 /* Part of a compound page */ |
| 87 | #define PG_swapcache 15 /* Swap page: swp_entry_t in private */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | |
Badari Pulavarty | cbe37d0 | 2005-06-21 17:14:52 -0700 | [diff] [blame] | 89 | #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ |
| 90 | #define PG_reclaim 17 /* To be reclaimed asap */ |
Nick Piggin | 676165a | 2006-04-10 11:21:48 +1000 | [diff] [blame] | 91 | #define PG_buddy 19 /* Page is free, on buddy lists */ |
| 92 | |
Fengguang Wu | fe3cba1 | 2007-07-19 01:48:07 -0700 | [diff] [blame] | 93 | /* PG_readahead is only used for file reads; PG_reclaim is only for writes */ |
| 94 | #define PG_readahead PG_reclaim /* Reminder to do async read-ahead */ |
| 95 | |
Nick Piggin | 5409bae | 2007-02-28 20:12:27 -0800 | [diff] [blame] | 96 | /* PG_owner_priv_1 users should have descriptive aliases */ |
| 97 | #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ |
Jeremy Fitzhardinge | c85b04c | 2007-07-17 18:37:05 -0700 | [diff] [blame] | 98 | #define PG_pinned PG_owner_priv_1 /* Xen pinned pagetable */ |
Andrew Morton | f886ed4 | 2006-06-23 02:03:06 -0700 | [diff] [blame] | 99 | |
| 100 | #if (BITS_PER_LONG > 32) |
| 101 | /* |
| 102 | * 64-bit-only flags build down from bit 31 |
| 103 | * |
| 104 | * 32 bit -------------------------------| FIELDS | FLAGS | |
| 105 | * 64 bit | FIELDS | ?????? FLAGS | |
| 106 | * 63 32 0 |
| 107 | */ |
| 108 | #define PG_uncached 31 /* Page has been mapped as uncached */ |
| 109 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | |
| 111 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | * Manipulation of page state flags |
| 113 | */ |
| 114 | #define PageLocked(page) \ |
| 115 | test_bit(PG_locked, &(page)->flags) |
| 116 | #define SetPageLocked(page) \ |
| 117 | set_bit(PG_locked, &(page)->flags) |
| 118 | #define TestSetPageLocked(page) \ |
| 119 | test_and_set_bit(PG_locked, &(page)->flags) |
| 120 | #define ClearPageLocked(page) \ |
| 121 | clear_bit(PG_locked, &(page)->flags) |
| 122 | #define TestClearPageLocked(page) \ |
| 123 | test_and_clear_bit(PG_locked, &(page)->flags) |
| 124 | |
| 125 | #define PageError(page) test_bit(PG_error, &(page)->flags) |
| 126 | #define SetPageError(page) set_bit(PG_error, &(page)->flags) |
| 127 | #define ClearPageError(page) clear_bit(PG_error, &(page)->flags) |
| 128 | |
| 129 | #define PageReferenced(page) test_bit(PG_referenced, &(page)->flags) |
| 130 | #define SetPageReferenced(page) set_bit(PG_referenced, &(page)->flags) |
| 131 | #define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags) |
| 132 | #define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) |
| 133 | |
Nick Piggin | 0ed361d | 2008-02-04 22:29:34 -0800 | [diff] [blame] | 134 | static inline int PageUptodate(struct page *page) |
| 135 | { |
| 136 | int ret = test_bit(PG_uptodate, &(page)->flags); |
| 137 | |
| 138 | /* |
| 139 | * Must ensure that the data we read out of the page is loaded |
| 140 | * _after_ we've loaded page->flags to check for PageUptodate. |
| 141 | * We can skip the barrier if the page is not uptodate, because |
| 142 | * we wouldn't be reading anything from it. |
| 143 | * |
| 144 | * See SetPageUptodate() for the other side of the story. |
| 145 | */ |
| 146 | if (ret) |
| 147 | smp_rmb(); |
| 148 | |
| 149 | return ret; |
| 150 | } |
| 151 | |
| 152 | static inline void __SetPageUptodate(struct page *page) |
| 153 | { |
| 154 | smp_wmb(); |
| 155 | __set_bit(PG_uptodate, &(page)->flags); |
Christoph Lameter | f6ac235 | 2006-06-30 01:55:32 -0700 | [diff] [blame] | 156 | #ifdef CONFIG_S390 |
Nick Piggin | 0ed361d | 2008-02-04 22:29:34 -0800 | [diff] [blame] | 157 | page_clear_dirty(page); |
| 158 | #endif |
| 159 | } |
| 160 | |
Heiko Carstens | 2dcea57 | 2006-09-29 01:58:41 -0700 | [diff] [blame] | 161 | static inline void SetPageUptodate(struct page *page) |
| 162 | { |
Nick Piggin | 0ed361d | 2008-02-04 22:29:34 -0800 | [diff] [blame] | 163 | #ifdef CONFIG_S390 |
Heiko Carstens | 2dcea57 | 2006-09-29 01:58:41 -0700 | [diff] [blame] | 164 | if (!test_and_set_bit(PG_uptodate, &page->flags)) |
Martin Schwidefsky | 6c21048 | 2007-04-27 16:01:57 +0200 | [diff] [blame] | 165 | page_clear_dirty(page); |
Christoph Lameter | f6ac235 | 2006-06-30 01:55:32 -0700 | [diff] [blame] | 166 | #else |
Nick Piggin | 0ed361d | 2008-02-04 22:29:34 -0800 | [diff] [blame] | 167 | /* |
| 168 | * Memory barrier must be issued before setting the PG_uptodate bit, |
| 169 | * so that all previous stores issued in order to bring the page |
| 170 | * uptodate are actually visible before PageUptodate becomes true. |
| 171 | * |
| 172 | * s390 doesn't need an explicit smp_wmb here because the test and |
| 173 | * set bit already provides full barriers. |
| 174 | */ |
| 175 | smp_wmb(); |
| 176 | set_bit(PG_uptodate, &(page)->flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | #endif |
Nick Piggin | 0ed361d | 2008-02-04 22:29:34 -0800 | [diff] [blame] | 178 | } |
| 179 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | #define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) |
| 181 | |
| 182 | #define PageDirty(page) test_bit(PG_dirty, &(page)->flags) |
| 183 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) |
| 184 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) |
| 185 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) |
Nick Piggin | 242e546 | 2005-09-03 15:54:50 -0700 | [diff] [blame] | 186 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) |
| 188 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | #define PageLRU(page) test_bit(PG_lru, &(page)->flags) |
Nick Piggin | 8d438f9 | 2006-03-22 00:07:59 -0800 | [diff] [blame] | 190 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) |
| 191 | #define ClearPageLRU(page) clear_bit(PG_lru, &(page)->flags) |
Nick Piggin | 6745391 | 2006-03-22 00:08:00 -0800 | [diff] [blame] | 192 | #define __ClearPageLRU(page) __clear_bit(PG_lru, &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | |
| 194 | #define PageActive(page) test_bit(PG_active, &(page)->flags) |
| 195 | #define SetPageActive(page) set_bit(PG_active, &(page)->flags) |
| 196 | #define ClearPageActive(page) clear_bit(PG_active, &(page)->flags) |
Nick Piggin | 6745391 | 2006-03-22 00:08:00 -0800 | [diff] [blame] | 197 | #define __ClearPageActive(page) __clear_bit(PG_active, &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | |
| 199 | #define PageSlab(page) test_bit(PG_slab, &(page)->flags) |
Nick Piggin | f205b2f | 2006-03-22 00:08:02 -0800 | [diff] [blame] | 200 | #define __SetPageSlab(page) __set_bit(PG_slab, &(page)->flags) |
| 201 | #define __ClearPageSlab(page) __clear_bit(PG_slab, &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | |
| 203 | #ifdef CONFIG_HIGHMEM |
Badari Pulavarty | cbe37d0 | 2005-06-21 17:14:52 -0700 | [diff] [blame] | 204 | #define PageHighMem(page) is_highmem(page_zone(page)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | #else |
| 206 | #define PageHighMem(page) 0 /* needed to optimize away at compile time */ |
| 207 | #endif |
| 208 | |
| 209 | #define PageChecked(page) test_bit(PG_checked, &(page)->flags) |
| 210 | #define SetPageChecked(page) set_bit(PG_checked, &(page)->flags) |
| 211 | #define ClearPageChecked(page) clear_bit(PG_checked, &(page)->flags) |
| 212 | |
Jeremy Fitzhardinge | c85b04c | 2007-07-17 18:37:05 -0700 | [diff] [blame] | 213 | #define PagePinned(page) test_bit(PG_pinned, &(page)->flags) |
| 214 | #define SetPagePinned(page) set_bit(PG_pinned, &(page)->flags) |
| 215 | #define ClearPagePinned(page) clear_bit(PG_pinned, &(page)->flags) |
| 216 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) |
| 218 | #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) |
| 219 | #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) |
| 220 | #define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) |
| 221 | |
| 222 | #define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) |
| 223 | #define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) |
| 224 | #define PagePrivate(page) test_bit(PG_private, &(page)->flags) |
| 225 | #define __SetPagePrivate(page) __set_bit(PG_private, &(page)->flags) |
| 226 | #define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags) |
| 227 | |
Andrew Morton | d688abf | 2007-07-19 01:49:17 -0700 | [diff] [blame] | 228 | /* |
| 229 | * Only test-and-set exist for PG_writeback. The unconditional operators are |
| 230 | * risky: they bypass page accounting. |
| 231 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | #define PageWriteback(page) test_bit(PG_writeback, &(page)->flags) |
Andrew Morton | d688abf | 2007-07-19 01:49:17 -0700 | [diff] [blame] | 233 | #define TestSetPageWriteback(page) test_and_set_bit(PG_writeback, \ |
| 234 | &(page)->flags) |
| 235 | #define TestClearPageWriteback(page) test_and_clear_bit(PG_writeback, \ |
| 236 | &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | |
Nick Piggin | 676165a | 2006-04-10 11:21:48 +1000 | [diff] [blame] | 238 | #define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) |
| 239 | #define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) |
| 240 | #define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags) |
| 241 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 242 | #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) |
| 243 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) |
| 244 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) |
| 245 | |
Fengguang Wu | d77c2d7 | 2007-07-19 01:47:55 -0700 | [diff] [blame] | 246 | #define PageReadahead(page) test_bit(PG_readahead, &(page)->flags) |
| 247 | #define SetPageReadahead(page) set_bit(PG_readahead, &(page)->flags) |
| 248 | #define ClearPageReadahead(page) clear_bit(PG_readahead, &(page)->flags) |
| 249 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 250 | #define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) |
| 251 | #define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) |
| 252 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) |
| 253 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) |
| 254 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) |
Nick Piggin | 5e9dace | 2006-03-22 00:08:01 -0800 | [diff] [blame] | 256 | #define __SetPageCompound(page) __set_bit(PG_compound, &(page)->flags) |
| 257 | #define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | |
Christoph Lameter | d85f338 | 2007-05-06 14:49:39 -0700 | [diff] [blame] | 259 | /* |
Christoph Lameter | 6d77795 | 2007-05-06 14:49:40 -0700 | [diff] [blame] | 260 | * PG_reclaim is used in combination with PG_compound to mark the |
| 261 | * head and tail of a compound page |
| 262 | * |
| 263 | * PG_compound & PG_reclaim => Tail page |
| 264 | * PG_compound & ~PG_reclaim => Head page |
Christoph Lameter | d85f338 | 2007-05-06 14:49:39 -0700 | [diff] [blame] | 265 | */ |
Christoph Lameter | 6d77795 | 2007-05-06 14:49:40 -0700 | [diff] [blame] | 266 | |
| 267 | #define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) |
| 268 | |
David Howells | a62f735 | 2008-02-21 16:12:45 +0000 | [diff] [blame] | 269 | #define PageTail(page) (((page)->flags & PG_head_tail_mask) \ |
Christoph Lameter | 6d77795 | 2007-05-06 14:49:40 -0700 | [diff] [blame] | 270 | == PG_head_tail_mask) |
| 271 | |
| 272 | static inline void __SetPageTail(struct page *page) |
| 273 | { |
| 274 | page->flags |= PG_head_tail_mask; |
| 275 | } |
| 276 | |
| 277 | static inline void __ClearPageTail(struct page *page) |
| 278 | { |
| 279 | page->flags &= ~PG_head_tail_mask; |
| 280 | } |
| 281 | |
David Howells | a62f735 | 2008-02-21 16:12:45 +0000 | [diff] [blame] | 282 | #define PageHead(page) (((page)->flags & PG_head_tail_mask) \ |
Christoph Lameter | 6d77795 | 2007-05-06 14:49:40 -0700 | [diff] [blame] | 283 | == (1L << PG_compound)) |
| 284 | #define __SetPageHead(page) __SetPageCompound(page) |
| 285 | #define __ClearPageHead(page) __ClearPageCompound(page) |
Christoph Lameter | d85f338 | 2007-05-06 14:49:39 -0700 | [diff] [blame] | 286 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 287 | #ifdef CONFIG_SWAP |
| 288 | #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) |
| 289 | #define SetPageSwapCache(page) set_bit(PG_swapcache, &(page)->flags) |
| 290 | #define ClearPageSwapCache(page) clear_bit(PG_swapcache, &(page)->flags) |
| 291 | #else |
| 292 | #define PageSwapCache(page) 0 |
| 293 | #endif |
| 294 | |
| 295 | #define PageUncached(page) test_bit(PG_uncached, &(page)->flags) |
| 296 | #define SetPageUncached(page) set_bit(PG_uncached, &(page)->flags) |
| 297 | #define ClearPageUncached(page) clear_bit(PG_uncached, &(page)->flags) |
| 298 | |
| 299 | struct page; /* forward declaration */ |
| 300 | |
Linus Torvalds | fba2591 | 2006-12-20 13:46:42 -0800 | [diff] [blame] | 301 | extern void cancel_dirty_page(struct page *page, unsigned int account_size); |
| 302 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | int test_clear_page_writeback(struct page *page); |
| 304 | int test_set_page_writeback(struct page *page); |
| 305 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | static inline void set_page_writeback(struct page *page) |
| 307 | { |
| 308 | test_set_page_writeback(page); |
| 309 | } |
| 310 | |
| 311 | #endif /* PAGE_FLAGS_H */ |