From patchwork Sat Jan 5 07:43:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] ext4: release buffer in failed path in dx_probe() Date: Fri, 04 Jan 2013 21:43:00 -0000 From: Guo Chao X-Patchwork-Id: 209646 Message-Id: <1357371781-18194-2-git-send-email-yan@linux.vnet.ibm.com> To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, "Darrick J. Wong" If checksum fails, we should also release the buffer read from previous iteration. Cc: Darrick J. Wong Signed-off-by: Guo Chao Acked-by: Darrick J. Wong --- fs/ext4/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 843e29f..e249a47 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -722,7 +722,7 @@ dx_probe(const struct qstr *d_name, struct inode *dir, ext4_warning(dir->i_sb, "Node failed checksum"); brelse(bh); *err = ERR_BAD_DX_DIR; - goto fail; + goto fail2; } set_buffer_verified(bh);