From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Date: Thu, 23 Jan 2020 13:41:24 +0100 Subject: [Cluster-devel] [PATCH 08/11] gfs2: Move inode generation number check into gfs2_inode_lookup In-Reply-To: <20200120091305.24997-9-agruenba@redhat.com> References: <20200120091305.24997-9-agruenba@redhat.com> <20200120091305.24997-1-agruenba@redhat.com> Message-ID: <20200123124124.28741-1-agruenba@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit As it turns out, this patch needs the following fix. Thanks, Andreas diff --git b/fs/gfs2/inode.c a/fs/gfs2/inode.c index e12e694a1bbb..9c06680c798f 100644 --- b/fs/gfs2/inode.c +++ a/fs/gfs2/inode.c @@ -202,8 +202,12 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type, error = -ESTALE; if (no_formal_ino && ip->i_no_formal_ino && - no_formal_ino != ip->i_no_formal_ino) - goto fail_refresh; + no_formal_ino != ip->i_no_formal_ino) { + if (inode->i_state & I_NEW) + goto fail_refresh; + iput(inode); + return ERR_PTR(error); + } if (inode->i_state & I_NEW) unlock_new_inode(inode);