diff options
author | Yan <yanzheng@21cn.com> | 2007-11-06 10:26:28 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:57 -0400 |
commit | a273208edd55463b3bcd8b77a6fe8ba54afc6940 (patch) | |
tree | fa89bce25b3067bc2e11612c4f28ef8fec9bd27a /fs/btrfs | |
parent | dcfec0dcb1b1a037fb26177789e8f108bc429cb3 (diff) |
Fix EXTENT_MAP_INLINE off by one in btrfs_drop_extents
Don't set hint_byte to EXTENT_MAP_INLINE when 'end == extent_end' or
'start == key.offset' . The inline extent will be truncated in these
cases.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index bb98f52f4ea4..5ceaed25dce1 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -475,8 +475,7 @@ next_slot: | |||
475 | search_start = (extent_end + mask) & ~mask; | 475 | search_start = (extent_end + mask) & ~mask; |
476 | } else | 476 | } else |
477 | search_start = extent_end; | 477 | search_start = extent_end; |
478 | 478 | if (end < extent_end && start > key.offset && found_inline) { | |
479 | if (end <= extent_end && start >= key.offset && found_inline) { | ||
480 | *hint_byte = EXTENT_MAP_INLINE; | 479 | *hint_byte = EXTENT_MAP_INLINE; |
481 | } | 480 | } |
482 | if (end < extent_end && end >= key.offset) { | 481 | if (end < extent_end && end >= key.offset) { |