From patchwork Thu Oct 2 16:50:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 5019481 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E4189F32B for ; Thu, 2 Oct 2014 16:50:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A60FA201FA for ; Thu, 2 Oct 2014 16:50:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6A01201F2 for ; Thu, 2 Oct 2014 16:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805AbaJBQuN (ORCPT ); Thu, 2 Oct 2014 12:50:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40185 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbaJBQuM (ORCPT ); Thu, 2 Oct 2014 12:50:12 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4EF46AAF3 for ; Thu, 2 Oct 2014 16:50:11 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id F231ADA877; Thu, 2 Oct 2014 18:50:10 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 06/14] btrfs: fix error labels in init_btrfs_fs Date: Thu, 2 Oct 2014 18:50:10 +0200 Message-Id: X-Mailer: git-send-email 2.1.1 In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP btrfs_interface_init rarely fails but we could leak the prelim_ref slab. Signed-off-by: David Sterba --- fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index b1d2a42f379d..b915d7704f19 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1999,11 +1999,11 @@ static int __init init_btrfs_fs(void) err = btrfs_prelim_ref_init(); if (err) - goto free_prelim_ref; + goto free_delayed_ref; err = btrfs_interface_init(); if (err) - goto free_delayed_ref; + goto free_prelim_ref; btrfs_init_lockdep();