]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code
authorPasha Tatashin <pasha.tatashin@soleen.com>
Fri, 9 May 2025 06:29:27 +0000 (08:29 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 May 2025 17:48:23 +0000 (10:48 -0700)
commit90eb270d8eb46c2d54a13b938643fbc9cf56eaea
treedc39f22f78094ff51c5943a3d1698806347a9066
parent85e1f758b6d770c9d9a7c7de4937e2eb2c200aea
fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code

There are two data types: "struct vm_struct" and "struct vm_stack" that
have the same local variable names: vm_stack, or vm, or s, which makes the
code confusing to read.

Change the code so the naming is consistent:

struct vm_struct is always called vm_area
struct vm_stack is always called vm_stack

One change altering vfree(vm_stack) to vfree(vm_area->addr) may look like
a semantic change but it is not: vm_area->addr points to the vm_stack.
This was done to improve readability.

[linus.walleij@linaro.org: rebased and added new users of the variable names, address review comments]
Link: https://lore.kernel.org/20240311164638.2015063-4-pasha.tatashin@soleen.com
Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-2-e6c69dd356f2@linaro.org
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/fork.c