Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311600
b: refs/heads/master
c: 76aaa51
h: refs/heads/master
v: v3
  • Loading branch information
Asias He authored and Jens Axboe committed Jun 15, 2012
1 parent 2811347 commit 9ff7e0b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 43 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e5cfac0c622d42eff4fa308e91b3c9c1884b4f0
refs/heads/master: 76aaa5101fffaef12b45b4c01ed0d0528f23dedf
41 changes: 0 additions & 41 deletions trunk/block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,44 +197,3 @@ void blk_add_timer(struct request *req)
mod_timer(&q->timeout, expiry);
}

/**
* blk_abort_queue -- Abort all request on given queue
* @queue: pointer to queue
*
*/
void blk_abort_queue(struct request_queue *q)
{
unsigned long flags;
struct request *rq, *tmp;
LIST_HEAD(list);

/*
* Not a request based block device, nothing to abort
*/
if (!q->request_fn)
return;

spin_lock_irqsave(q->queue_lock, flags);

elv_abort_queue(q);

/*
* Splice entries to local list, to avoid deadlocking if entries
* get readded to the timeout list by error handling
*/
list_splice_init(&q->timeout_list, &list);

list_for_each_entry_safe(rq, tmp, &list, timeout_list)
blk_abort_request(rq);

/*
* Occasionally, blk_abort_request() will return without
* deleting the element from the list. Make sure we add those back
* instead of leaving them on the local stack list.
*/
list_splice(&list, &q->timeout_list);

spin_unlock_irqrestore(q->queue_lock, flags);

}
EXPORT_SYMBOL_GPL(blk_abort_queue);
1 change: 0 additions & 1 deletion trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ extern bool __blk_end_request_err(struct request *rq, int error);
extern void blk_complete_request(struct request *);
extern void __blk_complete_request(struct request *);
extern void blk_abort_request(struct request *);
extern void blk_abort_queue(struct request_queue *);
extern void blk_unprep_request(struct request *);

/*
Expand Down

0 comments on commit 9ff7e0b

Please sign in to comment.