/* Normally, the VFS handles the d_move() for the file system, after the ->rename() callback. OCFS2 wants to handle this internally, so the new lock can be created atomically with respect to the cluster.  */
void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target, struct inode *old_dir, struct inode *new_dir)
/* Normally, the VFS handles the d_move() for the file system, after the ->rename() callback. OCFS2 wants to handle this internally, so the new lock can be created atomically with respect to the cluster.  */
void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target, struct inode *old_dir, struct inode *new_dir)
{
	int ret;
	struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb);
	struct inode *inode = dentry->d_inode;
	if (old_dir == new_dir)
		goto out_move;
	ocfs2_dentry_lock_put(osb, dentry->d_fsdata);
	dentry->d_fsdata = NULL;
	ret = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(new_dir)->ip_blkno);
	if (ret)
		mlog_errno(ret);
out_move:
	d_move(dentry, target);
}