]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix punch hole when no extent exists
authorJosef Bacik <jbacik@fusionio.com>
Fri, 14 Sep 2012 18:51:22 +0000 (14:51 -0400)
committerChris Mason <chris.mason@fusionio.com>
Thu, 4 Oct 2012 13:40:00 +0000 (09:40 -0400)
commit1a694b1a772476370a9419d31749530fd3cb700b
tree996b83b71224a03621fae61a32e8f194954deebf
parent137a73a86d8c152b71bb1a8b0add80733c80b595
Btrfs: fix punch hole when no extent exists

I saw the warning in btrfs_drop_extent_cache where our end is less than our
start while running xfstests 68 in a loop.  This is because we
unconditionally do drop_end = min(end, extent_end) in
__btrfs_drop_extents(), even though we may not have found an extent in the
range we were looking to drop.  So keep track of wether or not we found
something, and if we didn't just use our end.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/file.c