diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 18:02:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 18:02:00 +0000 |
commit | 02f8110d6a247d53b489b29eec8a35c85e713c6b (patch) | |
tree | 9cb65032a35c2d1af581deaac73dfa2540b2fbdd /fs/exec.c | |
parent | b62a3d8e8a9d02ff6f9103358b7a9c2c3d56c653 (diff) |
Merge with Linux 2.4.0-test6-pre2.
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -320,9 +320,11 @@ int setup_arg_pages(struct linux_binprm *bprm) } for (i = 0 ; i < MAX_ARG_PAGES ; i++) { - if (bprm->page[i]) { + struct page *page = bprm->page[i]; + if (page) { + bprm->page[i] = NULL; current->mm->rss++; - put_dirty_page(current,bprm->page[i],stack_base); + put_dirty_page(current,page,stack_base); } stack_base += PAGE_SIZE; } @@ -873,11 +875,11 @@ out: if (bprm.file) fput(bprm.file); - /* Assumes that free_page() can take a NULL argument. */ - /* I hope this is ok for all architectures */ - for (i = 0 ; i < MAX_ARG_PAGES ; i++) - if (bprm.page[i]) - __free_page(bprm.page[i]); + for (i = 0 ; i < MAX_ARG_PAGES ; i++) { + struct page * page = bprm.page[i]; + if (page) + __free_page(page); + } return retval; } |