From patchwork Tue Nov 5 02:12:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 3138621 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD1A6BEEB2 for ; Tue, 5 Nov 2013 02:12:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE5112060A for ; Tue, 5 Nov 2013 02:12:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FF4520604 for ; Tue, 5 Nov 2013 02:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754443Ab3KECM1 (ORCPT ); Mon, 4 Nov 2013 21:12:27 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:42732 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754424Ab3KECM0 (ORCPT ); Mon, 4 Nov 2013 21:12:26 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rA52CO72017881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Nov 2013 02:12:25 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA52CNnm027157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Nov 2013 02:12:23 GMT Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA52CNQ5027152; Tue, 5 Nov 2013 02:12:23 GMT Received: from localhost.localdomain (/10.182.228.124) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Nov 2013 18:12:23 -0800 Date: Tue, 5 Nov 2013 10:12:17 +0800 From: Liu Bo To: majianpeng Cc: linux-btrfs Subject: Re: [BUG]:bad unlock balance detected! Message-ID: <20131105021216.GA15974@localhost.localdomain> Reply-To: bo.li.liu@oracle.com References: <201311050933582618320@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201311050933582618320@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Would you please try the following patch? -liubo From: Liu Bo Subject: [PATCH] Btrfs: fix to use the right trans for async commit @trans has been freed and is undefined, and we should use the trans handle created for async commit instead. Signed-off-by: Liu Bo --- fs/btrfs/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 1, _THIS_IP_); diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 8c81bdc..648d839 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1494,7 +1494,7 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, * Tell lockdep we've released the freeze rwsem, since the * async commit thread will be the one to unlock it. */ - if (trans->type < TRANS_JOIN_NOLOCK) + if (ac->newtrans->type < TRANS_JOIN_NOLOCK) rwsem_release( &root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1],