diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:30:02 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:30:02 -0800 |
| commit | 595cf06fad2068ed3e97caabbb92ebe71ffd97d9 (patch) | |
| tree | 04f603a981813fa193c4e88a1ac88b8a04a5ad13 /include | |
| parent | 857805c6bdc445542e35347e18f1f0d21353a52c (diff) | |
v2.4.13.6 -> v2.4.13.7
- me: reinstate "delete swap cache on low swap" code
- David Miller: ksoftirqd startup race fix
- Hugh Dickins: make tmpfs free swap cache entries proactively
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mm.h | 18 | ||||
| -rw-r--r-- | include/linux/pagemap.h | 3 |
2 files changed, 5 insertions, 16 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 925c2cb25bdd..e128b2f84bc0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -282,6 +282,7 @@ typedef struct page { #define PG_launder 15 /* written out by VM pressure.. */ /* Make it prettier to test the above... */ +#define UnlockPage(page) unlock_page(page) #define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags) #define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) #define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) @@ -296,13 +297,7 @@ typedef struct page { #define PageLaunder(page) test_bit(PG_launder, &(page)->flags) #define SetPageLaunder(page) set_bit(PG_launder, &(page)->flags) -extern void __set_page_dirty(struct page *); - -static inline void set_page_dirty(struct page * page) -{ - if (!test_and_set_bit(PG_dirty, &page->flags)) - __set_page_dirty(page); -} +extern void FASTCALL(set_page_dirty(struct page *)); /* * The first mb is necessary to safely close the critical section opened by the @@ -310,14 +305,6 @@ static inline void set_page_dirty(struct page * page) * the clear_bit and the read of the waitqueue (to avoid SMP races with a * parallel wait_on_page). */ -#define UnlockPage(page) do { \ - clear_bit(PG_launder, &(page)->flags); \ - smp_mb__before_clear_bit(); \ - if (!test_and_clear_bit(PG_locked, &(page)->flags)) BUG(); \ - smp_mb__after_clear_bit(); \ - if (waitqueue_active(&(page)->wait)) \ - wake_up(&(page)->wait); \ - } while (0) #define PageError(page) test_bit(PG_error, &(page)->flags) #define SetPageError(page) set_bit(PG_error, &(page)->flags) #define ClearPageError(page) clear_bit(PG_error, &(page)->flags) @@ -465,6 +452,7 @@ static inline int is_page_cache_freeable(struct page * page) return page_count(page) - !!page->buffers == 1; } +extern int can_share_swap_page(struct page *); extern int remove_exclusive_swap_page(struct page *); extern void __free_pte(pte_t); diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 4a5e44dacbc4..b894a9b8fec0 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -79,7 +79,8 @@ extern struct page * __find_lock_page (struct address_space * mapping, extern struct page * find_or_create_page(struct address_space *mapping, unsigned long index, unsigned int gfp_mask); -extern void lock_page(struct page *page); +extern void FASTCALL(lock_page(struct page *page)); +extern void FASTCALL(unlock_page(struct page *page)); #define find_lock_page(mapping, index) \ __find_lock_page(mapping, index, page_hash(mapping, index)) extern struct page *find_trylock_page(struct address_space *, unsigned long); |
