1D_SPLICE_ALIAS(9)                The Linux VFS               D_SPLICE_ALIAS(9)
2
3
4

NAME

6       d_splice_alias - splice a disconnected dentry into the tree if one
7       exists
8

SYNOPSIS

10       struct dentry * d_splice_alias(struct inode * inode,
11                                      struct dentry * dentry);
12

ARGUMENTS

14       inode
15           the inode which may have a disconnected dentry
16
17       dentry
18           a negative dentry which we want to point to the inode.
19

DESCRIPTION

21       If inode is a directory and has an IS_ROOT alias, then d_move that in
22       place of the given dentry and return it, else simply d_add the inode to
23       the dentry and return NULL.
24
25       If a non-IS_ROOT directory is found, the filesystem is corrupt, and
26

WE SHOULD ERROR OUT

28       directories can't have multiple aliases.
29
30       This is needed in the lookup routine of any filesystem that is
31       exportable (via knfsd) so that we can build dcache paths to directories
32       effectively.
33
34       If a dentry was found and moved, then it is returned. Otherwise NULL is
35       returned. This matches the expected return value of ->lookup.
36
37       Cluster filesystems may call this function with a negative, hashed
38       dentry. In that case, we know that the inode will be a regular file,
39       and also this will only occur during atomic_open. So we need to check
40       for the dentry being already hashed only in the final case.
41
43Kernel Hackers Manual 3.10         June 2019                 D_SPLICE_ALIAS(9)
Impressum