From patchwork Tue Jun 14 18:25:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 879792 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5EIPlpf006976 for ; Tue, 14 Jun 2011 18:25:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751850Ab1FNSZo (ORCPT ); Tue, 14 Jun 2011 14:25:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64238 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145Ab1FNSZo (ORCPT ); Tue, 14 Jun 2011 14:25:44 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5EIPihg026479 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Jun 2011 14:25:44 -0400 Received: from localhost.localdomain.com (vpn-10-46.rdu.redhat.com [10.11.10.46]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5EIPgLV032284 for ; Tue, 14 Jun 2011 14:25:42 -0400 From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: fix path leakage on subvol deletion Date: Tue, 14 Jun 2011 14:25:41 -0400 Message-Id: <1308075941-17234-1-git-send-email-josef@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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 (demeter2.kernel.org [140.211.167.43]); Tue, 14 Jun 2011 18:25:47 +0000 (UTC) The delayed ref patch accidently removed the btrfs_free_path in btrfs_unlink_subvol, this puts it back and means we don't leak a path. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/inode.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 30a1d24..1483372 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3074,6 +3074,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, ret = btrfs_update_inode(trans, root, dir); BUG_ON(ret); + btrfs_free_path(path); return 0; }