<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="inode_8c" kind="file" language="C++">
    <compoundname>inode.c</compoundname>
    <includes refid="include_2vfs_2vfs_8h" local="no">vfs/vfs.h</includes>
    <includes refid="wait_8h" local="no">ubixos/wait.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <incdepgraph>
      <node id="21">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="36">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="50">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="33">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="42">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/fs/vfs/inode.c</label>
        <link refid="inode_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>net/net.h</label>
        <link refid="net_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="44">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="43">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="23">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="39">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="15">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="18">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="41">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="38">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="32">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="37">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="inode_8c_1acf11a8aeb597309da2ce174c2d73034b" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structwait__queue" kindref="compound">wait_queue</ref> *</type>
        <definition>struct wait_queue* inode_wait</definition>
        <argsstring></argsstring>
        <name>inode_wait</name>
        <initializer>= <ref refid="include_2sys_2types_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="34" column="24" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="34" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="inode_8c_1a23b951f962ca9cfcd191252dce9ce24d" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int nr_free_inodes</definition>
        <argsstring></argsstring>
        <name>nr_free_inodes</name>
        <initializer>= 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="36" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="36" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="inode_8c_1afeea7bee50ad07cd23fd7b7b9c70371b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void __wait_on_inode</definition>
        <argsstring>(struct inode *inode)</argsstring>
        <name>__wait_on_inode</name>
        <param>
          <type>struct <ref refid="structinode" kindref="compound">inode</ref> *</type>
          <declname>inode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="96" column="13" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="96" bodyend="115" declfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" declline="39" declcolumn="13"/>
      </memberdef>
      <memberdef kind="function" id="inode_8c_1a378733dcbf0fb08359b9a02145ac8fc3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void iput</definition>
        <argsstring>(struct inode *inode)</argsstring>
        <name>iput</name>
        <param>
          <type>struct <ref refid="structinode" kindref="compound">inode</ref> *</type>
          <declname>inode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="47" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="47" bodyend="94"/>
        <referencedby refid="namei_8c_1adf0c5ab136108b2606b8baba7e12abbe" compoundref="namei_8c" startline="34" endline="50">follow_link</referencedby>
        <referencedby refid="namei_8c_1ad77c16b56493b15a0ffa0f3aedbffb71" compoundref="namei_8c" startline="68" endline="115">lookup</referencedby>
      </memberdef>
      <memberdef kind="function" id="inode_8c_1a32bfcf0bf21dd7e1e696900c3209e9c4" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void unlock_inode</definition>
        <argsstring>(struct inode *inode)</argsstring>
        <name>unlock_inode</name>
        <param>
          <type>struct <ref refid="structinode" kindref="compound">inode</ref> *</type>
          <declname>inode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="138" column="20" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="138" bodyend="141" declfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" declline="40" declcolumn="20"/>
      </memberdef>
      <memberdef kind="function" id="inode_8c_1ab0d49ebfbb1ba5687a8c12936c0a0e0d" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void wait_on_inode</definition>
        <argsstring>(struct inode *inode)</argsstring>
        <name>wait_on_inode</name>
        <param>
          <type>struct <ref refid="structinode" kindref="compound">inode</ref> *</type>
          <declname>inode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="42" column="20" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="42" bodyend="45"/>
      </memberdef>
      <memberdef kind="function" id="inode_8c_1a4292c45577fd3a00ddc811e23f278d7d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void write_inode</definition>
        <argsstring>(struct inode *inode)</argsstring>
        <name>write_inode</name>
        <param>
          <type>struct <ref refid="structinode" kindref="compound">inode</ref> *</type>
          <declname>inode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" line="117" column="13" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" bodystart="117" bodyend="135" declfile="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c" declline="38" declcolumn="13"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="include_2vfs_2vfs_8h" kindref="compound">vfs/vfs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="wait_8h" kindref="compound">ubixos/wait.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="sched_8h" kindref="compound">ubixos/sched.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="comment">//static<sp/>struct<sp/>inode<sp/>*first_inode<sp/>=<sp/>NULL;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structwait__queue" kindref="compound">wait_queue</ref><sp/>*inode_wait<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//static<sp/>int<sp/>nr_inodes<sp/>=<sp/>0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nr_free_inodes<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>write_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>__wait_on_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>unlock_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>wait_on_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1ae3aca8d74205feb53ee3b2fed18f6de3" kindref="member">i_lock</ref>)</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/>__wait_on_inode(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="45"><highlight class="normal">}</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47" refid="inode_8c_1a378733dcbf0fb08359b9a02145ac8fc3" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="inode_8c_1a378733dcbf0fb08359b9a02145ac8fc3" kindref="member">iput</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>)</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/>wait_on_inode(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_IGNORE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1af6da47fa3f89db802bc7039589bbe982" kindref="member">i_count</ref>)<sp/>{</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>printk(</highlight><highlight class="stringliteral">&quot;VFS:<sp/>iput:<sp/>trying<sp/>to<sp/>free<sp/>free<sp/>inode\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>printk(</highlight><highlight class="stringliteral">&quot;VFS:<sp/>device<sp/>%d/%d,<sp/>inode<sp/>%lu,<sp/>mode=0%07o\n&quot;</highlight><highlight class="normal">,<sp/>MAJOR(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a881d617f130ed3797ef9856766dbdc8c" kindref="member">i_rdev</ref>),<sp/>MINOR(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a881d617f130ed3797ef9856766dbdc8c" kindref="member">i_rdev</ref>),<sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8131bb3b2d76d9e8b2353ddd6a453705" kindref="member">i_ino</ref>,<sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1aceb810156528818f5f17fd1918d58456" kindref="member">i_mode</ref>);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a62da92e16379e2f23870256dc390ffff" kindref="member">i_pipe</ref>)</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="i386_2sched_8c_1a0034f099839cccda3a35d72c3f088cb5" kindref="member">wake_up_interruptible</ref>(&amp;<ref refid="pipe__fs_8h_1a31347e078a788d04497fbdac84ec83f2" kindref="member">PIPE_WAIT</ref>(*<ref refid="structinode" kindref="compound">inode</ref>));</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/>repeat:</highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1af6da47fa3f89db802bc7039589bbe982" kindref="member">i_count</ref><sp/>&gt;<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1af6da47fa3f89db802bc7039589bbe982" kindref="member">i_count</ref>--;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><ref refid="i386_2sched_8c_1a63ec7679a323834b440d952457d0b5ef" kindref="member">wake_up</ref>(&amp;inode_wait);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a62da92e16379e2f23870256dc390ffff" kindref="member">i_pipe</ref>)<sp/>{</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>page<sp/>=<sp/>(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/>long)<sp/><ref refid="pipe__fs_8h_1aa0861b0348be87a27260843e3cdd0845" kindref="member">PIPE_BASE</ref>(*<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pipe__fs_8h_1aa0861b0348be87a27260843e3cdd0845" kindref="member">PIPE_BASE</ref><sp/>(*<ref refid="structinode" kindref="compound">inode</ref>)<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="freevirtualpage_8c_1a8f71cc4e67f102b7428516d1d0ea179e" kindref="member">vmm_freeVirtualPage</ref>(page);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref><sp/>&amp;&amp;<sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref><sp/>&amp;&amp;<sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref>-&gt;<ref refid="structsuper__operations_1ac2d5b20c8406fe65285daa09beb32ef5" kindref="member">put_inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref>-&gt;<ref refid="structsuper__operations_1ac2d5b20c8406fe65285daa09beb32ef5" kindref="member">put_inode</ref>(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1aaf3909ab8783e663e30e0f3496b57ea5" kindref="member">i_nlink</ref>)</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8c071b0db1ae2f7301b3119c717a3d95" kindref="member">i_dirt</ref>)<sp/>{</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/>write_inode(<ref refid="structinode" kindref="compound">inode</ref>);<sp/></highlight><highlight class="comment">/*<sp/>we<sp/>can<sp/>sleep<sp/>-<sp/>so<sp/>do<sp/>again<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/>wait_on_inode(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>repeat;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1af6da47fa3f89db802bc7039589bbe982" kindref="member">i_count</ref>--;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/>nr_free_inodes++;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="94"><highlight class="normal">}</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>__wait_on_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structwait__queue" kindref="compound">wait_queue</ref><sp/>wait<sp/>=<sp/>{<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>};</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><ref refid="i386_2sched_8c_1afb3a51cdf92a160e2706fd1a4d008496" kindref="member">add_wait_queue</ref>(&amp;<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a2428445b93b43ebf63ca8aac15b1f381" kindref="member">i_wait</ref>,<sp/>&amp;wait);</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/>repeat:</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1ab085a40e09975d9ebf55b393f9549710" kindref="member">state</ref><sp/>=<sp/><ref refid="sched_8h_1a3fb333b67375561d327e9b5a8ffa03b9a9ed0e690669f30a0570019c1386d55fe" kindref="member">UNINTERRUPTIBLE</ref>;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1ae3aca8d74205feb53ee3b2fed18f6de3" kindref="member">i_lock</ref>)<sp/>{</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2sched_8c_1a08933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//schedule();</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>repeat;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><ref refid="i386_2sched_8c_1a2d90a1e80b09cc4afcce607bfe2802ed" kindref="member">remove_wait_queue</ref>(&amp;<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a2428445b93b43ebf63ca8aac15b1f381" kindref="member">i_wait</ref>,<sp/>&amp;wait);</highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1ab085a40e09975d9ebf55b393f9549710" kindref="member">state</ref><sp/>=<sp/><ref refid="sched_8h_1a3fb333b67375561d327e9b5a8ffa03b9a1061be6c3fb88d32829cba6f6b2be304" kindref="member">RUNNING</ref>;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal">}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>write_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8c071b0db1ae2f7301b3119c717a3d95" kindref="member">i_dirt</ref>)</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>wait_on_inode(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8c071b0db1ae2f7301b3119c717a3d95" kindref="member">i_dirt</ref>)</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref><sp/>||<sp/>!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref><sp/>||<sp/>!<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref>-&gt;<ref refid="structsuper__operations_1a600df86ad28345eabc0e69ca919e8827" kindref="member">write_inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8c071b0db1ae2f7301b3119c717a3d95" kindref="member">i_dirt</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1ae3aca8d74205feb53ee3b2fed18f6de3" kindref="member">i_lock</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a8e3ca37fd8f709720380afd9f60d0e71" kindref="member">i_sb</ref>-&gt;<ref refid="structsuper__block_1ad9e59d58fdb5ede31dc4aac235d2ab53" kindref="member">s_op</ref>-&gt;<ref refid="structsuper__operations_1a600df86ad28345eabc0e69ca919e8827" kindref="member">write_inode</ref>(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>unlock_inode(<ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="135"><highlight class="normal">}</highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>unlock_inode(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structinode" kindref="compound">inode</ref><sp/>*<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1ae3aca8d74205feb53ee3b2fed18f6de3" kindref="member">i_lock</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><ref refid="i386_2sched_8c_1a63ec7679a323834b440d952457d0b5ef" kindref="member">wake_up</ref>(&amp;<ref refid="structinode" kindref="compound">inode</ref>-&gt;<ref refid="structinode_1a2428445b93b43ebf63ca8aac15b1f381" kindref="member">i_wait</ref>);</highlight></codeline>
<codeline lineno="141"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/vfs/inode.c"/>
  </compounddef>
</doxygen>
