aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r--fs/btrfs/file-item.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index d9c69e16d368..45127e4797c8 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -161,7 +161,8 @@ int btrfs_csum_one_bio(struct btrfs_root *root, struct inode *inode,
161 161
162 while(bio_index < bio->bi_vcnt) { 162 while(bio_index < bio->bi_vcnt) {
163 offset = page_offset(bvec->bv_page) + bvec->bv_offset; 163 offset = page_offset(bvec->bv_page) + bvec->bv_offset;
164 if (offset >= ordered->file_offset + ordered->len) { 164 if (offset >= ordered->file_offset + ordered->len ||
165 offset < ordered->file_offset) {
165 unsigned long bytes_left; 166 unsigned long bytes_left;
166 sums->len = this_sum_bytes; 167 sums->len = this_sum_bytes;
167 this_sum_bytes = 0; 168 this_sum_bytes = 0;