History

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 d07eb9117050c9ed3f78296ebcc06128b52693be, So, Let's remove the dead code to avoid any confusion. Changes in v2: update commit log, btrfs_abort_devices() was removed already.

Asias He committed 14 years ago

Commit 76aaa511 parent 5e5cfac2 files · +0 −42Browse files

Unified · Split

2 files
  1. block/blk-timeout.c +0 −41
  2. include/linux/blkdev.h +0 −1
block/blk-timeout.c+0−41
@@ -197,44 +197,3 @@ void blk_add_timer(struct request *req) · 196 unmodified lines
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+0−1
@@ -827,7 +827,6 @@ extern bool __blk_end_request_err(struct request *rq, int error); · 826 unmodified lines
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 /*