From: Al Viro <viro@xxxxxxxxxxxxxxxxxx> simpler logics in callers that way Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> --- fs/afs/dir.c | 2 -- fs/afs/dynroot.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 3099349cedfa..ff6738787fcd 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -865,8 +865,6 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, inode = afs_do_lookup(dir, dentry, 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; diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index 40fea59067b3..1e27a0171357 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -83,7 +83,7 @@ struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir) out: _leave("= %d", ret); - return ERR_PTR(ret); + return ret == -ENOENT ? NULL : ERR_PTR(ret); } /* @@ -160,9 +160,6 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr 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); } -- 2.11.0