diff options
Diffstat (limited to 'block/blk-softirq.c')
-rw-r--r-- | block/blk-softirq.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/block/blk-softirq.c b/block/blk-softirq.c index 3a1af551191e..7ab344afb16f 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c | |||
@@ -101,18 +101,7 @@ static struct notifier_block __cpuinitdata blk_cpu_notifier = { | |||
101 | .notifier_call = blk_cpu_notify, | 101 | .notifier_call = blk_cpu_notify, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | /** | 104 | void __blk_complete_request(struct request *req) |
105 | * blk_complete_request - end I/O on a request | ||
106 | * @req: the request being processed | ||
107 | * | ||
108 | * Description: | ||
109 | * Ends all I/O on a request. It does not handle partial completions, | ||
110 | * unless the driver actually implements this in its completion callback | ||
111 | * through requeueing. The actual completion happens out-of-order, | ||
112 | * through a softirq handler. The user must have registered a completion | ||
113 | * callback through blk_queue_softirq_done(). | ||
114 | **/ | ||
115 | void blk_complete_request(struct request *req) | ||
116 | { | 105 | { |
117 | struct request_queue *q = req->q; | 106 | struct request_queue *q = req->q; |
118 | unsigned long flags; | 107 | unsigned long flags; |
@@ -151,6 +140,23 @@ do_local: | |||
151 | 140 | ||
152 | local_irq_restore(flags); | 141 | local_irq_restore(flags); |
153 | } | 142 | } |
143 | |||
144 | /** | ||
145 | * blk_complete_request - end I/O on a request | ||
146 | * @req: the request being processed | ||
147 | * | ||
148 | * Description: | ||
149 | * Ends all I/O on a request. It does not handle partial completions, | ||
150 | * unless the driver actually implements this in its completion callback | ||
151 | * through requeueing. The actual completion happens out-of-order, | ||
152 | * through a softirq handler. The user must have registered a completion | ||
153 | * callback through blk_queue_softirq_done(). | ||
154 | **/ | ||
155 | void blk_complete_request(struct request *req) | ||
156 | { | ||
157 | if (!blk_mark_rq_complete(req)) | ||
158 | __blk_complete_request(req); | ||
159 | } | ||
154 | EXPORT_SYMBOL(blk_complete_request); | 160 | EXPORT_SYMBOL(blk_complete_request); |
155 | 161 | ||
156 | __init int blk_softirq_init(void) | 162 | __init int blk_softirq_init(void) |