Fixed detection of devzero file.

Fixed adding VMA_ANONYMOUS flag explicitly if no file was given
This commit is contained in:
Bahadir Balban
2008-03-14 15:37:10 +00:00
parent 2ecc7612c3
commit dc3b63d924
4 changed files with 6 additions and 6 deletions

View File

@@ -461,7 +461,7 @@ int do_mmap(struct vm_file *mapfile, unsigned long file_offset, struct tcb *task
/* Set up devzero if none given */
if (!mapfile) {
if (flags & VMA_ANONYMOUS) {
mapfile = get_devzero();
BUG_ON(!(mapfile = get_devzero()));
file_offset = 0;
} else
BUG();