summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-02-15 18:40:50 +0300
committerChris Mason <chris.mason@oracle.com>2008-09-25 19:04:00 +0400
commit39b5637f6f195852259004bb27b58e2dcf9fb378 (patch)
tree64a86c71b34fb16520a1d165b5007d814b1c1c4f /fs/btrfs/file.c
parent9069218d448ea547dbad5f1cbd537e88d6519d66 (diff)
downloadlinux-39b5637f6f195852259004bb27b58e2dcf9fb378.tar.xz
Btrfs: Fix "no csum found for inode" issue.
A few codes were not properly updated for changes of extent map. This may be the causes of "no csum found for inode" issue. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index f89396082544..b0352b5958a5 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -357,10 +357,13 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end)
{
struct extent_map *em;
struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
+ u64 len = end - start + 1;
+ if (end == (u64)-1)
+ len = (u64)-1;
while(1) {
spin_lock(&em_tree->lock);
- em = lookup_extent_mapping(em_tree, start, end);
+ em = lookup_extent_mapping(em_tree, start, len);
if (!em) {
spin_unlock(&em_tree->lock);
break;