/* get the authorising vnode - this is the specified inode itself if it's a directory or it's the parent directory if the specified inode is a file or symlink */
static struct afs_vnode* afs_get_auth_inode(struct afs_vnode *vnode, struct key *key)
/* get the authorising vnode - this is the specified inode itself if it's a directory or it's the parent directory if the specified inode is a file or symlink */
static struct afs_vnode* afs_get_auth_inode(struct afs_vnode *vnode, struct key *key)
{
	struct afs_vnode *auth_vnode;
	struct inode *auth_inode;
	_enter("");
	if (S_ISDIR(vnode->vfs_inode.i_mode)) {
		auth_inode = igrab(&vnode->vfs_inode);
		ASSERT(auth_inode != NULL);
	} else {
		auth_inode = afs_iget(vnode->vfs_inode.i_sb, key,
				      &vnode->status.parent, NULL, NULL);
		if (IS_ERR(auth_inode))
			return ERR_CAST(auth_inode);
	}
	auth_vnode = AFS_FS_I(auth_inode);
	_leave(" = {%x}", auth_vnode->fid.vnode);
	return auth_vnode;
}