key_put(key);
if (inode == ERR_PTR(-ENOENT)) {
inode = afs_try_auto_mntpt(dentry, dir);
- if (inode == ERR_PTR(-ENOENT))
- inode = NULL;
} else {
dentry->d_fsdata =
(void *)(unsigned long)dvnode->status.data_version;
out:
_leave("= %d", ret);
- return ERR_PTR(ret);
+ return ret == -ENOENT ? NULL : ERR_PTR(ret);
}
/*
static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags)
{
- struct afs_vnode *vnode;
- struct inode *inode;
-
- vnode = AFS_FS_I(dir);
-
_enter("%pd", dentry);
ASSERTCMP(d_inode(dentry), ==, NULL);
memcmp(dentry->d_name.name, "@cell", 5) == 0)
return afs_lookup_atcell(dentry);
- inode = afs_try_auto_mntpt(dentry, dir);
- if (inode == ERR_PTR(-ENOENT))
- inode = NULL;
-
- return d_splice_alias(inode, dentry);
+ return d_splice_alias(afs_try_auto_mntpt(dentry, dir), dentry);
}
const struct inode_operations afs_dynroot_inode_operations = {