diff options
Diffstat (limited to 'sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.munmap.patch')
-rw-r--r-- | sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.munmap.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.munmap.patch b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.munmap.patch new file mode 100644 index 000000000000..3c01b3447ec6 --- /dev/null +++ b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.munmap.patch @@ -0,0 +1,27 @@ +--- linux-2.4.20-openmosix-r8/mm/mremap.c~ 2004-02-18 22:33:57.000000000 +0000 ++++ linux-2.4.20-openmosix-r8/mm/mremap.c 2004-02-18 22:35:01.000000000 +0000 +@@ -266,7 +266,9 @@ + if ((addr <= new_addr) && (addr+old_len) > new_addr) + goto out; + +- do_munmap(current->mm, new_addr, new_len, 1); ++ ret = do_munmap(current->mm, new_addr, new_len); ++ if (ret && new_len) ++ goto out; + } + + /* +@@ -274,9 +276,11 @@ + * the unnecessary pages.. + * do_munmap does all the needed commit accounting + */ +- ret = addr; + if (old_len >= new_len) { +- do_munmap(current->mm, addr+new_len, old_len - new_len, 1); ++ ret = do_munmap(current->mm, addr+new_len, old_len - new_len); ++ if (ret && old_len != new_len) ++ goto out; ++ ret = addr; + if (!(flags & MREMAP_FIXED) || (new_addr == addr)) + goto out; + } |