Bug in mm.h?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I fail to understand whether the following is a bug. From what I see, if
the page is reserved, page->count is not decreased. The order of the
conditions should be reversed.

>From mm.h:

static inline void put_page(struct page *page)
{
        if (!PageReserved(page) && put_page_testzero(page))
                __page_cache_release(page);
}

static inline void get_page(struct page *page)
{
        atomic_inc(&page->_count);
}

#define put_page_testzero(p)                            \
        ({                                              \
                BUG_ON(page_count(p) == 0);             \
                atomic_add_negative(-1, &(p)->_count);  \
        })

-
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]
  Powered by Linux