summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-01-22 15:43:09 -0500
committerJosef Bacik <jbacik@fusionio.com>2013-01-24 12:51:22 -0500
commite58dd74bccb4317e39e4b675bf9c6cd133608fac (patch)
treeaa95038a3e7e2d15b174306cd9a89861ac057511 /fs
parent192000dda22e02225772e862b92e7c09e5a17d08 (diff)
downloadlinux-3.10-e58dd74bccb4317e39e4b675bf9c6cd133608fac.tar.gz
linux-3.10-e58dd74bccb4317e39e4b675bf9c6cd133608fac.tar.bz2
linux-3.10-e58dd74bccb4317e39e4b675bf9c6cd133608fac.zip
Btrfs: put csums on the right ordered extent
I noticed a WARN_ON going off when adding csums because we were going over the amount of csum bytes that should have been allowed for an ordered extent. This is a leftover from when we used to hold the csums privately for direct io, but now we use the normal ordered sum stuff so we need to make sure and check if we've moved on to another extent so that the csums are added to the right extent. Without this we could end up with csums for bytenrs that don't have extents to cover them yet. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file-item.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index bd38cef4235..94aa53b3872 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -460,8 +460,8 @@ int btrfs_csum_one_bio(struct btrfs_root *root, struct inode *inode,
if (!contig)
offset = page_offset(bvec->bv_page) + bvec->bv_offset;
- if (!contig && (offset >= ordered->file_offset + ordered->len ||
- offset < ordered->file_offset)) {
+ if (offset >= ordered->file_offset + ordered->len ||
+ offset < ordered->file_offset) {
unsigned long bytes_left;
sums->len = this_sum_bytes;
this_sum_bytes = 0;