summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorDavid Woodhouse2008-08-07 17:19:43 +0200
committerChris Mason2008-09-25 17:04:06 +0200
commit2db04966ae9a3eeb57f28df9aac4e77d5b287cb1 (patch)
tree12f42fdef9b5965c7e9970f875a6bf33ed5090f1 /fs/btrfs/extent_io.c
parentBtrfs: fix RHEL test for ClearPageFsMisc (diff)
downloadkernel-qcow2-linux-2db04966ae9a3eeb57f28df9aac4e77d5b287cb1.tar.gz
kernel-qcow2-linux-2db04966ae9a3eeb57f28df9aac4e77d5b287cb1.tar.xz
kernel-qcow2-linux-2db04966ae9a3eeb57f28df9aac4e77d5b287cb1.zip
Btrfs: Change TestSetPageLocked() to trylock_page()
Add backwards compatibility in compat.h Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> --- compat.h | 3 +++ extent_io.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletions(-) Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 1cf4baba4342..f46f88620c70 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -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);