xfs: use kmem_free to free return value of kmem_zalloc
authorPan Bian <bianpan2016@163.com>
Sat, 2 Sep 2017 16:54:23 +0000 (09:54 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 3 Sep 2017 17:40:46 +0000 (10:40 -0700)
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>
fs/xfs/xfs_super.c

index 38aaacdbb8b3363f32652daa495b659d5e287826..c1c4c2ea1014a70f2723289769d795088b562fe2 100644 (file)
@@ -1220,7 +1220,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;
 }