aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2017-09-17 14:07:12 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-20 08:20:02 +0200
commit81cb6f1a2a1964ed4d93604d1a3d49d92db2a01b (patch)
tree907173aa9576c51179f8e0be363e6dc3428b1b51
parent772003c6a4282211487c9d33958594d7f2be7dd2 (diff)
downloadlinux-linaro-stable-81cb6f1a2a1964ed4d93604d1a3d49d92db2a01b.tar.gz
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 <bianpan2016@163.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/xfs/xfs_super.c2
1 files changed, 1 insertions, 1 deletions
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;
}