vfs_rename(9) rename a filesystem object

SYNOPSIS

int vfs_rename(struct inode * old_dir, struct dentry * old_dentry, struct inode * new_dir, struct dentry * new_dentry, struct inode ** delegated_inode);

ARGUMENTS

old_dir

parent of source

old_dentry

source

new_dir

parent of destination

new_dentry

destination

delegated_inode

returns an inode needing a delegation break

DESCRIPTION

The caller must hold multiple mutexes--see lock_rename).

If vfs_rename discovers a delegation in need of breaking at either the source or destination, 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 all locks 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.

COPYRIGHT