aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd/commit.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2008-08-02 06:01:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 00:31:34 -0400
commit529ae9aaa08378cfe2a4350bded76f32cc8ff0ce (patch)
treed3ae998f9876c72a83a022805103a92111852b21 /fs/jbd/commit.c
parente9ba9698187ddbc0c5bfcf41de0349a662d23d02 (diff)
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>
Diffstat (limited to 'fs/jbd/commit.c')
-rw-r--r--fs/jbd/commit.c4
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)
63 goto nope; 63 goto nope;
64 64
65 /* OK, it's a truncated page */ 65 /* OK, it's a truncated page */
66 if (TestSetPageLocked(page)) 66 if (!trylock_page(page))
67 goto nope; 67 goto nope;
68 68
69 page_cache_get(page); 69 page_cache_get(page);
@@ -446,7 +446,7 @@ void journal_commit_transaction(journal_t *journal)
446 spin_lock(&journal->j_list_lock); 446 spin_lock(&journal->j_list_lock);
447 } 447 }
448 if (unlikely(!buffer_uptodate(bh))) { 448 if (unlikely(!buffer_uptodate(bh))) {
449 if (TestSetPageLocked(bh->b_page)) { 449 if (!trylock_page(bh->b_page)) {
450 spin_unlock(&journal->j_list_lock); 450 spin_unlock(&journal->j_list_lock);
451 lock_page(bh->b_page); 451 lock_page(bh->b_page);
452 spin_lock(&journal->j_list_lock); 452 spin_lock(&journal->j_list_lock);