History

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.

Nick Piggin committed 18 years ago

Commit 529ae9a1 parent e9ba96920 files · +74 −59Browse files

Showing the changes to fs/jbd/commit.c (1 of 20 files). Show all

Unified · Split

fs/jbd/commit.c+2−2
@@ -63,7 +63,7 @@ static void release_buffer_page(struct buffer_head *bh) · 62 unmodified lines
6363 goto nope;
6464
6565 /* OK, it's a truncated page */
66− if (TestSetPageLocked(page))
66+ if (!trylock_page(page))
6767 goto nope;
6868
6969 page_cache_get(page);
@@ -446,7 +446,7 @@ void journal_commit_transaction(journal_t *journal) · 376 unmodified lines
446446 spin_lock(&journal->j_list_lock);
447447 }
448448 if (unlikely(!buffer_uptodate(bh))) {
449− if (TestSetPageLocked(bh->b_page)) {
449+ if (!trylock_page(bh->b_page)) {
450450 spin_unlock(&journal->j_list_lock);
451451 lock_page(bh->b_page);
452452 spin_lock(&journal->j_list_lock);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t