diff options
| -rw-r--r-- | block/blk-timeout.c | 41 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 |
2 files changed, 0 insertions, 42 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 780354888958..6e4744cbfb56 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c | |||
| @@ -197,44 +197,3 @@ void blk_add_timer(struct request *req) | |||
| 197 | mod_timer(&q->timeout, expiry); | 197 | mod_timer(&q->timeout, expiry); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | /** | ||
| 201 | * blk_abort_queue -- Abort all request on given queue | ||
| 202 | * @queue: pointer to queue | ||
| 203 | * | ||
| 204 | */ | ||
| 205 | void blk_abort_queue(struct request_queue *q) | ||
| 206 | { | ||
| 207 | unsigned long flags; | ||
| 208 | struct request *rq, *tmp; | ||
| 209 | LIST_HEAD(list); | ||
| 210 | |||
| 211 | /* | ||
| 212 | * Not a request based block device, nothing to abort | ||
| 213 | */ | ||
| 214 | if (!q->request_fn) | ||
| 215 | return; | ||
| 216 | |||
| 217 | spin_lock_irqsave(q->queue_lock, flags); | ||
| 218 | |||
| 219 | elv_abort_queue(q); | ||
| 220 | |||
| 221 | /* | ||
| 222 | * Splice entries to local list, to avoid deadlocking if entries | ||
| 223 | * get readded to the timeout list by error handling | ||
| 224 | */ | ||
| 225 | list_splice_init(&q->timeout_list, &list); | ||
| 226 | |||
| 227 | list_for_each_entry_safe(rq, tmp, &list, timeout_list) | ||
| 228 | blk_abort_request(rq); | ||
| 229 | |||
| 230 | /* | ||
| 231 | * Occasionally, blk_abort_request() will return without | ||
| 232 | * deleting the element from the list. Make sure we add those back | ||
| 233 | * instead of leaving them on the local stack list. | ||
| 234 | */ | ||
| 235 | list_splice(&list, &q->timeout_list); | ||
| 236 | |||
| 237 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
| 238 | |||
| 239 | } | ||
| 240 | EXPORT_SYMBOL_GPL(blk_abort_queue); | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ba43f408baa3..07954b05b86c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -827,7 +827,6 @@ extern bool __blk_end_request_err(struct request *rq, int error); | |||
| 827 | extern void blk_complete_request(struct request *); | 827 | extern void blk_complete_request(struct request *); |
| 828 | extern void __blk_complete_request(struct request *); | 828 | extern void __blk_complete_request(struct request *); |
| 829 | extern void blk_abort_request(struct request *); | 829 | extern void blk_abort_request(struct request *); |
| 830 | extern void blk_abort_queue(struct request_queue *); | ||
| 831 | extern void blk_unprep_request(struct request *); | 830 | extern void blk_unprep_request(struct request *); |
| 832 | 831 | ||
| 833 | /* | 832 | /* |
