xfs: use kmem_free to free return value of kmem_zalloc
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 <[email protected]>
--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
@@ -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; }
Signature · 1 line
1.9.1
Darrick J. Wong
Reviewed-byQuoted 2 lines · Pan Bian
In function
xfs_test_remount_options(),kfree()is used to free memory allocated bykmem_zalloc(). But it is better to usekmem_free().
Looks fine (for 4.14),
Reviewed-by Darrick J. Wong <[email protected]>
Quoted 26 lines
Signed-off-by Pan Bian <[email protected]>--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_super.c +1
-1@@ -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; }Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html