From patchwork Fri Feb 18 09:21:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 573841 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1I9I76C031678 for ; Fri, 18 Feb 2011 09:18:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757752Ab1BRJSA (ORCPT ); Fri, 18 Feb 2011 04:18:00 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:56797 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753508Ab1BRJR6 (ORCPT ); Fri, 18 Feb 2011 04:17:58 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 22680170116; Fri, 18 Feb 2011 17:17:57 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p1I9CGnY013974; Fri, 18 Feb 2011 17:12:16 +0800 Received: from [10.167.225.64] ([10.167.225.64]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011021817165867-170261 ; Fri, 18 Feb 2011 17:16:58 +0800 Message-ID: <4D5E3A0D.3070101@cn.fujitsu.com> Date: Fri, 18 Feb 2011 17:21:17 +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.2.9) Gecko/20100921 Fedora/3.1.4-1.fc14 Thunderbird/3.1.4 MIME-Version: 1.0 To: Chris Mason CC: Linux Btrfs , Ito Subject: [PATCH] btrfs: fix not enough reserved space X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-02-18 17:16:58, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-02-18 17:16:59, Serialize complete at 2011-02-18 17:16:59 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 18 Feb 2011 09:18:25 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8d392ed..d692df9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4823,10 +4823,11 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, goto fail; /* - * 1 item for inode ref + * 2 items for inode and inode ref * 2 items for dir items + * 1 item for parent inode */ - trans = btrfs_start_transaction(root, 3); + trans = btrfs_start_transaction(root, 5); if (IS_ERR(trans)) { err = PTR_ERR(trans); goto fail;