gfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 20 Dec 2023 05:21:44 +0000 (05:21 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 20 Dec 2023 11:46:52 +0000 (12:46 +0100)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/export.c

index cf40895233f5a88147d4dff2caf79b38794e40d9..3334c394ce9cbe26969809874a94e79bf068b11b 100644 (file)
@@ -138,8 +138,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb,
                return ERR_PTR(-ESTALE);
        inode = gfs2_lookup_by_inum(sdp, inum->no_addr, inum->no_formal_ino,
                                    GFS2_BLKST_DINODE);
-       if (IS_ERR(inode))
-               return ERR_CAST(inode);
        return d_obtain_alias(inode);
 }