From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755792AbaEDP60 (ORCPT ); Sun, 4 May 2014 11:58:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36708 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754726AbaEDPmm (ORCPT ); Sun, 4 May 2014 11:42:42 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Chen , Joseph Qi , Srinivas Eeda , Mark Fasheh , Joel Becker , Andrew Morton , Linus Torvalds Subject: [PATCH 3.10 83/86] ocfs2: do not put bh when buffer_uptodate failed Date: Sun, 4 May 2014 11:41:58 -0400 Message-Id: <20140504154151.720512979@linuxfoundation.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <20140504154140.444932005@linuxfoundation.org> References: <20140504154140.444932005@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: alex chen commit f7cf4f5bfe073ad792ab49c04f247626b3e38db6 upstream. Do not put bh when buffer_uptodate failed in ocfs2_write_block and ocfs2_write_super_or_backup, because it will put bh in b_end_io. Otherwise it will hit a warning "VFS: brelse: Trying to free free buffer". Signed-off-by: Alex Chen Reviewed-by: Joseph Qi Reviewed-by: Srinivas Eeda Cc: Mark Fasheh Acked-by: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/buffer_head_io.c | 2 -- 1 file changed, 2 deletions(-) --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c @@ -90,7 +90,6 @@ int ocfs2_write_block(struct ocfs2_super * information for this bh as it's not marked locally * uptodate. */ ret = -EIO; - put_bh(bh); mlog_errno(ret); } @@ -420,7 +419,6 @@ int ocfs2_write_super_or_backup(struct o if (!buffer_uptodate(bh)) { ret = -EIO; - put_bh(bh); mlog_errno(ret); }