projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d751af5
)
Fix for test_range_bit
author
Yan
<yanzheng@21cn.com>
Tue, 22 Jan 2008 16:34:13 +0000
(11:34 -0500)
committer
David Woodhouse
<dwmw2@hera.kernel.org>
Tue, 22 Jan 2008 16:34:13 +0000
(11:34 -0500)
test_range_bit doesn't properly handle the case: there's a hole at the
end of the range and there's no other extent_state after the range.
extent_map.c
patch
|
blob
|
history
diff --git
a/extent_map.c
b/extent_map.c
index
c797926
..
bc67c0e
100644
(file)
--- a/
extent_map.c
+++ b/
extent_map.c
@@
-473,6
+473,11
@@
int test_range_bit(struct extent_map_tree *tree, u64 start, u64 end,
if (start > end)
break;
node = next_cache_extent(node);
+ if (!node) {
+ if (filled)
+ bitset = 0;
+ break;
+ }
}
return bitset;
}