diff options
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 7acadf3b742a..cc6e0b6de949 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -300,6 +300,10 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, size = btrfs_item_size_nr(leaf, path->slots[0]); csum_end = key.offset + (size / csum_size) * root->sectorsize; + if (csum_end <= start) { + path->slots[0]++; + continue; + } size = min(csum_end, end + 1) - start; sums = kzalloc(btrfs_ordered_sum_size(root, size), GFP_NOFS); |