diff options
-rw-r--r-- | block/blktrace.c | 6 | ||||
-rw-r--r-- | block/ll_rw_blk.c | 3 | ||||
-rw-r--r-- | include/linux/blkdev.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 3 | ||||
-rw-r--r-- | kernel/fork.c | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 2b4ef2b89b8d..8ff33441d8a2 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -450,8 +450,10 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) | |||
450 | **/ | 450 | **/ |
451 | void blk_trace_shutdown(request_queue_t *q) | 451 | void blk_trace_shutdown(request_queue_t *q) |
452 | { | 452 | { |
453 | blk_trace_startstop(q, 0); | 453 | if (q->blk_trace) { |
454 | blk_trace_remove(q); | 454 | blk_trace_startstop(q, 0); |
455 | blk_trace_remove(q); | ||
456 | } | ||
455 | } | 457 | } |
456 | 458 | ||
457 | /* | 459 | /* |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9c3a06bcb7ba..51dc0edf76e0 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -1847,8 +1847,7 @@ static void blk_release_queue(struct kobject *kobj) | |||
1847 | if (q->queue_tags) | 1847 | if (q->queue_tags) |
1848 | __blk_queue_free_tags(q); | 1848 | __blk_queue_free_tags(q); |
1849 | 1849 | ||
1850 | if (q->blk_trace) | 1850 | blk_trace_shutdown(q); |
1851 | blk_trace_shutdown(q); | ||
1852 | 1851 | ||
1853 | kmem_cache_free(requestq_cachep, q); | 1852 | kmem_cache_free(requestq_cachep, q); |
1854 | } | 1853 | } |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c773ee545ebd..cfde8b3ee919 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -417,9 +417,9 @@ struct request_queue | |||
417 | unsigned int sg_timeout; | 417 | unsigned int sg_timeout; |
418 | unsigned int sg_reserved_size; | 418 | unsigned int sg_reserved_size; |
419 | int node; | 419 | int node; |
420 | 420 | #ifdef CONFIG_BLK_DEV_IO_TRACE | |
421 | struct blk_trace *blk_trace; | 421 | struct blk_trace *blk_trace; |
422 | 422 | #endif | |
423 | /* | 423 | /* |
424 | * reserved for flush operations | 424 | * reserved for flush operations |
425 | */ | 425 | */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 27122575d902..3696f2f7126d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -784,8 +784,9 @@ struct task_struct { | |||
784 | struct prio_array *array; | 784 | struct prio_array *array; |
785 | 785 | ||
786 | unsigned short ioprio; | 786 | unsigned short ioprio; |
787 | #ifdef CONFIG_BLK_DEV_IO_TRACE | ||
787 | unsigned int btrace_seq; | 788 | unsigned int btrace_seq; |
788 | 789 | #endif | |
789 | unsigned long sleep_avg; | 790 | unsigned long sleep_avg; |
790 | unsigned long long timestamp, last_ran; | 791 | unsigned long long timestamp, last_ran; |
791 | unsigned long long sched_time; /* sched_clock time spent running */ | 792 | unsigned long long sched_time; /* sched_clock time spent running */ |
diff --git a/kernel/fork.c b/kernel/fork.c index 802b1cf0e63f..bca6ce6d3ded 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -183,7 +183,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) | |||
183 | /* One for us, one for whoever does the "release_task()" (usually parent) */ | 183 | /* One for us, one for whoever does the "release_task()" (usually parent) */ |
184 | atomic_set(&tsk->usage,2); | 184 | atomic_set(&tsk->usage,2); |
185 | atomic_set(&tsk->fs_excl, 0); | 185 | atomic_set(&tsk->fs_excl, 0); |
186 | #ifdef CONFIG_BLK_DEV_IO_TRACE | ||
186 | tsk->btrace_seq = 0; | 187 | tsk->btrace_seq = 0; |
188 | #endif | ||
187 | tsk->splice_pipe = NULL; | 189 | tsk->splice_pipe = NULL; |
188 | return tsk; | 190 | return tsk; |
189 | } | 191 | } |