Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 42024 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.4.19-gentoo-r10/mm/mremap.c (-3 / +7 lines)
Lines 268-274 Link Here
268
		if ((addr <= new_addr) && (addr+old_len) > new_addr)
268
		if ((addr <= new_addr) && (addr+old_len) > new_addr)
269
			goto out;
269
			goto out;
270
270
271
		do_munmap(current->mm, new_addr, new_len, 1);
271
		ret = do_munmap(current->mm, new_addr, new_len, 1);
272
		if (ret && new_len)
273
			goto out;
272
	}
274
	}
273
275
274
	/*
276
	/*
Lines 276-284 Link Here
276
	 * the unnecessary pages..
278
	 * the unnecessary pages..
277
	 * do_munmap does all the needed commit accounting
279
	 * do_munmap does all the needed commit accounting
278
	 */
280
	 */
279
	ret = addr;
280
	if (old_len >= new_len) {
281
	if (old_len >= new_len) {
281
		do_munmap(current->mm, addr+new_len, old_len - new_len, 1);
282
		ret = do_munmap(current->mm, addr+new_len, old_len - new_len, 1);
283
		if (ret && old_len != new_len)
284
			goto out;
285
		ret = addr;
282
		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
286
		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
283
			goto out;
287
			goto out;
284
	}
288
	}

Return to bug 42024