aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-22 22:05:18 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 01:37:34 -0400
commit0b302d5aa7975006fa2ec3d66386610b9b36c669 (patch)
treebba5de7b377ad167c4291cbdfd203ca7616d696d /block
parent158dbda0068e63c7cce7bd47c123bd1dfa5a902c (diff)
block: kill blk_end_request_callback()
With recent IDE updates, blk_end_request_callback() doesn't have any user now. Kill it. [ Impact: removal of unused convoluted interface ] Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c48
1 files changed, 3 insertions, 45 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 678ede23ed0a..2f277ea0e599 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1971,10 +1971,6 @@ static void end_that_request_last(struct request *req, int error)
1971 * @error: %0 for success, < %0 for error 1971 * @error: %0 for success, < %0 for error
1972 * @nr_bytes: number of bytes to complete @rq 1972 * @nr_bytes: number of bytes to complete @rq
1973 * @bidi_bytes: number of bytes to complete @rq->next_rq 1973 * @bidi_bytes: number of bytes to complete @rq->next_rq
1974 * @drv_callback: function called between completion of bios in the request
1975 * and completion of the request.
1976 * If the callback returns non %0, this helper returns without
1977 * completion of the request.
1978 * 1974 *
1979 * Description: 1975 * Description:
1980 * Ends I/O on a number of bytes attached to @rq and @rq->next_rq. 1976 * Ends I/O on a number of bytes attached to @rq and @rq->next_rq.
@@ -1985,8 +1981,7 @@ static void end_that_request_last(struct request *req, int error)
1985 * %1 - this request is not freed yet, it still has pending buffers. 1981 * %1 - this request is not freed yet, it still has pending buffers.
1986 **/ 1982 **/
1987static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes, 1983static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
1988 unsigned int bidi_bytes, 1984 unsigned int bidi_bytes)
1989 int (drv_callback)(struct request *))
1990{ 1985{
1991 struct request_queue *q = rq->q; 1986 struct request_queue *q = rq->q;
1992 unsigned long flags = 0UL; 1987 unsigned long flags = 0UL;
@@ -1994,10 +1989,6 @@ static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
1994 if (end_that_request_data(rq, error, nr_bytes, bidi_bytes)) 1989 if (end_that_request_data(rq, error, nr_bytes, bidi_bytes))
1995 return 1; 1990 return 1;
1996 1991
1997 /* Special feature for tricky drivers */
1998 if (drv_callback && drv_callback(rq))
1999 return 1;
2000
2001 add_disk_randomness(rq->rq_disk); 1992 add_disk_randomness(rq->rq_disk);
2002 1993
2003 spin_lock_irqsave(q->queue_lock, flags); 1994 spin_lock_irqsave(q->queue_lock, flags);
@@ -2023,7 +2014,7 @@ static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
2023 **/ 2014 **/
2024int blk_end_request(struct request *rq, int error, unsigned int nr_bytes) 2015int blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
2025{ 2016{
2026 return blk_end_io(rq, error, nr_bytes, 0, NULL); 2017 return blk_end_io(rq, error, nr_bytes, 0);
2027} 2018}
2028EXPORT_SYMBOL_GPL(blk_end_request); 2019EXPORT_SYMBOL_GPL(blk_end_request);
2029 2020
@@ -2070,7 +2061,7 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
2070int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes, 2061int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes,
2071 unsigned int bidi_bytes) 2062 unsigned int bidi_bytes)
2072{ 2063{
2073 return blk_end_io(rq, error, nr_bytes, bidi_bytes, NULL); 2064 return blk_end_io(rq, error, nr_bytes, bidi_bytes);
2074} 2065}
2075EXPORT_SYMBOL_GPL(blk_end_bidi_request); 2066EXPORT_SYMBOL_GPL(blk_end_bidi_request);
2076 2067
@@ -2131,39 +2122,6 @@ void blk_update_request(struct request *rq, int error, unsigned int nr_bytes)
2131} 2122}
2132EXPORT_SYMBOL_GPL(blk_update_request); 2123EXPORT_SYMBOL_GPL(blk_update_request);
2133 2124
2134/**
2135 * blk_end_request_callback - Special helper function for tricky drivers
2136 * @rq: the request being processed
2137 * @error: %0 for success, < %0 for error
2138 * @nr_bytes: number of bytes to complete
2139 * @drv_callback: function called between completion of bios in the request
2140 * and completion of the request.
2141 * If the callback returns non %0, this helper returns without
2142 * completion of the request.
2143 *
2144 * Description:
2145 * Ends I/O on a number of bytes attached to @rq.
2146 * If @rq has leftover, sets it up for the next range of segments.
2147 *
2148 * This special helper function is used only for existing tricky drivers.
2149 * (e.g. cdrom_newpc_intr() of ide-cd)
2150 * This interface will be removed when such drivers are rewritten.
2151 * Don't use this interface in other places anymore.
2152 *
2153 * Return:
2154 * %0 - we are done with this request
2155 * %1 - this request is not freed yet.
2156 * this request still has pending buffers or
2157 * the driver doesn't want to finish this request yet.
2158 **/
2159int blk_end_request_callback(struct request *rq, int error,
2160 unsigned int nr_bytes,
2161 int (drv_callback)(struct request *))
2162{
2163 return blk_end_io(rq, error, nr_bytes, 0, drv_callback);
2164}
2165EXPORT_SYMBOL_GPL(blk_end_request_callback);
2166
2167void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 2125void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
2168 struct bio *bio) 2126 struct bio *bio)
2169{ 2127{