From patchwork Thu Feb 11 08:06:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 78652 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 o1B87h7f010361 for ; Thu, 11 Feb 2010 08:07:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752049Ab0BKIHm (ORCPT ); Thu, 11 Feb 2010 03:07:42 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:56650 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751943Ab0BKIHl (ORCPT ); Thu, 11 Feb 2010 03:07:41 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 5A80A170133; Thu, 11 Feb 2010 16:07:38 +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 o1B86qiN011667; Thu, 11 Feb 2010 16:06:52 +0800 Received: from [127.0.0.1] (unknown [10.167.141.211]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id B88FED47CB; Thu, 11 Feb 2010 16:09:11 +0800 (CST) Message-ID: <4B73BAA2.1050106@cn.fujitsu.com> Date: Thu, 11 Feb 2010 16:06:58 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Chris Mason CC: Linux Btrfs Subject: [PATCH] btrfs: fix problem of wrong jump after the error occured 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, 11 Feb 2010 08:07:43 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 4deb280..4f230e4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4501,7 +4501,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) err = btrfs_find_free_objectid(trans, root, dir->i_ino, &objectid); if (err) { err = -ENOSPC; - goto out_unlock; + goto out_fail; } inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,