From: Bob Peterson Date: Mon, 8 Jan 2018 15:50:28 -0500 (EST) Subject: [Cluster-devel] [PATCH 03/12] gfs2: Clean up trunc_start error path In-Reply-To: <1732078713.4168841.1515442348230.JavaMail.zimbra@redhat.com> References: <20171222143507.26680-1-agruenba@redhat.com> <20171222143507.26680-4-agruenba@redhat.com> <1732078713.4168841.1515442348230.JavaMail.zimbra@redhat.com> Message-ID: <1746147221.4179585.1515444628870.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- | Hi, | | This isn't quite right. | | error = gfs2_meta_inode_buffer(ip, &dibh); | if (error) | goto out; | ... | out: | brelse(dibh); | | If this returns an error, we'll do double brelse in out. | If gfs2_meta_inode_buffer returns an error, it has released the | buffer_head already. | | Regards, | | Bob Peterson | Red Hat File Systems Never mind. It's not a double-brelse because dibh will still be NULL, and brelse(NULL) is a no-op. Bob Peterson