android_kernel_samsung_msm8976/block
Aneesh Kumar K.V 35fc51e7a5 blktrace: Make sure BLKTRACETEARDOWN does the full cleanup.
if blktrace program segfault it will not be able
to call BLKTRACETEARDOWN. Now if we run the blktrace
again that would result in a failure to create the
block/<device> debugfs directory.This will result
in blk_remove_root() to be called which will set
blk_tree_root to NULL. But the  debugfs block dir
still exist because it contain subdirectory.

Now if we try to fix it using BLKTRACETEARDOWN
it won't work because blk_tree_root is NULL.

Fix the same.

Tested as below

root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc
Segmentation fault
root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc
BLKTRACESETUP: No such file or directory
Failed to start trace on /dev/hdc
root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -k /dev/hdc
root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-27 09:19:39 +01:00
..
as-iosched.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
blktrace.c blktrace: Make sure BLKTRACETEARDOWN does the full cleanup. 2007-11-27 09:19:39 +01:00
bsg.c bsg: mark struct file_operations const 2007-10-16 09:59:54 +02:00
cfq-iosched.c cfq_idle_class_timer: add paranoid checks for jiffies overflow 2007-11-07 13:51:35 +01:00
compat_ioctl.c compat_ioctl: fix block device compat ioctl regression 2007-10-29 11:33:06 +01:00
deadline-iosched.c Deadline iosched: Fix batching fairness 2007-11-02 08:47:25 +01:00
elevator.c fix typo "insted" -> "instead" 2007-10-20 01:55:04 +02:00
genhd.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ioctl.c compat_ioctl: move common block ioctls to compat_blkdev_ioctl 2007-10-10 09:26:00 +02:00
Kconfig Only enable BLOCK_COMPAT if COMPAT is needed 2007-10-12 17:58:36 -07:00
Kconfig.iosched update I/O sched Kconfig help texts - CFQ is now default, not AS. 2007-02-17 20:08:22 +01:00
ll_rw_blk.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
Makefile [BLOCK] Only include the compat ioctl code if CONFIG_BLOCK is set 2007-10-12 12:50:41 +02:00
noop-iosched.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
scsi_ioctl.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00