1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>unmap_mapping_range</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="ch04s03.html" title="More Memory Management Functions"><link rel="prev" href="API-vm-iomap-memory.html" title="vm_iomap_memory"><link rel="next" href="API-follow-pfn.html" title="follow_pfn"></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">unmap_mapping_range</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-vm-iomap-memory.html">Prev</a> </td><th width="60%" align="center">More Memory Management Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-follow-pfn.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-unmap-mapping-range"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>unmap_mapping_range — 2 unmap the portion of all mmaps in the specified address_space corresponding to the specified page range in the underlying file. 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">unmap_mapping_range </b>(</code></td><td>struct address_space * <var class="pdparam">mapping</var>, </td></tr><tr><td> </td><td>loff_t const <var class="pdparam">holebegin</var>, </td></tr><tr><td> </td><td>loff_t const <var class="pdparam">holelen</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">even_cows</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1124324308"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>mapping</code></em></span></dt><dd><p> 4 the address space containing mmaps to be unmapped. 5 </p></dd><dt><span class="term"><em class="parameter"><code>holebegin</code></em></span></dt><dd><p> 6 byte in first page to unmap, relative to the start of 7 the underlying file. This will be rounded down to a PAGE_SIZE 8 boundary. Note that this is different from <code class="function">truncate_pagecache</code>, which 9 must keep the partial page. In contrast, we must get rid of 10 partial pages. 11 </p></dd><dt><span class="term"><em class="parameter"><code>holelen</code></em></span></dt><dd><p> 12 size of prospective hole in bytes. This will be rounded 13 up to a PAGE_SIZE boundary. A holelen of zero truncates to the 14 end of the file. 15 </p></dd><dt><span class="term"><em class="parameter"><code>even_cows</code></em></span></dt><dd><p> 16 1 when truncating a file, unmap even private COWed pages; 17 but 0 when invalidating pagecache, don't throw away private data. 18 </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-vm-iomap-memory.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-follow-pfn.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">vm_iomap_memory</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">follow_pfn</span></td></tr></table></div></body></html> 19