1VFS_LINK(9) The Linux VFS VFS_LINK(9)
2
3
4
6 vfs_link - create a new link
7
9 int vfs_link(struct dentry * old_dentry, struct inode * dir,
10 struct dentry * new_dentry,
11 struct inode ** delegated_inode);
12
14 old_dentry
15 object to be linked
16
17 dir
18 new parent
19
20 new_dentry
21 where to create the new link
22
23 delegated_inode
24 returns inode needing a delegation break
25
27 The caller must hold dir->i_mutex
28
29 If vfs_link discovers a delegation on the to-be-linked file in need of
30 breaking, it will return -EWOULDBLOCK and return a reference to the
31 inode in delegated_inode. The caller should then break the delegation
32 and retry. Because breaking a delegation may take a long time, the
33 caller should drop the i_mutex before doing so.
34
35 Alternatively, a caller may pass NULL for delegated_inode. This may be
36 appropriate for callers that expect the underlying filesystem not to be
37 NFS exported.
38
40Kernel Hackers Manual 3.10 June 2019 VFS_LINK(9)