mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
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>
This commit is contained in:
parent
3de9d6b649
commit
b48652c101
5 changed files with 11 additions and 10 deletions
|
@ -548,7 +548,7 @@ int btrfs_ordered_update_i_size(struct inode *inode,
|
|||
*/
|
||||
test = rb_entry(node, struct btrfs_ordered_extent, rb_node);
|
||||
if (test->file_offset > entry_end(ordered)) {
|
||||
i_size_test = test->file_offset - 1;
|
||||
i_size_test = test->file_offset;
|
||||
}
|
||||
} else {
|
||||
i_size_test = i_size_read(inode);
|
||||
|
@ -561,7 +561,7 @@ int btrfs_ordered_update_i_size(struct inode *inode,
|
|||
* disk_i_size to the end of the region.
|
||||
*/
|
||||
if (i_size_test > entry_end(ordered) &&
|
||||
!test_range_bit(io_tree, entry_end(ordered), i_size_test,
|
||||
!test_range_bit(io_tree, entry_end(ordered), i_size_test - 1,
|
||||
EXTENT_DELALLOC, 0)) {
|
||||
new_i_size = min_t(u64, i_size_test, i_size_read(inode));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue