1IGET5_LOCKED(9) The Linux VFS IGET5_LOCKED(9)
2
3
4
6 iget5_locked - obtain an inode from a mounted file system
7
9 struct inode * iget5_locked(struct super_block * sb,
10 unsigned long hashval,
11 int (*test) (struct inode *, void *),
12 int (*set) (struct inode *, void *),
13 void * data);
14
16 sb
17 super block of file system
18
19 hashval
20 hash value (usually inode number) to get
21
22 test
23 callback used for comparisons between inodes
24
25 set
26 callback used to initialize a new struct inode
27
28 data
29 opaque data pointer to pass to test and set
30
32 iget5_locked uses ifind to search for the inode specified by hashval
33 and data in the inode cache and if present it is returned with an
34 increased reference count. This is a generalized version of iget_locked
35 for file systems where the inode number is not sufficient for unique
36 identification of an inode.
37
38 If the inode is not in cache, get_new_inode is called to allocate a new
39 inode and this is returned locked, hashed, and with the I_NEW flag set.
40 The file system gets to fill it in before unlocking it via
41 unlock_new_inode.
42
43 Note both test and set are called with the inode_lock held, so canĀ“t
44 sleep.
45
47Kernel Hackers Manual 2.6. June 2019 IGET5_LOCKED(9)