'\" t .\" Title: d_splice_alias .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "D_SPLICE_ALIAS" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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" d_splice_alias \- splice a disconnected dentry into the tree if one exists .SH "SYNOPSIS" .HP \w'struct\ dentry\ *\ d_splice_alias('u .BI "struct dentry * d_splice_alias(struct\ inode\ *\ " "inode" ", struct\ dentry\ *\ " "dentry" ");" .SH "ARGUMENTS" .PP \fIinode\fR .RS 4 the inode which may have a disconnected dentry .RE .PP \fIdentry\fR .RS 4 a negative dentry which we want to point to the inode\&. .RE .SH "DESCRIPTION" .PP If inode is a directory and has an IS_ROOT alias, then d_move that in place of the given dentry and return it, else simply d_add the inode to the dentry and return NULL\&. .PP If a non\-IS_ROOT directory is found, the filesystem is corrupt, and we should error out: directories can\*(Aqt have multiple aliases\&. .PP This is needed in the lookup routine of any filesystem that is exportable (via knfsd) so that we can build dcache paths to directories effectively\&. .PP If a dentry was found and moved, then it is returned\&. Otherwise NULL is returned\&. This matches the expected return value of \->lookup\&. .PP Cluster filesystems may call this function with a negative, hashed dentry\&. In that case, we know that the inode will be a regular file, and also this will only occur during atomic_open\&. So we need to check for the dentry being already hashed only in the final case\&. .SH "COPYRIGHT" .br