Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

block: remove end_{queued|dequeued}_request()

This patch removes end_queued_request() and end_dequeued_request(),
which are no longer used.

As a results, users of __end_request() became only end_request().
So the actual code in __end_request() is moved to end_request()
and __end_request() is removed.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by

Kiyoshi Ueda and committed by
Jens Axboe
d00e29fd 99cd3386

+7 -53
+7 -51
block/blk-core.c
··· 1790 1790 } 1791 1791 } 1792 1792 1793 - static inline void __end_request(struct request *rq, int uptodate, 1794 - unsigned int nr_bytes) 1795 - { 1796 - int error = 0; 1797 - 1798 - if (uptodate <= 0) 1799 - error = uptodate ? uptodate : -EIO; 1800 - 1801 - __blk_end_request(rq, error, nr_bytes); 1802 - } 1803 - 1804 1793 /** 1805 1794 * blk_rq_bytes - Returns bytes left to complete in the entire request 1806 1795 * @rq: the request being processed ··· 1820 1831 EXPORT_SYMBOL_GPL(blk_rq_cur_bytes); 1821 1832 1822 1833 /** 1823 - * end_queued_request - end all I/O on a queued request 1824 - * @rq: the request being processed 1825 - * @uptodate: error value or %0/%1 uptodate flag 1826 - * 1827 - * Description: 1828 - * Ends all I/O on a request, and removes it from the block layer queues. 1829 - * Not suitable for normal I/O completion, unless the driver still has 1830 - * the request attached to the block layer. 1831 - * 1832 - **/ 1833 - void end_queued_request(struct request *rq, int uptodate) 1834 - { 1835 - __end_request(rq, uptodate, blk_rq_bytes(rq)); 1836 - } 1837 - EXPORT_SYMBOL(end_queued_request); 1838 - 1839 - /** 1840 - * end_dequeued_request - end all I/O on a dequeued request 1841 - * @rq: the request being processed 1842 - * @uptodate: error value or %0/%1 uptodate flag 1843 - * 1844 - * Description: 1845 - * Ends all I/O on a request. The request must already have been 1846 - * dequeued using blkdev_dequeue_request(), as is normally the case 1847 - * for most drivers. 1848 - * 1849 - **/ 1850 - void end_dequeued_request(struct request *rq, int uptodate) 1851 - { 1852 - __end_request(rq, uptodate, blk_rq_bytes(rq)); 1853 - } 1854 - EXPORT_SYMBOL(end_dequeued_request); 1855 - 1856 - 1857 - /** 1858 1834 * end_request - end I/O on the current segment of the request 1859 1835 * @req: the request being processed 1860 1836 * @uptodate: error value or %0/%1 uptodate flag ··· 1833 1879 * they have a residual value to account for. For that case this function 1834 1880 * isn't really useful, unless the residual just happens to be the 1835 1881 * full current segment. In other words, don't use this function in new 1836 - * code. Use blk_end_request() or __blk_end_request() to end partial parts 1837 - * of a request, or end_dequeued_request() and end_queued_request() to 1838 - * completely end IO on a dequeued/queued request. 1839 - * 1882 + * code. Use blk_end_request() or __blk_end_request() to end a request. 1840 1883 **/ 1841 1884 void end_request(struct request *req, int uptodate) 1842 1885 { 1843 - __end_request(req, uptodate, req->hard_cur_sectors << 9); 1886 + int error = 0; 1887 + 1888 + if (uptodate <= 0) 1889 + error = uptodate ? uptodate : -EIO; 1890 + 1891 + __blk_end_request(req, error, req->hard_cur_sectors << 9); 1844 1892 } 1845 1893 EXPORT_SYMBOL(end_request); 1846 1894
-2
include/linux/blkdev.h
··· 793 793 extern int blk_end_bidi_request(struct request *rq, int error, 794 794 unsigned int nr_bytes, unsigned int bidi_bytes); 795 795 extern void end_request(struct request *, int); 796 - extern void end_queued_request(struct request *, int); 797 - extern void end_dequeued_request(struct request *, int); 798 796 extern int blk_end_request_callback(struct request *rq, int error, 799 797 unsigned int nr_bytes, 800 798 int (drv_callback)(struct request *));