Re: Wrong comment due to pte_file()

Andrew Morton (akpm@digeo.com)
Sun, 30 Mar 2003 18:37:19 -0800


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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/