Commit 29306626 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

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: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240409143748.980206-2-hch@lst.deReviewed-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 28fc2bd2
...@@ -892,6 +892,19 @@ int queue_limits_commit_update(struct request_queue *q, ...@@ -892,6 +892,19 @@ int queue_limits_commit_update(struct request_queue *q,
struct queue_limits *lim); struct queue_limits *lim);
int queue_limits_set(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 * Access functions for manipulating queue properties
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment