1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>fcntl_getlease</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="file_locks.html" title="File Locks"><link rel="prev" href="API-locks-mandatory-locked.html" title="locks_mandatory_locked"><link rel="next" href="API-check-conflicting-open.html" title="check_conflicting_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">fcntl_getlease</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-locks-mandatory-locked.html">Prev</a>&#160;</td><th width="60%" align="center">File Locks</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-check-conflicting-open.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-fcntl-getlease"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>fcntl_getlease &#8212; 
2     Enquire what lease is currently active
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">fcntl_getlease </b>(</code></td><td>struct file * <var class="pdparam">filp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1102075396"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>filp</code></em></span></dt><dd><p>
4     the file
5    </p></dd></dl></div></div><div class="refsect1"><a name="idp1102076924"></a><h2>Description</h2><p>
6   The value returned by this function will be one of
7   (if no lease break is pending):
8   </p><p>
9
10   <code class="constant">F_RDLCK</code> to indicate a shared lease is held.
11   </p><p>
12
13   <code class="constant">F_WRLCK</code> to indicate an exclusive lease is held.
14   </p><p>
15
16   <code class="constant">F_UNLCK</code> to indicate no lease is held.
17   </p><p>
18
19   (if a lease break is pending):
20   </p><p>
21
22   <code class="constant">F_RDLCK</code> to indicate an exclusive lease needs to be
23   changed to a shared lease (or removed).
24   </p><p>
25
26   <code class="constant">F_UNLCK</code> to indicate the lease needs to be removed.
27</p></div><div class="refsect1"><a name="idp1102079676"></a><h2>XXX</h2><p>
28   sfr &amp; willy disagree over whether F_INPROGRESS
29   should be returned to userspace.
30</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-locks-mandatory-locked.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="file_locks.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-check-conflicting-open.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">locks_mandatory_locked</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">check_conflicting_open</span></td></tr></table></div></body></html>
31