From: Pan Bian Date: Sun, 17 Sep 2017 21:07:12 +0000 (-0700) Subject: xfs: use kmem_free to free return value of kmem_zalloc X-Git-Tag: v4.9.51~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81cb6f1a2a1964ed4d93604d1a3d49d92db2a01b;p=platform%2Fkernel%2Flinux-amlogic.git xfs: use kmem_free to free return value of kmem_zalloc commit 6c370590cfe0c36bcd62d548148aa65c984540b7 upstream. 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 882fb8524fcb..67d589e0a49f 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1214,7 +1214,7 @@ xfs_test_remount_options( 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; }