]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmscan.c
[SCSI] mptfusion: Increase scsi-timeouts, similariy to the LSI 4.x driver.
[linux-2.6-omap-h63xx.git] / mm / vmscan.c
index 75be453628bf6aed4fbcd6a3fdaa59f62603166e..1ff1a58e7c1075fffecda7eb9ce5c360e8369a17 100644 (file)
@@ -496,7 +496,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                page = lru_to_page(page_list);
                list_del(&page->lru);
 
-               if (TestSetPageLocked(page))
+               if (!trylock_page(page))
                        goto keep;
 
                VM_BUG_ON(PageActive(page));
@@ -582,7 +582,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                                 * A synchronous write - probably a ramdisk.  Go
                                 * ahead and try to reclaim the page.
                                 */
-                               if (TestSetPageLocked(page))
+                               if (!trylock_page(page))
                                        goto keep;
                                if (PageDirty(page) || PageWriteback(page))
                                        goto keep_locked;