summaryrefslogtreecommitdiffstats
path: root/Documentation/DMA-attributes.txt
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 12:30:16 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:04 +0200
commit88e341261ca4d39eec21b212961c77eff51105f7 (patch)
treeb65315c446ce592e6a0dc521eab9acd92ae61c5e /Documentation/DMA-attributes.txt
parentblock: allow deleting zero length partition (diff)
downloadlinux-88e341261ca4d39eec21b212961c77eff51105f7.tar.xz
linux-88e341261ca4d39eec21b212961c77eff51105f7.zip
block: update add_partition() error handling
d805dda4 tried to fix error case handling in add_partition() but had a few problems. * disk->part[] entry is set early and left dangling if operation fails. * Once device initialized, the last put_device() is responsible for freeing all the resources. The failure path freed part_stats and p regardless of put_device() causing double free. * holders subdir holds reference to the disk device, so failure path should remove it to release resources properly which was missing. This patch fixes the above problems and while at it move partition slot busy check into add_partition() for completeness and inlines holders subdirectory creation. Using separate function for it just obfuscates the code. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Abdel Benamrouche <draconux@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'Documentation/DMA-attributes.txt')
0 files changed, 0 insertions, 0 deletions