]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/btrfs/extent_io.c
Btrfs: Change TestSetPageLocked() to trylock_page()
[linux-2.6-omap-h63xx.git] / fs / btrfs / extent_io.c
index 1cf4baba4342a2e5419424da9f0f0fc7cd699e62..f46f88620c709415acd1c4d64fe21bf58a3aa57a 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/pagevec.h>
 #include "extent_io.h"
 #include "extent_map.h"
+#include "compat.h"
 
 /* temporary define until extent_map moves out of btrfs */
 struct kmem_cache *btrfs_cache_create(const char *name, size_t size,
@@ -3055,7 +3056,7 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
        for (i = start_i; i < num_pages; i++) {
                page = extent_buffer_page(eb, i);
                if (!wait) {
-                       if (TestSetPageLocked(page))
+                       if (!trylock_page(page))
                                goto unlock_exit;
                } else {
                        lock_page(page);