diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2020-06-19 20:47:26 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-24 09:15:58 -0600 |
commit | a67549c8e568627290234e9fbe833cb9dfd36b55 (patch) | |
tree | ac319553d06643c219235dc5d2951ae8e8ac3c2f | |
parent | e8c7d14ac6c37c173ec606907d38802b00302988 (diff) |
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>
-rw-r--r-- | kernel/trace/blktrace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 5ef0484513ec..5a88a6b55933 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -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; |