Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177842
b: refs/heads/master
c: 55ef689
h: refs/heads/master
v: v3
  • Loading branch information
Yan, Zheng authored and Chris Mason committed Dec 17, 2009
1 parent b645f73 commit c918960
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: 24bbcf0442ee04660a5a030efdbb6d03f1c275cb
refs/heads/master: 55ef68990029fcd8d04d42fc184aa7fb18cf309e
10 changes: 3 additions & 7 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,14 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
}
flags = em->flags;
if (skip_pinned && test_bit(EXTENT_FLAG_PINNED, &em->flags)) {
if (em->start <= start &&
(!testend || em->start + em->len >= start + len)) {
if (testend && em->start + em->len >= start + len) {
free_extent_map(em);
write_unlock(&em_tree->lock);
break;
}
if (start < em->start) {
len = em->start - start;
} else {
start = em->start + em->len;
if (testend)
len = start + len - (em->start + em->len);
start = em->start + em->len;
}
free_extent_map(em);
write_unlock(&em_tree->lock);
continue;
Expand Down

0 comments on commit c918960

Please sign in to comment.