]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix dip leak
authorDaniel J Blueman <daniel.blueman@gmail.com>
Wed, 9 Mar 2011 16:46:42 +0000 (16:46 +0000)
committerChris Mason <chris.mason@oracle.com>
Thu, 10 Mar 2011 16:21:49 +0000 (11:21 -0500)
commit303a06ef57d284e5a2b8e612c0cbe2f1bca4b2e7
tree79e281fde97b792eb732b5bde167c56939a6c67f
parentd182d5cf4929ee2a7e982f0c842af3c0a8455db0
btrfs: fix dip leak

The btrfs DIO code leaks dip structs when dip->csums allocation
fails; bio->bi_end_io isn't set at the point where the free_ordered
branch is consequently taken, thus bio_endio doesn't call the function
which would free it in the normal case. Fix.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Acked-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c