Skip to content

Commit b8c0d6f

Browse files
Dave ChinnerChandan Babu R
authored andcommitted
xfs: use kvfree() in xlog_cil_free_logvec()
The xfs_log_vec items are allocated by xlog_kvmalloc(), and so need to be freed with kvfree. This was missed when coverting from the kmem_free() API. Fixes: 4929257 ("xfs: convert kmem_free() for kvmalloc users to kvfree()") Reported-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent 3aca067 commit b8c0d6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_log_cil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ xlog_cil_free_logvec(
703703
while (!list_empty(lv_chain)) {
704704
lv = list_first_entry(lv_chain, struct xfs_log_vec, lv_list);
705705
list_del_init(&lv->lv_list);
706-
kfree(lv);
706+
kvfree(lv);
707707
}
708708
}
709709

@@ -1544,7 +1544,7 @@ xlog_cil_process_intents(
15441544
set_bit(XFS_LI_WHITEOUT, &ilip->li_flags);
15451545
trace_xfs_cil_whiteout_mark(ilip);
15461546
len += ilip->li_lv->lv_bytes;
1547-
kfree(ilip->li_lv);
1547+
kvfree(ilip->li_lv);
15481548
ilip->li_lv = NULL;
15491549

15501550
xfs_trans_del_item(lip);

0 commit comments

Comments
 (0)