From: Li Zefan <lizf@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: clameter@sgi.com, LKML <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] mm/page_alloc.c: fix a typo
Date: Wed, 07 May 2008 09:27:27 +0800 [thread overview]
Message-ID: <4821057F.8090706@cn.fujitsu.com> (raw)
In-Reply-To: <20080506071943.46641c26.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Tue, 06 May 2008 17:50:31 +0800 Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>> Li Zefan wrote:
>>> ---
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>> ---
>>
>> Sorry for the noise, but the signed-off was eaten. :(
>> Maybe I should leave a blank line before the signed-off.
>>
>> ---
>>
>> mm/page_alloc.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index bdd5c43..d0ba10d 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -303,7 +303,7 @@ static void destroy_compound_page(struct page *page, unsigned long order)
>> for (i = 1; i < nr_pages; i++) {
>> struct page *p = page + i;
>>
>> - if (unlikely(!PageTail(p) |
>> + if (unlikely(!PageTail(p) ||
>> (p->first_page != page)))
>> bad_page(page);
>> __ClearPageTail(p);
>
> I have a vague memory that the "|" was deliberate. Most of the time,
> "!PageTail" will be false so most of the time we won't take the first
!PageTail will be true if nothing bad happened, corrected me if I'm wrong:
static void prep_compound_page(struct page *page, unsigned long order)
{
...
for (i = 1; i < nr_pages; i++) {
struct page *p = page + i;
__SetPageTail(p);
p->first_page = page;
}
}
> branch so it's probably worth omitting it and always doing the pointer
> comparison.
>
> It's a somewhat dopey trick and shouldn't have been done without a comment.
>
> otoh maybe it was a typo.
>
>
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-05-07 1:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 9:38 Li Zefan
2008-05-06 9:41 ` Li Zefan
2008-05-06 9:50 ` Li Zefan
2008-05-06 14:19 ` Andrew Morton
2008-05-07 1:27 ` Li Zefan [this message]
2008-05-07 4:32 ` Li Zefan
2008-05-06 17:51 ` Christoph Lameter
2008-05-08 0:08 ` KOSAKI Motohiro
2008-05-06 18:18 ` Oliver Pinter
2008-05-06 18:26 ` Christoph Lameter
2008-05-06 18:28 ` Oliver Pinter
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=4821057F.8090706@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--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