From patchwork Thu Jul 29 08:29:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 115019 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6T95qAB028819 for ; Thu, 29 Jul 2010 09:06:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755406Ab0G2JGN (ORCPT ); Thu, 29 Jul 2010 05:06:13 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:62634 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754769Ab0G2JEq (ORCPT ); Thu, 29 Jul 2010 05:04:46 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 77CF3170136; Thu, 29 Jul 2010 17:04:44 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o6T91kQY016068; Thu, 29 Jul 2010 17:01:46 +0800 Received: from [10.167.141.211] (unknown [10.167.141.211]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 444CB14C00C; Thu, 29 Jul 2010 17:05:23 +0800 (CST) Message-ID: <4C513BF6.5030906@cn.fujitsu.com> Date: Thu, 29 Jul 2010 16:29:42 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: Chris Mason , Yan Zheng CC: Linux Btrfs , Linux Kernel Subject: [PATCH 4/7] Btrfs: fix increasing num_workers_starting twice Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 29 Jul 2010 09:06:38 +0000 (UTC) diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 7ec1409..eb3ec2d 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -84,11 +84,14 @@ struct worker_start { struct btrfs_workers *queue; }; +static int __btrfs_start_workers(struct btrfs_workers *workers, + int num_workers); + static void start_new_worker_func(struct btrfs_work *work) { struct worker_start *start; start = container_of(work, struct worker_start, work); - btrfs_start_workers(start->queue, 1); + __btrfs_start_workers(start->queue, 1); kfree(start); }