Commit a61721d5 authored by Yan's avatar Yan Committed by Chris Mason

fix found_type decrement in btrfs_truncate_in_trans

found_type has already been decreased by codes above the change,  I
think decrease it by one again doesn't make sense.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent cf67582b
...@@ -581,7 +581,7 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans, ...@@ -581,7 +581,7 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans,
} else { } else {
break; break;
} }
btrfs_set_key_type(&key, found_type - 1); btrfs_set_key_type(&key, found_type);
continue; continue;
} }
if (btrfs_disk_key_offset(found_key) >= inode->i_size) if (btrfs_disk_key_offset(found_key) >= inode->i_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment