Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332580
b: refs/heads/master
c: c3308f8
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Oct 4, 2012
1 parent 75b5ab3 commit 05aa1df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 926ced123bd6651b30a07f65a2a8a0b26154cd58
refs/heads/master: c3308f84c1743eabb91f4976a314d118d5ea2342
4 changes: 3 additions & 1 deletion trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans,
int ret;
int modify_tree = -1;
int update_refs = (root->ref_cows || root == root->fs_info->tree_root);
int found = 0;

if (drop_cache)
btrfs_drop_extent_cache(inode, start, end - 1, 0);
Expand Down Expand Up @@ -674,6 +675,7 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans,
goto next_slot;
}

found = 1;
search_start = max(key.offset, start);
if (recow || !modify_tree) {
modify_tree = -1;
Expand Down Expand Up @@ -829,7 +831,7 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans,
}

if (drop_end)
*drop_end = min(end, extent_end);
*drop_end = found ? min(end, extent_end) : end;
btrfs_release_path(path);
return ret;
}
Expand Down

0 comments on commit 05aa1df

Please sign in to comment.