diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-17 06:35:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-17 06:35:47 -0700 |
| commit | 5846fc6c31162234e88bdfd91548b1cf0d2cebbd (patch) | |
| tree | 39c8260611dc81aa075ef24b4702f690847e4ed5 /include/linux/console_struct.h | |
| parent | c89a8badb450afd37d1b7565846b1f485b2d0311 (diff) | |
[PATCH] consolidate the VMA splitting code
Patch from Christoph Hellwig. 250 lines of code go away.
The three syscalls madvice/mlock/mprotect all change attributes of
memory regions. These attributes are stored in vm_area_structs (VMAs).
The current code for those syscalls does this by having four
subroutines each, for changing a whole VMA, one for just setting new
flags if a full VMA is affected, one that creates a new VMA in the
right part of the old one and sets the flags there, one for the left
part, and one that splits of both the left and the right part and sets
the new flags in the middle.
This patch makes those routines create new VMAs on the left and on te
right hand first and then always setting the flags in the old VMA.
Together with using a library function (split_vma) to to the split this
simplies the code and makes it more readable. As a side affect it
fixes some VM accounting bugs observed by Hugh Dickins.
Diffstat (limited to 'include/linux/console_struct.h')
0 files changed, 0 insertions, 0 deletions
