blktrace: annotate required lock on do_blk_trace_setup()

Ensure it is clear which lock is required on do_blk_trace_setup().

Suggested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Luis Chamberlain 2020-06-19 20:47:26 +00:00 committed by Jens Axboe
parent e8c7d14ac6
commit a67549c8e5

View File

@ -483,6 +483,8 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
struct dentry *dir = NULL;
int ret;
lockdep_assert_held(&q->blk_trace_mutex);
if (!buts->buf_size || !buts->buf_nr)
return -EINVAL;