From patchwork Thu Oct 24 07:51:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 11208423 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 B97D0112C for ; Thu, 24 Oct 2019 07:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 975172084C for ; Thu, 24 Oct 2019 07:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408741AbfJXHvJ (ORCPT ); Thu, 24 Oct 2019 03:51:09 -0400 Received: from icp-osb-irony-out1.external.iinet.net.au ([203.59.1.210]:26989 "EHLO icp-osb-irony-out1.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407212AbfJXHvJ (ORCPT ); Thu, 24 Oct 2019 03:51:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BRAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFpBQEBCwEBhDqEKI9JBoERiiKFIAGKE4F7CQEBAQEBAQEBATcBAYQ7AwICg1k2Bw4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBETODHYdVgl4Ejz03hkBDlmyCLpVFDI4fA4skLalZDYF9TS4KgydQkX1nhz2DGYVYAQE X-IPAS-Result: A2BRAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFpBQEBCwEBhDqEKI9JBoERiiKFIAGKE4F7CQEBAQEBAQEBATcBAYQ7AwICg1k2Bw4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBETODHYdVgl4Ejz03hkBDlmyCLpVFDI4fA4skLalZDYF9TS4KgydQkX1nhz2DGYVYAQE X-IronPort-AV: E=Sophos;i="5.68,224,1569254400"; d="scan'208";a="250043890" Received: from unknown (HELO [192.168.1.222]) ([118.209.183.71]) by icp-osb-irony-out1.iinet.net.au with ESMTP; 24 Oct 2019 15:51:06 +0800 Subject: [PATCH v7 06/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: Thu, 24 Oct 2019 15:51:06 +0800 Message-ID: <157190346680.27074.12024650426066059590.stgit@fedora-28> In-Reply-To: <157190333868.27074.13987695222060552856.stgit@fedora-28> References: <157190333868.27074.13987695222060552856.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: Darrick J. Wong Reviewed-by: Christoph Hellwig --- 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 a0805b74256c..896609827e3c 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1535,7 +1535,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; @@ -1749,7 +1749,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; @@ -1781,7 +1781,7 @@ xfs_fs_put_super( sb->s_fs_info = NULL; xfs_free_names(mp); - kfree(mp); + kmem_free(mp); } STATIC struct dentry *