diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2020-06-19 22:47:26 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-24 17:15:58 +0200 |
commit | a67549c8e568627290234e9fbe833cb9dfd36b55 (patch) | |
tree | ac319553d06643c219235dc5d2951ae8e8ac3c2f /kernel/trace/blktrace.c | |
parent | block: revert back to synchronous request_queue removal (diff) | |
download | linux-a67549c8e568627290234e9fbe833cb9dfd36b55.tar.xz linux-a67549c8e568627290234e9fbe833cb9dfd36b55.zip |
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>
Diffstat (limited to '')
-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; |