From 64c166821e034dda14e7a1a2d648347662054e0e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 20 Dec 2023 05:22:29 +0000 Subject: kernfs: d_obtain_alias(NULL) will do the right thing... Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20231220052229.GH1674809@ZenIV Signed-off-by: Greg Kroah-Hartman --- fs/kernfs/mount.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 4628edde2e7e..0c93cad0f0ac 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -125,9 +125,6 @@ static struct dentry *__kernfs_fh_to_dentry(struct super_block *sb, inode = kernfs_get_inode(sb, kn); kernfs_put(kn); - if (!inode) - return ERR_PTR(-ESTALE); - return d_obtain_alias(inode); } -- cgit