From patchwork Mon Aug 22 19:49:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Watkins X-Patchwork-Id: 1086272 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 p7MJoOh4020318 for ; Mon, 22 Aug 2011 19:50:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554Ab1HVTtp (ORCPT ); Mon, 22 Aug 2011 15:49:45 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:64081 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204Ab1HVTtm (ORCPT ); Mon, 22 Aug 2011 15:49:42 -0400 Received: by mail-bw0-f46.google.com with SMTP id 11so3921761bke.19 for ; Mon, 22 Aug 2011 12:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=eQmo6SFLHg2g20nQphGtXH40ocmLdNwoSNJESgxH3tY=; b=R0T6r5HLnOrMYEpNb460hfIJ1w3Qj0I4sez3jycxkgGt/K+weFzNnVbvEEJEG7J8A6 iE2PcIBoSJCYDQKBCZfrM+If7UQ8UdtVJLGTzPonEDfONVDpGRivJ67L4XfPr41aRlY4 Xlcaydi4QbeeBx31+mNN4eTm4sHJCJBB29pWs= MIME-Version: 1.0 Received: by 10.204.157.18 with SMTP id z18mr981391bkw.7.1314042581619; Mon, 22 Aug 2011 12:49:41 -0700 (PDT) Received: by 10.204.40.193 with HTTP; Mon, 22 Aug 2011 12:49:41 -0700 (PDT) Date: Mon, 22 Aug 2011 13:49:41 -0600 Message-ID: Subject: [PATCH 2/2] ceph: fix memory leak From: Noah Watkins To: ceph-devel@vger.kernel.org Cc: LKML , sage@newdream.net, noahwatkins@gmail.com Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@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]); Mon, 22 Aug 2011 19:50:24 +0000 (UTC) kfree does not clean up indirect allocations in ceph_fs_client and ceph_options (e.g. snapdir_name). Signed-off-by: Noah Watkins --- fs/ceph/super.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 733674d..788f5ad 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -824,8 +824,8 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type, fsc = create_fs_client(fsopt, opt); if (IS_ERR(fsc)) { res = ERR_CAST(fsc); - kfree(fsopt); - kfree(opt); + destroy_mount_options(fsopt); + ceph_destroy_options(opt); goto out_final; }