On Sun, 23 Oct 2005, Andrew Morton wrote:
> Hugh Dickins <[email protected]> wrote:
> > + * When freeing, reset page->mapping so free_pages_check won't complain.
> > + */
> > +#define __pte_lockptr(page) ((spinlock_t *)&((page)->private))
> > +#define pte_lock_init(_page) do { \
> > + BUILD_BUG_ON((size_t)(__pte_lockptr((struct page *)0) + 1) > \
> > + sizeof(struct page)); \
> > + spin_lock_init(__pte_lockptr(_page)); \
> > +} while (0)
> > +#define pte_lock_deinit(page) ((page)->mapping = NULL)
> > +#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));})
> > +#else
>
> Why does pte_lock_deinit() zap ->mapping? That doesn't seem to have
> anything to do with anything?
Nick had wondered the same originally, so I did add the comment above.
Bring it down to immediately above the deinit line if you prefer.
Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]