diff options
author | akpm <akpm@linux-foundation.org> | 2022-06-27 10:31:44 -0700 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-06-27 10:31:44 -0700 |
commit | ee56c3e8eec166f4e4a2ca842b7804d14f3a0208 (patch) | |
tree | 3bcee4a6090d681b7bbb49d1946c95798f166159 /block/blk-rq-qos.h | |
parent | 00c9d5632277b21ba8802e26c27254cd9d0dfa13 (diff) | |
parent | 03c765b0e3b4cb5063276b086c76f7a612856a9a (diff) | |
download | lwn-ee56c3e8eec166f4e4a2ca842b7804d14f3a0208.tar.gz lwn-ee56c3e8eec166f4e4a2ca842b7804d14f3a0208.zip |
Merge branch 'master' into mm-nonmm-stable
Diffstat (limited to 'block/blk-rq-qos.h')
-rw-r--r-- | block/blk-rq-qos.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/blk-rq-qos.h b/block/blk-rq-qos.h index 68267007da1c..0e46052b018a 100644 --- a/block/blk-rq-qos.h +++ b/block/blk-rq-qos.h @@ -104,8 +104,11 @@ static inline void rq_qos_add(struct request_queue *q, struct rq_qos *rqos) blk_mq_unfreeze_queue(q); - if (rqos->ops->debugfs_attrs) + if (rqos->ops->debugfs_attrs) { + mutex_lock(&q->debugfs_mutex); blk_mq_debugfs_register_rqos(rqos); + mutex_unlock(&q->debugfs_mutex); + } } static inline void rq_qos_del(struct request_queue *q, struct rq_qos *rqos) @@ -129,7 +132,9 @@ static inline void rq_qos_del(struct request_queue *q, struct rq_qos *rqos) blk_mq_unfreeze_queue(q); + mutex_lock(&q->debugfs_mutex); blk_mq_debugfs_unregister_rqos(rqos); + mutex_unlock(&q->debugfs_mutex); } typedef bool (acquire_inflight_cb_t)(struct rq_wait *rqw, void *private_data); |