aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:50:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:50:55 -0700
commit441f4058a04b2943685ff94e0f5f1992b0b3649e (patch)
tree80a61f6dddcf7d5831a8bd3771ffa2b430af3935 /fs/btrfs/extent-tree.c
parent7c34691abe23741bfc7d2514efd5a39f0e0ecb06 (diff)
parent8ad6fcab564c5bc956bdc3dfa440ab152b6e780f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (30 commits) Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree Btrfs: allow treeid==0 in the inode lookup ioctl Btrfs: return keys for large items to the search ioctl Btrfs: fix key checks and advance in the search ioctl Btrfs: buffer results in the space_info ioctl Btrfs: use __u64 types in ioctl.h Btrfs: fix search_ioctl key advance Btrfs: fix gfp flags masking in the compression code Btrfs: don't look at bio flags after submit_bio btrfs: using btrfs_stack_device_id() get devid btrfs: use memparse Btrfs: add a "df" ioctl for btrfs Btrfs: cache the extent state everywhere we possibly can V2 Btrfs: cache ordered extent when completing io Btrfs: cache extent state in find_delalloc_range Btrfs: change the ordered tree to use a spinlock instead of a mutex Btrfs: finish read pages in the order they are submitted btrfs: fix btrfs_mkdir goto for no free objectids Btrfs: flush data on snapshot creation Btrfs: make df be a little bit more understandable ...
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 559f72489b3..1727b26fb19 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6561,6 +6561,7 @@ static noinline int invalidate_extent_cache(struct btrfs_root *root,
struct btrfs_key key;
struct inode *inode = NULL;
struct btrfs_file_extent_item *fi;
+ struct extent_state *cached_state = NULL;
u64 num_bytes;
u64 skip_objectid = 0;
u32 nritems;
@@ -6589,12 +6590,14 @@ static noinline int invalidate_extent_cache(struct btrfs_root *root,
}
num_bytes = btrfs_file_extent_num_bytes(leaf, fi);
- lock_extent(&BTRFS_I(inode)->io_tree, key.offset,
- key.offset + num_bytes - 1, GFP_NOFS);
+ lock_extent_bits(&BTRFS_I(inode)->io_tree, key.offset,
+ key.offset + num_bytes - 1, 0, &cached_state,
+ GFP_NOFS);
btrfs_drop_extent_cache(inode, key.offset,
key.offset + num_bytes - 1, 1);
- unlock_extent(&BTRFS_I(inode)->io_tree, key.offset,
- key.offset + num_bytes - 1, GFP_NOFS);
+ unlock_extent_cached(&BTRFS_I(inode)->io_tree, key.offset,
+ key.offset + num_bytes - 1, &cached_state,
+ GFP_NOFS);
cond_resched();
}
iput(inode);