aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-08-04 23:23:47 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:06 -0400
commitb48652c101cce7a54379a49cc0cf854cec2c94e2 (patch)
tree13e8250b326b71fed80811e1ed3b19b00beded31 /fs/btrfs/ordered-data.c
parent3de9d6b649b4cc60687be92e71cef36d7d4e8f2f (diff)
Btrfs: Various small fixes.
This trivial patch contains two locking fixes and a off by one fix. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r--fs/btrfs/ordered-data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 676e4bd65c52..db200e6baf7e 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -548,7 +548,7 @@ int btrfs_ordered_update_i_size(struct inode *inode,
548 */ 548 */
549 test = rb_entry(node, struct btrfs_ordered_extent, rb_node); 549 test = rb_entry(node, struct btrfs_ordered_extent, rb_node);
550 if (test->file_offset > entry_end(ordered)) { 550 if (test->file_offset > entry_end(ordered)) {
551 i_size_test = test->file_offset - 1; 551 i_size_test = test->file_offset;
552 } 552 }
553 } else { 553 } else {
554 i_size_test = i_size_read(inode); 554 i_size_test = i_size_read(inode);
@@ -561,7 +561,7 @@ int btrfs_ordered_update_i_size(struct inode *inode,
561 * disk_i_size to the end of the region. 561 * disk_i_size to the end of the region.
562 */ 562 */
563 if (i_size_test > entry_end(ordered) && 563 if (i_size_test > entry_end(ordered) &&
564 !test_range_bit(io_tree, entry_end(ordered), i_size_test, 564 !test_range_bit(io_tree, entry_end(ordered), i_size_test - 1,
565 EXTENT_DELALLOC, 0)) { 565 EXTENT_DELALLOC, 0)) {
566 new_i_size = min_t(u64, i_size_test, i_size_read(inode)); 566 new_i_size = min_t(u64, i_size_test, i_size_read(inode));
567 } 567 }