mdmon: lock current memory as well as future memory.

mlockall(MCL_FUTURE) only locks mappings that have not yet
been created.  To lock all memory used by the process, we need
 MCL_CURRENT | MCL_FUTURE

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2009-10-19 13:04:16 +11:00
parent 5d504f4278
commit 1373b07d75
1 changed files with 1 additions and 1 deletions

View File

@ -545,7 +545,7 @@ int mdmon(char *devname, int devnum, int scan, char *switchroot)
ignore = dup(0);
#endif
mlockall(MCL_FUTURE);
mlockall(MCL_CURRENT | MCL_FUTURE);
if (clone_monitor(container) < 0) {
fprintf(stderr, "mdmon: failed to start monitor process: %s\n",