Skip to content

Commit

Permalink
Btrfs: Align extent length to sectorsize in
Browse files Browse the repository at this point in the history
---

Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
ukernel authored and chrismason-xx committed Sep 25, 2008
1 parent 5a01a2e commit b1632b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans,
btrfs_file_extent_num_bytes(leaf, fi);
extent_num_bytes = inode->i_size -
found_key.offset + root->sectorsize - 1;
extent_num_bytes = extent_num_bytes &
~((u64)root->sectorsize - 1);
btrfs_set_file_extent_num_bytes(leaf, fi,
extent_num_bytes);
num_dec = (orig_num_bytes -
Expand Down

0 comments on commit b1632b1

Please sign in to comment.