summaryrefslogtreecommitdiffstats
path: root/kernel/trace/blktrace.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-27 16:36:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-27 16:36:09 +0200
commit5ecb11dd892f443d4900292edaba88a26efee8fe (patch)
treed92c07b74431f862289a86230c66e2ef790f8980 /kernel/trace/blktrace.c
parenttty: remove file from n_tty_ioctl_helper (diff)
parentLinux 5.15-rc3 (diff)
downloadlinux-5ecb11dd892f443d4900292edaba88a26efee8fe.tar.xz
linux-5ecb11dd892f443d4900292edaba88a26efee8fe.zip
Merge 5.15-rc3 into tty-next
We need the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r--kernel/trace/blktrace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index c221e4c3f625..fa91f398f28b 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1605,6 +1605,14 @@ static int blk_trace_remove_queue(struct request_queue *q)
if (bt == NULL)
return -EINVAL;
+ if (bt->trace_state == Blktrace_running) {
+ bt->trace_state = Blktrace_stopped;
+ spin_lock_irq(&running_trace_lock);
+ list_del_init(&bt->running_list);
+ spin_unlock_irq(&running_trace_lock);
+ relay_flush(bt->rchan);
+ }
+
put_probe_ref();
synchronize_rcu();
blk_trace_free(bt);