diff options
| author | Christoph Hellwig <[email protected]> | 2024-04-09 16:37:26 +0200 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2024-04-11 21:37:48 -0400 |
| commit | 293066264fb45df4290897c22e69833bea5fe171 (patch) | |
| tree | b0b06277105930a307e89404c4d288e2751d6c24 /include/linux | |
| parent | 28fc2bd2c7298d647fcbab7b11532a1f5fda7470 (diff) | |
scsi: block: Add a helper to cancel atomic queue limit updates
Drivers might have to perform complex actions to determine queue limits,
and those might fail. Add a helper to cancel a queue limit update that can
be called in those cases.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Kanchan Joshi <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c3e8f7cf96be..ded7f66dc4b9 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -892,6 +892,19 @@ int queue_limits_commit_update(struct request_queue *q, struct queue_limits *lim); int queue_limits_set(struct request_queue *q, struct queue_limits *lim); +/** + * queue_limits_cancel_update - cancel an atomic update of queue limits + * @q: queue to update + * + * This functions cancels an atomic update of the queue limits started by + * queue_limits_start_update() and should be used when an error occurs after + * starting update. + */ +static inline void queue_limits_cancel_update(struct request_queue *q) +{ + mutex_unlock(&q->limits_lock); +} + /* * Access functions for manipulating queue properties */ |