diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blktrace.c | 6 | ||||
-rw-r--r-- | block/ll_rw_blk.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 2b4ef2b..8ff3344 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) **/ void blk_trace_shutdown(request_queue_t *q) { - blk_trace_startstop(q, 0); - blk_trace_remove(q); + if (q->blk_trace) { + blk_trace_startstop(q, 0); + blk_trace_remove(q); + } } /* diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9c3a06b..51dc0ed 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) if (q->queue_tags) __blk_queue_free_tags(q); - if (q->blk_trace) - blk_trace_shutdown(q); + blk_trace_shutdown(q); kmem_cache_free(requestq_cachep, q); } |