On 6/5/20 7:58 AM, Jan Kara wrote: > + > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #include <linux/kernel.h> > #include <linux/blkdev.h> > #include <linux/blktrace_api.h> > @@ -494,6 +497,16 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, > */ > strreplace(buts->name, '/', '_'); > > + /* > + * bdev can be NULL, as with scsi-generic, this is a helpful as > + * we can be. > + */ > + if (q->blk_trace) { > + pr_warn("Concurrent blktraces are not allowed on %s\n", > + buts->name); > + return -EBUSY; > + } > + > bt = kzalloc(sizeof(*bt), GFP_KERNEL); > if (!bt) > return -ENOMEM; > -- 2.16.4 Looks good. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>