mm: rename page trylock
Converting page lock to new locking bitops requires a change of page flag operation naming, so we might as well convert it to something nicer (!TestSetPageLocked_Lock => trylock_page, SetPageLocked => set_page_locked). This also facilitates lockdeping of page lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
e9ba969818
commit
529ae9aaa0
@@ -403,7 +403,7 @@ void free_swap_and_cache(swp_entry_t entry)
|
||||
if (p) {
|
||||
if (swap_entry_free(p, swp_offset(entry)) == 1) {
|
||||
page = find_get_page(&swapper_space, entry.val);
|
||||
if (page && unlikely(TestSetPageLocked(page))) {
|
||||
if (page && unlikely(!trylock_page(page))) {
|
||||
page_cache_release(page);
|
||||
page = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user