Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbdHHMST (ORCPT ); Tue, 8 Aug 2017 08:18:19 -0400 Received: from m12-14.163.com ([220.181.12.14]:60202 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbdHHMSR (ORCPT ); Tue, 8 Aug 2017 08:18:17 -0400 From: Pan Bian To: "Darrick J. Wong" , linux-xfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Pan Bian Subject: xfs: use kmem_free to free return value of kmem_zalloc Date: Tue, 8 Aug 2017 20:17:57 +0800 Message-Id: <1502194677-28047-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: DsCowAAXtjH_q4lZodHYSA--.8657S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrXr4DAF43CFyDKF4rGw4UArb_yoWxGFg_Ja 1IqF4xGw45Jr13J345Aws0qF40g3yI9rs3JFW7t3ZIkryUtanrArs7Xr4FqryrWr43tr95 Wr1IqFn5try7CjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUn8b1UUUUUU== X-Originating-IP: [106.120.213.62] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/1tbiQAIuclSIS8Y51wAAsh Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 603 Lines: 24 In function xfs_test_remount_options(), kfree() is used to free memory allocated by kmem_zalloc(). But it is better to use kmem_free(). Signed-off-by: Pan Bian --- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 38aaacd..c1c4c2e 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1220,7 +1220,7 @@ struct proc_xfs_info { tmp_mp->m_super = sb; error = xfs_parseargs(tmp_mp, options); xfs_free_fsname(tmp_mp); - kfree(tmp_mp); + kmem_free(tmp_mp); return error; } -- 1.9.1