]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/truncate.c
lguest: don't set MAC address for guest unless specified
[linux-2.6-omap-h63xx.git] / mm / truncate.c
index 894e9a70699fe8bbc7e39aa7cef7f68032cabede..250505091d3773e67449c547a0b16f8c67680257 100644 (file)
@@ -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