diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2013-03-02 02:45:49 +0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-03-02 02:45:49 +0400 |
commit | 02cde50b7ea74557d32ff778c73809322445ccd2 (patch) | |
tree | 5021be59504bc5dc3e4fb247debcbb9a383b0dab /crypto/rmd320.c | |
parent | e2914cc26bbca67fd30fff02c6777e8477fc8a6a (diff) | |
download | linux-02cde50b7ea74557d32ff778c73809322445ccd2.tar.xz |
dm ioctl: optimize functions without variable params
Device-mapper ioctls receive and send data in a buffer supplied
by userspace. The buffer has two parts. The first part contains
a 'struct dm_ioctl' and has a fixed size. The second part depends
on the ioctl and has a variable size.
This patch recognises the specific ioctls that do not use the variable
part of the buffer and skips allocating memory for it.
In particular, when a device is suspended and a resume ioctl is sent,
this now avoid memory allocation completely.
The variable "struct dm_ioctl tmp" is moved from the function
copy_params to its caller ctl_ioctl and renamed to param_kernel.
It is used directly when the ioctl function doesn't need any arguments.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'crypto/rmd320.c')
0 files changed, 0 insertions, 0 deletions