From patchwork Wed Feb 24 07:12:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 81614 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1O7CB4a012177 for ; Wed, 24 Feb 2010 07:12:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394Ab0BXHMK (ORCPT ); Wed, 24 Feb 2010 02:12:10 -0500 Received: from mga14.intel.com ([143.182.124.37]:21726 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755097Ab0BXHMI (ORCPT ); Wed, 24 Feb 2010 02:12:08 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 23 Feb 2010 23:12:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,530,1262592000"; d="scan'208";a="247459828" Received: from sli10-conroe.sh.intel.com (HELO sli10-desk.sh.intel.com) ([10.239.13.164]) by azsmga001.ch.intel.com with ESMTP; 23 Feb 2010 23:12:06 -0800 Received: from david by sli10-desk.sh.intel.com with local (Exim 4.69) (envelope-from ) id 1NkBPh-0004T8-K5; Wed, 24 Feb 2010 15:12:05 +0800 Date: Wed, 24 Feb 2010 15:12:05 +0800 From: Shaohua Li To: chris.mason@oracle.com, linux-btrfs@vger.kernel.org Subject: [RFC] remove delalloc accounting for __btrfs_remove_ordered_extent Message-ID: <20100224071205.GA14237@sli10-desk.sh.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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]); Wed, 24 Feb 2010 07:12:12 +0000 (UTC) diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 5c2a9e7..eb7a2f9 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -306,12 +306,6 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, tree->last = NULL; set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); - spin_lock(&BTRFS_I(inode)->accounting_lock); - BTRFS_I(inode)->outstanding_extents--; - spin_unlock(&BTRFS_I(inode)->accounting_lock); - btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, - inode, 1); - spin_lock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); list_del_init(&entry->root_extent_list);