Skip to content

Commit

Permalink
blktrace: annotate required lock on do_blk_trace_setup()
Browse files Browse the repository at this point in the history
Ensure it is clear which lock is required on do_blk_trace_setup().

Suggested-by: Bart Van Assche <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
mcgrof authored and axboe committed Jun 24, 2020
1 parent e8c7d14 commit a67549c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a67549c

Please sign in to comment.