summaryrefslogtreecommitdiffstats
path: root/Documentation/edac.txt
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-12-03 06:05:29 -0500
committerSteve French <smfrench@gmail.com>2012-12-08 22:04:28 -0600
commit41a9f1f6b38664fc08431674d87871a57d763be1 (patch)
tree72c311410a7b5175776385f7a4947d4e77ac5d3c /Documentation/edac.txt
parentfaa65f07d21e7d37190c91fdcf9f940d733ae3cc (diff)
downloadblackbird-op-linux-41a9f1f6b38664fc08431674d87871a57d763be1.tar.gz
blackbird-op-linux-41a9f1f6b38664fc08431674d87871a57d763be1.zip
cifs: avoid extra allocation for small cifs.idmap keys
The cifs.idmap keytype always allocates memory to hold the payload from userspace. In the common case where we're translating a SID to a UID or GID, we're allocating memory to hold something that's less than or equal to the size of a pointer. When the payload is the same size as a pointer or smaller, just store it in the payload.value union member instead. That saves us an extra allocation on the sid_to_id upcall. Note that we have to take extra care to check the datalen when we go to dereference the .data pointer in the union, but the callers now check that as a matter of course anyway. Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'Documentation/edac.txt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud