Re: Wrong comment due to pte_file()

From: Andrew Morton (akpm@digeo.com)
Date: Sun Mar 30 2003 - 21:37:19 EST


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/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:36 EST