Skip to content

Commit 971843c

Browse files
jankaratytso
authored andcommitted
ext4: free orphan info with kvfree
Orphan info is now getting allocated with kvmalloc_array(). Free it with kvfree() instead of kfree() to avoid complaints from mm. Reported-by: Chris Mason <[email protected]> Fixes: 0a6ce20 ("ext4: verify orphan file size is not too big") Cc: [email protected] Signed-off-by: Jan Kara <[email protected]> Message-ID: <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 1d3ad18 commit 971843c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ext4/orphan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ void ext4_release_orphan_info(struct super_block *sb)
513513
return;
514514
for (i = 0; i < oi->of_blocks; i++)
515515
brelse(oi->of_binfo[i].ob_bh);
516-
kfree(oi->of_binfo);
516+
kvfree(oi->of_binfo);
517517
}
518518

519519
static struct ext4_orphan_block_tail *ext4_orphan_block_tail(
@@ -637,7 +637,7 @@ int ext4_init_orphan_info(struct super_block *sb)
637637
out_free:
638638
for (i--; i >= 0; i--)
639639
brelse(oi->of_binfo[i].ob_bh);
640-
kfree(oi->of_binfo);
640+
kvfree(oi->of_binfo);
641641
out_put:
642642
iput(inode);
643643
return ret;

0 commit comments

Comments
 (0)