'\" t .\" Title: vfs_link .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "VFS_LINK" "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" vfs_link \- create a new link .SH "SYNOPSIS" .HP \w'int\ vfs_link('u .BI "int vfs_link(struct\ dentry\ *\ " "old_dentry" ", struct\ inode\ *\ " "dir" ", struct\ dentry\ *\ " "new_dentry" ", struct\ inode\ **\ " "delegated_inode" ");" .SH "ARGUMENTS" .PP \fIold_dentry\fR .RS 4 object to be linked .RE .PP \fIdir\fR .RS 4 new parent .RE .PP \fInew_dentry\fR .RS 4 where to create the new link .RE .PP \fIdelegated_inode\fR .RS 4 returns inode needing a delegation break .RE .SH "DESCRIPTION" .PP The caller must hold dir\->i_mutex .PP If vfs_link discovers a delegation on the to\-be\-linked file in need of breaking, it will return \-EWOULDBLOCK and return a reference to the inode in delegated_inode\&. The caller should then break the delegation and retry\&. Because breaking a delegation may take a long time, the caller should drop the i_mutex before doing so\&. .PP Alternatively, a caller may pass NULL for delegated_inode\&. This may be appropriate for callers that expect the underlying filesystem not to be NFS exported\&. .SH "COPYRIGHT" .br