lkml.org 
[lkml]   [2003]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Wrong comment due to pte_file()
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.040 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site