diff options
| author | Petr Pavlu <petr.pavlu@suse.com> | 2026-08-06 11:10:17 +0200 |
|---|---|---|
| committer | Petr Pavlu <petr.pavlu@suse.com> | 2026-08-06 13:29:03 +0200 |
| commit | 96e6f752fc25af366de2b3f8aa09c93963d00d2a (patch) | |
| tree | d4540acd4dbeccdaab9598c4284f47b4d9620576 /scripts | |
| parent | 5eecb11b543f9f417bcf0dea239ff99c6af65dbd (diff) | |
| download | linux-96e6f752fc25af366de2b3f8aa09c93963d00d2a.tar.gz linux-96e6f752fc25af366de2b3f8aa09c93963d00d2a.zip | |
module/dups: Avoid unnecessary kmod_dup_req allocations
The kmod dups code preallocates kmod_dup_req before taking kmod_dup_mutex
to avoid allocating memory while holding the lock. This provides little
benefit, since the allocation is fast and can safely be done under the
lock. On the other hand, it leads to unnecessary allocations when the
request turns out to be a duplicate and slightly complicates the code.
Allocate kmod_dup_req only when needed and introduce a helper function
alloc_kmod_req() to initialize the structure.
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
