Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128518
b: refs/heads/master
c: b56baf5
h: refs/heads/master
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent 9008764 commit abbd99d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 689f9346612d96ab93890160cf2fe0df5217ab73
refs/heads/master: b56baf5bedccd3258643b09289f17ceab3ddea52
10 changes: 4 additions & 6 deletions trunk/fs/btrfs/file-item.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,11 @@ int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
nritems = btrfs_header_nritems(path->nodes[0]);
if (path->slots[0] >= nritems - 1) {
ret = btrfs_next_leaf(root, path);
if (ret == 1) {
if (ret == 1)
found_next = 1;
} else if (ret == 0) {
slot = 0;
} else {
if (ret != 0)
goto insert;
}
slot = 0;
}
btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot);
if (found_key.objectid != objectid ||
Expand Down Expand Up @@ -238,7 +236,7 @@ int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
csum_offset = 0;
if (found_next) {
u64 tmp = min((u64)i_size_read(inode), next_offset);
tmp -= offset + root->sectorsize - 1;
tmp -= offset & ~((u64)root->sectorsize -1);
tmp >>= root->fs_info->sb->s_blocksize_bits;
tmp = max((u64)1, tmp);
tmp = min(tmp, (u64)MAX_CSUM_ITEMS(root));
Expand Down

0 comments on commit abbd99d

Please sign in to comment.