1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>blk_release_queue</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="blkdev.html" title="Chapter 14. Block Devices"><link rel="prev" href="API-blk-rq-map-kern.html" title="blk_rq_map_kern"><link rel="next" href="API-blk-queue-prep-rq.html" title="blk_queue_prep_rq"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">blk_release_queue</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-blk-rq-map-kern.html">Prev</a> </td><th width="60%" align="center">Chapter 14. Block Devices</th><td width="20%" align="right"> <a accesskey="n" href="API-blk-queue-prep-rq.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-blk-release-queue"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>blk_release_queue — 2 release a <span class="structname">struct request_queue</span> when it is no longer needed 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">blk_release_queue </b>(</code></td><td>struct kobject * <var class="pdparam">kobj</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1128330668"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>kobj</code></em></span></dt><dd><p> 4 the kobj belonging to the request queue to be released 5 </p></dd></dl></div></div><div class="refsect1"><a name="idp1128332316"></a><h2>Description</h2><p> 6 blk_release_queue is the pair to <code class="function">blk_init_queue</code> or 7 <code class="function">blk_queue_make_request</code>. It should be called when a request queue is 8 being released; typically when a block device is being de-registered. 9 Currently, its primary task it to free all the <span class="structname">struct request</span> 10 structures that were allocated to the queue and the queue itself. 11</p></div><div class="refsect1"><a name="idp1128334156"></a><h2>Note</h2><p> 12 The low level driver must have finished any outstanding requests first 13 via <code class="function">blk_cleanup_queue</code>. 14</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-blk-rq-map-kern.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="blkdev.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-blk-queue-prep-rq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">blk_rq_map_kern</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">blk_queue_prep_rq</span></td></tr></table></div></body></html> 15