OSDN Git Service

btrfs: allocate btrfs_ioctl_quota_rescan_args on stack
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Tue, 27 Jul 2021 21:17:29 +0000 (16:17 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:10 +0000 (13:19 +0200)
commit0afb603afc3e3dd15c99dd34d5e18b46f9f5c0e4
tree18032d5cec5fb8fafb6430908fb18f58112c372c
parent98caf9531e1de8104b45fabbab4b6c2f290068fa
btrfs: allocate btrfs_ioctl_quota_rescan_args on stack

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

sizeof(btrfs_ioctl_quota_rescan_args) = 64

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