mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
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:
parent
e9ba969818
commit
529ae9aaa0
20 changed files with 74 additions and 59 deletions
|
@ -187,7 +187,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
|
|||
if (page_index > next)
|
||||
next = page_index;
|
||||
next++;
|
||||
if (TestSetPageLocked(page))
|
||||
if (!trylock_page(page))
|
||||
continue;
|
||||
if (PageWriteback(page)) {
|
||||
unlock_page(page);
|
||||
|
@ -280,7 +280,7 @@ unsigned long __invalidate_mapping_pages(struct address_space *mapping,
|
|||
pgoff_t index;
|
||||
int lock_failed;
|
||||
|
||||
lock_failed = TestSetPageLocked(page);
|
||||
lock_failed = !trylock_page(page);
|
||||
|
||||
/*
|
||||
* We really shouldn't be looking at the ->index of an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue