/* Returns: A NULL-pointer on success, else an negative error code encoded in the return pointer.  */
static struct dentry * vxfs_lookup(struct inode *, struct dentry *, struct nameidata *)
/* Returns: A NULL-pointer on success, else an negative error code encoded in the return pointer.  */
static struct dentry * vxfs_lookup(struct inode *, struct dentry *, struct nameidata *)
{
	struct inode		*ip = NULL;
	ino_t			ino;
	if (dp->d_name.len > VXFS_NAMELEN)
		return ERR_PTR(-ENAMETOOLONG);
	lock_kernel();
	ino = vxfs_inode_by_name(dip, dp);
	if (ino) {
		ip = vxfs_iget(dip->i_sb, ino);
		if (IS_ERR(ip)) {
			unlock_kernel();
			return ERR_CAST(ip);
		}
	}
	unlock_kernel();
	d_add(dp, ip);
	return NULL;
}