From: Thiago Rondon <maluco@mileniumnet.com.br>
To: linux mm <linux-mm@kvack.org>
Subject: [PATCH?] mm/vmalloc.c
Date: Fri, 18 May 2001 13:20:47 -0400 (AMT) [thread overview]
Message-ID: <Pine.LNX.4.21.0105181320180.8753-100000@freak.mileniumnet.com.br> (raw)
This is a stupid patch, just to "clean" the code.
--- vmalloc.c.orig Thu May 17 13:42:43 2001
+++ vmalloc.c Thu May 17 13:43:38 2001
@@ -180,19 +180,13 @@
addr = VMALLOC_START;
write_lock(&vmlist_lock);
for (p = &vmlist; (tmp = *p) ; p = &tmp->next) {
- if ((size + addr) < addr) {
- write_unlock(&vmlist_lock);
- kfree(area);
- return NULL;
- }
+ if ((size + addr) < addr)
+ goto out;
if (size + addr < (unsigned long) tmp->addr)
break;
addr = tmp->size + (unsigned long) tmp->addr;
- if (addr > VMALLOC_END-size) {
- write_unlock(&vmlist_lock);
- kfree(area);
- return NULL;
- }
+ if (addr > VMALLOC_END-size)
+ goto out;
}
area->flags = flags;
area->addr = (void *)addr;
@@ -201,6 +195,11 @@
*p = area;
write_unlock(&vmlist_lock);
return area;
+
+out:
+ write_unlock(&vmlist_lock);
+ kfree(area);
+ return NULL;
}
void vfree(void * addr)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
reply other threads:[~2001-05-18 17:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0105181320180.8753-100000@freak.mileniumnet.com.br \
--to=maluco@mileniumnet.com.br \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox