Skip to content

Commit 76aaa51

Browse files
Asias Heaxboe
authored andcommitted
block: Drop dead function blk_abort_queue()
This function was only used by btrfs code in btrfs_abort_devices() (seems in a wrong way). It was removed in commit d07eb91, So, Let's remove the dead code to avoid any confusion. Changes in v2: update commit log, btrfs_abort_devices() was removed already. Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-kernel@vger.kernel.org Cc: Chris Mason <chris.mason@oracle.com> Cc: linux-btrfs@vger.kernel.org Cc: David Sterba <dave@jikos.cz> Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 5e5cfac commit 76aaa51

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

block/blk-timeout.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -197,44 +197,3 @@ void blk_add_timer(struct request *req)
197197
mod_timer(&q->timeout, expiry);
198198
}
199199

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);

include/linux/blkdev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ extern bool __blk_end_request_err(struct request *rq, int error);
827827
extern void blk_complete_request(struct request *);
828828
extern void __blk_complete_request(struct request *);
829829
extern void blk_abort_request(struct request *);
830-
extern void blk_abort_queue(struct request_queue *);
831830
extern void blk_unprep_request(struct request *);
832831

833832
/*

0 commit comments

Comments
 (0)