summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-11-09 14:30:24 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-11-09 14:30:24 -0800
commitc4c23fb6f2b17c922b493f79cf27a0d32397f461 (patch)
tree64b651ddc98fde641da2e1dd93d1bdca619565a4 /fs
parent0b0c7dbd986440474b4d6771611da59c22b63078 (diff)
parent6e5aafb27419f32575b27ef9d6a31e5d54661aca (diff)
downloadop-kernel-dev-c4c23fb6f2b17c922b493f79cf27a0d32397f461.zip
op-kernel-dev-c4c23fb6f2b17c922b493f79cf27a0d32397f461.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason: "It's a one liner for an error cleanup path that leads to crashes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file-item.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 783a943..84a2d18 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -413,7 +413,7 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
ret = 0;
fail:
while (ret < 0 && !list_empty(&tmplist)) {
- sums = list_entry(&tmplist, struct btrfs_ordered_sum, list);
+ sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list);
list_del(&sums->list);
kfree(sums);
}
OpenPOWER on IntegriCloud