From patchwork Sat Aug 4 07:45:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 1273051 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CEA55DF24C for ; Sat, 4 Aug 2012 07:46:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751881Ab2HDHpK (ORCPT ); Sat, 4 Aug 2012 03:45:10 -0400 Received: from mga11.intel.com ([192.55.52.93]:60649 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750695Ab2HDHpJ (ORCPT ); Sat, 4 Aug 2012 03:45:09 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 04 Aug 2012 00:45:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="193141061" Received: from unknown (HELO wfg-t420.sh.intel.com) ([10.255.20.172]) by fmsmga001.fm.intel.com with ESMTP; 04 Aug 2012 00:45:06 -0700 Received: from wfg by wfg-t420.sh.intel.com with local (Exim 4.77) (envelope-from ) id 1SxZ2k-0003i7-7Y; Sat, 04 Aug 2012 15:45:02 +0800 Date: Sat, 4 Aug 2012 15:45:02 +0800 From: Fengguang Wu To: Josef Bacik Cc: Chris Mason , BTRFS FILE SYSTEM , LKML Subject: [PATCH] btrfs: fix second lock in btrfs_delete_delayed_items() Message-ID: <20120804074502.GB13700@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Fix a real bug caught by coccinelle. fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013 Signed-off-by: Fengguang Wu --- fs/btrfs/delayed-inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux.orig/fs/btrfs/delayed-inode.c 2012-08-03 15:36:21.763560787 +0800 +++ linux/fs/btrfs/delayed-inode.c 2012-08-04 15:37:33.370210331 +0800 @@ -1028,9 +1028,10 @@ do_again: btrfs_release_delayed_item(prev); ret = 0; btrfs_release_path(path); - if (curr) + if (curr) { + mutex_unlock(&node->mutex); goto do_again; - else + } else goto delete_fail; }