Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164448
b: refs/heads/master
c: edcf474
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Sep 22, 2009
1 parent 2f36e9a commit e8affc1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c0b13519d1c755d874e82c8fb8a6dcef0ee402c
refs/heads/master: edcf4748cd56adcdf0856cc99ef108a4ea3ac7fe
13 changes: 8 additions & 5 deletions trunk/include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,20 @@ static inline void __ClearPageTail(struct page *page)
*/
#define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1)

#endif /* !__GENERATING_BOUNDS_H */

#define PAGE_FLAGS_PRIVATE \
(1 << PG_private | 1 << PG_private_2)
/**
* page_has_private - Determine if page has private stuff
* @page: The page to be checked
*
* Determine if a page has private stuff, indicating that release routines
* should be invoked upon it.
*/
#define page_has_private(page) \
((page)->flags & ((1 << PG_private) | \
(1 << PG_private_2)))
static inline int page_has_private(struct page *page)
{
return !!(page->flags & PAGE_FLAGS_PRIVATE);
}

#endif /* !__GENERATING_BOUNDS_H */

#endif /* PAGE_FLAGS_H */
2 changes: 1 addition & 1 deletion trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static int migrate_page_move_mapping(struct address_space *mapping,
pslot = radix_tree_lookup_slot(&mapping->page_tree,
page_index(page));

expected_count = 2 + !!page_has_private(page);
expected_count = 2 + page_has_private(page);
if (page_count(page) != expected_count ||
(struct page *)radix_tree_deref_slot(pslot) != page) {
spin_unlock_irq(&mapping->tree_lock);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static inline int page_mapping_inuse(struct page *page)

static inline int is_page_cache_freeable(struct page *page)
{
return page_count(page) - !!page_has_private(page) == 2;
return page_count(page) - page_has_private(page) == 2;
}

static int may_write_to_queue(struct backing_dev_info *bdi)
Expand Down

0 comments on commit e8affc1

Please sign in to comment.