1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>bio_associate_current</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="other_functions.html" title="Other Functions"><link rel="prev" href="API-bio-associate-blkcg.html" title="bio_associate_blkcg"><link rel="next" href="API-seq-open.html" title="seq_open"></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">bio_associate_current</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-bio-associate-blkcg.html">Prev</a> </td><th width="60%" align="center">Other Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-seq-open.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-bio-associate-current"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bio_associate_current — 
2     associate a bio with <code class="constant">current</code>
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">int <b class="fsfunc">bio_associate_current </b>(</code></td><td>struct bio * <var class="pdparam">bio</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.3.7.44.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>bio</code></em></span></dt><dd><p>
4     target bio
5    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.7.44.6"></a><h2>Description</h2><p>
6   Associate <em class="parameter"><code>bio</code></em> with <code class="constant">current</code> if it hasn't been associated yet.  Block
7   layer will treat <em class="parameter"><code>bio</code></em> as if it were issued by <code class="constant">current</code> no matter which
8   task actually issues it.
9   </p><p>
10
11   This function takes an extra reference of <em class="parameter"><code>task</code></em>'s io_context and blkcg
12   which will be put when <em class="parameter"><code>bio</code></em> is released.  The caller must own <em class="parameter"><code>bio</code></em>,
13   ensure <code class="constant">current-</code>&gt;io_context exists, and is responsible for synchronizing
14   calls to this function.
15</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-bio-associate-blkcg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="other_functions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-seq-open.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">bio_associate_blkcg</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">seq_open</span></td></tr></table></div></body></html>
16