'\" t .\" Title: iget5_locked .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "IGET5_LOCKED" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "The Linux VFS" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" iget5_locked \- obtain an inode from a mounted file system .SH "SYNOPSIS" .HP \w'struct\ inode\ *\ iget5_locked('u .BI "struct inode * iget5_locked(struct\ super_block\ *\ " "sb" ", unsigned\ long\ " "hashval" ", int\ (*" "test" ")\ (struct\ inode\ *,\ void\ *), int\ (*" "set" ")\ (struct\ inode\ *,\ void\ *), void\ *\ " "data" ");" .SH "ARGUMENTS" .PP \fIstruct super_block * sb\fR .RS 4 super block of file system .RE .PP \fIunsigned long hashval\fR .RS 4 hash value (usually inode number) to get .RE .PP \fIint (*)(struct inode *, void *) test\fR .RS 4 callback used for comparisons between inodes .RE .PP \fIint (*)(struct inode *, void *) set\fR .RS 4 callback used to initialize a new struct inode .RE .PP \fIvoid * data\fR .RS 4 opaque data pointer to pass to \fItest\fR and \fIset\fR .RE .SH "DESCRIPTION" .PP Search for the inode specified by \fIhashval\fR and \fIdata\fR in the inode cache, and if present it is return it with an increased reference count\&. This is a generalized version of \fBiget_locked\fR for file systems where the inode number is not sufficient for unique identification of an inode\&. .PP If the inode is not in cache, allocate a new inode and return it locked, hashed, and with the I_NEW flag set\&. The file system gets to fill it in before unlocking it via \fBunlock_new_inode\fR\&. .PP Note both \fItest\fR and \fIset\fR are called with the inode_hash_lock held, so can\*(Aqt sleep\&. .SH "COPYRIGHT" .br