From: Rusty Russell <rusty@rustcorp.com.au>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: linux-kernel@vger.kernel.org,
kernel-janitor-discuss@lists.sourceforge.net
Subject: Re: forget_pte()
Date: Mon, 03 Jun 2002 13:04:03 +1000 [thread overview]
Message-ID: <E17Ei8Z-0003Mq-00@wagner.rustcorp.com.au> (raw)
In-Reply-To: Your message of "Sat, 01 Jun 2002 09:40:02 MST." <20020601164002.GC10243@holomorphy.com>
In message <20020601164002.GC10243@holomorphy.com> you write:
> diff -Nru a/mm/memory.c b/mm/memory.c
> --- a/mm/memory.c Sat Jun 1 09:35:40 2002
> +++ b/mm/memory.c Sat Jun 1 09:35:40 2002
> @@ -309,15 +309,12 @@
> }
>
> /*
> - * Return indicates whether a page was freed so caller can adjust rss
> + * bug check to be sure pte's are unmapped when no longer used
> */
> -static inline void forget_pte(pte_t page)
> -{
> - if (!pte_none(page)) {
> - printk("forget_pte: old mapping existed!\n");
> - BUG();
> - }
> -}
> +#define forget_pte(pte) \
> + do { \
> + BUG_ON(!pte_none(pte)); \
> + } while (0)
Hmm... it's only used in two places, and the name is entirely
misleading. I think it might be neater to replace those two
occurances with:
/* PTEs must be unmapped */
BUG_ON(!pte_none(pte));
Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2002-06-03 3:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-01 16:40 forget_pte() William Lee Irwin III
2002-06-03 3:04 ` Rusty Russell [this message]
2002-06-03 5:35 ` forget_pte() William Lee Irwin III
2002-06-03 5:38 ` forget_pte() William Lee Irwin III
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=E17Ei8Z-0003Mq-00@wagner.rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=kernel-janitor-discuss@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.com \
/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
all inboxes | Powered by JetHome®