vfs_link(9)

vfs_link9

Create a new link

Usage

int vfs_link(struct dentry * old_dentry, struct inode * dir, struct dentry * new_dentry, struct inode ** delegated_inode);

Arguments

old_dentry

object to be linked

dir

new parent

new_dentry

where to create the new link

delegated_inode

returns inode needing a delegation break

Overview

The caller must hold dir->i_mutex

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.

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.

Releases

2 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.