From patchwork Thu Jan 7 02:03:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 71527 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0723FCh018244 for ; Thu, 7 Jan 2010 02:03:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756558Ab0AGCDO (ORCPT ); Wed, 6 Jan 2010 21:03:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756424Ab0AGCDO (ORCPT ); Wed, 6 Jan 2010 21:03:14 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:48787 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756103Ab0AGCDN (ORCPT ); Wed, 6 Jan 2010 21:03:13 -0500 Received: by fxm25 with SMTP id 25so11295779fxm.21 for ; Wed, 06 Jan 2010 18:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=AY/t3hvDbnDlDPzApFoVh9o/mqqUSii2pAxk2AA0UNo=; b=Rh1ts25Gymeymaa+OfxlLZe+pRIGCjfTdCu7Y+As/2pKv3pWU2WjnnVkU280GkQLkI QpDL66db3i1ZBSl5yomIYuW1MT4Z0CAc7Rdpc48c5D8pSsWLsz1Oxm04esjZGoyDhAa1 vQkEsWh5Ga5nWhb0L8lAOv8l6wLy02lTOI+A4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=iVQCE8QTkbMl0hARJMejWH3OhKqw/J3kraAjnLdzumnZyZ6AgPx3pzIzuCo5xLEHEr lY3MA5QeW7dMpQ1DF9q3gEs7nbTUwhXHy/yQvB70ev3tZXQ5+jQE/u38fpc1nQr1QyAq wiU4KlfwPjy16T0NcKLyFA5TTZLHB2wgXoo9k= Received: by 10.103.84.15 with SMTP id m15mr2327153mul.43.1262829792001; Wed, 06 Jan 2010 18:03:12 -0800 (PST) Received: from localhost.localdomain (ppp91-76-135-184.pppoe.mtu-net.ru [91.76.135.184]) by mx.google.com with ESMTPS id 7sm29717623mup.58.2010.01.06.18.03.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 18:03:11 -0800 (PST) From: Alexander Beregalov To: chris.mason@oracle.com Cc: linux-btrfs@vger.kernel.org, Alexander Beregalov Subject: [PATCH] btrfs: free cluster before exit Date: Thu, 7 Jan 2010 05:03:06 +0300 Message-Id: <1262829786-29662-1-git-send-email-a.beregalov@gmail.com> X-Mailer: git-send-email 1.6.6 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index a972868..ed3e4a2 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3281,8 +3281,10 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) return -ENOMEM; path = btrfs_alloc_path(); - if (!path) + if (!path) { + kfree(cluster); return -ENOMEM; + } rc->extents_found = 0; rc->extents_skipped = 0;