diff options
author | Miles Bader <miles@gnu.org> | 1996-08-29 20:53:43 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-08-29 20:53:43 +0000 |
commit | 184bbe142aa0cfe33957d1fd3760a9087d2d0ac6 (patch) | |
tree | eb59dda576a4342302cc6dd4aa4de7d9415d40b9 /ext2fs/ext2fs.c | |
parent | 22e0d8473f89e19852d2b30d16347703f3b8617a (diff) |
(get_page_buf): Return 0 if we can't allocate.
Diffstat (limited to 'ext2fs/ext2fs.c')
-rw-r--r-- | ext2fs/ext2fs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c index f3e61873..ea0dfe7d 100644 --- a/ext2fs/ext2fs.c +++ b/ext2fs/ext2fs.c @@ -215,8 +215,11 @@ vm_address_t get_page_buf () buf = free_page_bufs; if (buf == 0) { + error_t err; spin_unlock (&free_page_bufs_lock); - vm_allocate (mach_task_self (), &buf, vm_page_size, 1); + err = vm_allocate (mach_task_self (), &buf, vm_page_size, 1); + if (err) + buf = 0; } else { |