From patchwork Mon Nov 4 10:54:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 11225401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C632515AB for ; Mon, 4 Nov 2019 10:54:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A629B21D7F for ; Mon, 4 Nov 2019 10:54:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbfKDKy6 (ORCPT ); Mon, 4 Nov 2019 05:54:58 -0500 Received: from icp-osb-irony-out4.external.iinet.net.au ([203.59.1.220]:34019 "EHLO icp-osb-irony-out4.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728520AbfKDKy6 (ORCPT ); Mon, 4 Nov 2019 05:54:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AKAAC6AsBd/xK90HYNWRsBAQEBAQEBBQEBAREBAQMDAQEBgWoFAQEBCwGEPIQpj1gBAQEBAQEGgRGKCYUxihaBewkBAQEBAQEBAQE3AQGEOwMCAoQwNQgOAg4BAQEEAQEBAQEFAwGFWIYqAgEDIwRSEBgNAiYCAkcQBhOFdbBidX8zGoozgQ4oAYFkikZ4gQeBETODHYdVgl4Ej0M3hkBDlnWCLpVRDI4oA4suLalnAYIPTS4KgydQkX5njm0BAQ X-IPAS-Result: A2AKAAC6AsBd/xK90HYNWRsBAQEBAQEBBQEBAREBAQMDAQEBgWoFAQEBCwGEPIQpj1gBAQEBAQEGgRGKCYUxihaBewkBAQEBAQEBAQE3AQGEOwMCAoQwNQgOAg4BAQEEAQEBAQEFAwGFWIYqAgEDIwRSEBgNAiYCAkcQBhOFdbBidX8zGoozgQ4oAYFkikZ4gQeBETODHYdVgl4Ej0M3hkBDlnWCLpVRDI4oA4suLalnAYIPTS4KgydQkX5njm0BAQ X-IronPort-AV: E=Sophos;i="5.68,266,1569254400"; d="scan'208";a="207138649" Received: from unknown (HELO [192.168.1.222]) ([118.208.189.18]) by icp-osb-irony-out4.iinet.net.au with ESMTP; 04 Nov 2019 18:54:56 +0800 Subject: [PATCH v9 04/17] xfs: use kmem functions for struct xfs_mount From: Ian Kent To: linux-xfs Cc: Christoph Hellwig , "Darrick J. Wong" , Brian Foster , Eric Sandeen , David Howells , Dave Chinner , Al Viro Date: Mon, 04 Nov 2019 18:54:57 +0800 Message-ID: <157286489698.18393.11608985261787201461.stgit@fedora-28> In-Reply-To: <157286480109.18393.6285224459642752559.stgit@fedora-28> References: <157286480109.18393.6285224459642752559.stgit@fedora-28> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The remount function uses the kmem functions for allocating and freeing struct xfs_mount, for consistency use the kmem functions everwhere for struct xfs_mount. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index fb90beeb3184..eb919e74d8eb 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1497,7 +1497,7 @@ xfs_mount_alloc( { struct xfs_mount *mp; - mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL); + mp = kmem_alloc(sizeof(struct xfs_mount), KM_ZERO); if (!mp) return NULL; @@ -1711,7 +1711,7 @@ xfs_fs_fill_super( out_free_names: sb->s_fs_info = NULL; xfs_free_names(mp); - kfree(mp); + kmem_free(mp); out: return error; @@ -1743,7 +1743,7 @@ xfs_fs_put_super( sb->s_fs_info = NULL; xfs_free_names(mp); - kfree(mp); + kmem_free(mp); } STATIC struct dentry *