mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: Wrong comment due to pte_file()
Date: Sun, 30 Mar 2003 18:37:19 -0800	[thread overview]
Message-ID: <20030330183719.325908c1.akpm@digeo.com> (raw)
In-Reply-To: <20030330212201.A4155@devserv.devel.redhat.com>

Pete Zaitcev <zaitcev@redhat.com> wrote:
>
> How about abolishing all comments?

Or all code.

> --- linux-2.5.66/include/asm-i386/pgtable.h	2003-03-24 14:01:14.000000000 -0800
> +++ linux-2.5.66-sparc/include/asm-i386/pgtable.h	2003-03-30 16:35:04.000000000 -0800

Thanks.  There's another bogus comment doing the rounds as well:

#define _PAGE_FILE      0x040   /* pagecache or swap */

This is exactly wrong - this bit is used to distinguish pagecache from swap. 
See handle_pte_fault():


	if (pte_file(entry))
		return do_file_page(mm, vma, address, write_access, pte, pmd);
	return do_swap_page(mm, vma, address, pte, pmd, entry, write_access);


Some architectures got sneaky:

#define _PAGE_FILE  0x80000 /* pagecache or swap? */

ah-hah!  That question mark *totally* changes the meaning and reveals all.

Pity those who follow after us.  I shall fix it up.


      reply	other threads:[~2003-03-31  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-31  2:22 Pete Zaitcev
2003-03-31  2:37 ` Andrew Morton [this message]

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=20030330183719.325908c1.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=zaitcev@redhat.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®