diff options
| author | Nick Piggin <[email protected]> | 2008-08-02 10:01:03 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-08-05 04:31:34 +0000 |
| commit | 529ae9aaa08378cfe2a4350bded76f32cc8ff0ce (patch) | |
| tree | d3ae998f9876c72a83a022805103a92111852b21 /fs/jbd/commit.c | |
| parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff) | |
| download | kernel-529ae9aaa08378cfe2a4350bded76f32cc8ff0ce.tar.gz kernel-529ae9aaa08378cfe2a4350bded76f32cc8ff0ce.zip | |
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 <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Acked-by: Andrew Morton <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd/commit.c')
| -rw-r--r-- | fs/jbd/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 2eccbfaa1d48..81a9ad7177ca 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -63,7 +63,7 @@ static void release_buffer_page(struct buffer_head *bh) goto nope; /* OK, it's a truncated page */ - if (TestSetPageLocked(page)) + if (!trylock_page(page)) goto nope; page_cache_get(page); @@ -446,7 +446,7 @@ void journal_commit_transaction(journal_t *journal) spin_lock(&journal->j_list_lock); } if (unlikely(!buffer_uptodate(bh))) { - if (TestSetPageLocked(bh->b_page)) { + if (!trylock_page(bh->b_page)) { spin_unlock(&journal->j_list_lock); lock_page(bh->b_page); spin_lock(&journal->j_list_lock); |
