diff options
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 0782e924ddeb..fb8c214160c1 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -239,7 +239,8 @@ int btrfs_csum_truncate(struct btrfs_trans_handle *trans, | |||
239 | if (isize <= key.offset) | 239 | if (isize <= key.offset) |
240 | return 0; | 240 | return 0; |
241 | new_item_span = isize - key.offset; | 241 | new_item_span = isize - key.offset; |
242 | blocks = (new_item_span + root->blocksize - 1) / root->blocksize; | 242 | blocks = (new_item_span + root->blocksize - 1) >> |
243 | root->fs_info->sb->s_blocksize_bits; | ||
243 | new_item_size = blocks * BTRFS_CRC32_SIZE; | 244 | new_item_size = blocks * BTRFS_CRC32_SIZE; |
244 | if (new_item_size >= btrfs_item_size(leaf->items + slot)) | 245 | if (new_item_size >= btrfs_item_size(leaf->items + slot)) |
245 | return 0; | 246 | return 0; |