From e263b8848cfce4199cb34b6554034973336bcac8 Mon Sep 17 00:00:00 2001 From: Yan Date: Wed, 7 Nov 2007 13:31:09 -0500 Subject: [PATCH] --- yaml --- r: 128532 b: refs/heads/master c: 008630c17cc5654e141c7fd24a3e737de643fec1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/inode.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 285defa460fc..39fb4c514b7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 34a3821873aeabff2607c8093bce82cd1fbcfd60 +refs/heads/master: 008630c17cc5654e141c7fd24a3e737de643fec1 diff --git a/trunk/fs/btrfs/inode.c b/trunk/fs/btrfs/inode.c index 25f32d7c7ee8..90cb71d68294 100644 --- a/trunk/fs/btrfs/inode.c +++ b/trunk/fs/btrfs/inode.c @@ -611,13 +611,14 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans, item_end += btrfs_file_extent_inline_len(leaf, item); } + item_end--; } if (found_type == BTRFS_CSUM_ITEM_KEY) { ret = btrfs_csum_truncate(trans, root, path, inode->i_size); BUG_ON(ret); } - if (item_end <= inode->i_size) { + if (item_end < inode->i_size) { if (found_type == BTRFS_DIR_ITEM_KEY) { found_type = BTRFS_INODE_ITEM_KEY; } else if (found_type == BTRFS_EXTENT_ITEM_KEY) {