vfs_rename — rename a filesystem object
int vfs_rename ( | struct inode * old_dir, |
| struct dentry * old_dentry, | |
| struct inode * new_dir, | |
| struct dentry * new_dentry, | |
struct inode ** delegated_inode); |
old_dirparent of source
old_dentrysource
new_dirparent of destination
new_dentrydestination
delegated_inodereturns an inode needing a delegation break
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.