]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: allocate btrfs_ioctl_defrag_range_args on stack
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Tue, 27 Jul 2021 21:17:30 +0000 (16:17 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:10 +0000 (13:19 +0200)
commit36cac3ca64deafad85bbaeaa7192a452e6a1cd02
tree1e47f4de81434285bbc00fb2ea35dc2e0635904f
parent0162f4cf2e80f579557328e70b9cab6980d0628c
btrfs: allocate btrfs_ioctl_defrag_range_args on stack

Instead of using kmalloc() to allocate btrfs_ioctl_defrag_range_args,
allocate btrfs_ioctl_defrag_range_args on stack, the size is reasonably
small and ioctls are called in process context.

sizeof(btrfs_ioctl_defrag_range_args) = 48

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c