From patchwork Sat May 29 09:46:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103027 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 o4T9lF9U026979 for ; Sat, 29 May 2010 09:47:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755989Ab0E2JrN (ORCPT ); Sat, 29 May 2010 05:47:13 -0400 Received: from ey-out-2122.google.com ([74.125.78.25]:25828 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173Ab0E2JrM (ORCPT ); Sat, 29 May 2010 05:47:12 -0400 Received: by ey-out-2122.google.com with SMTP id d26so122010eyd.19 for ; Sat, 29 May 2010 02:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=xOZeqENvUuD0uBm4/pKPZkmAjIWIQbzdW7xVb5bAP8g=; b=xvPx5uFMif5RNURuFUz/qMluJj6nEwIc00St63PiWi0Q6oczg6Ts6thgDFfVRpNc9D 5mD0VU2WyBd444Hs9tf3PvQjzBTmwChFHQ/ohDlFQ9D2AKpwSA1m4QeVomMYYofAAr7m OcGGCroJznzR4a+OpiQe3z2mKWm8QB2yhE8Lo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=by/IBxq/lua64uzM40AuELlLupd+83cM6oUsKvcQA0Yrqy++5JVs6Hz7bI85bXOwYJ POOYKtqdUg6Va6qkccLyiZbxXEU9DTZ2oBpj3LvMuz2ESAP72jVKTLf4G2me5P/lPjMz BZhXGZ1EIlAZXM4k2eNcm8y2jebw6GAIGriNQ= Received: by 10.213.29.200 with SMTP id r8mr863976ebc.75.1275126427554; Sat, 29 May 2010 02:47:07 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 13sm1697897ewy.13.2010.05.29.02.47.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:47:07 -0700 (PDT) Date: Sat, 29 May 2010 11:46:47 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Yan Zheng , Josef Bacik , Sage Weil , Chris Mason , kernel-janitors@vger.kernel.org Subject: [patch 7/11] btrfs: unwind after btrfs_start_transaction() errors Message-ID: <20100529094647.GH5483@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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]); Sat, 29 May 2010 09:47:15 +0000 (UTC) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 4cdb98c..9f9a1d9 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1280,7 +1280,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { err = PTR_ERR(trans); - goto out; + goto out_up_write; } trans->block_rsv = &root->fs_info->global_block_rsv;