Re: [PATCH v10 1/5] mm: introduce a common interface for balloonpages mobility

From: Peter Zijlstra
Date: Mon Sep 24 2012 - 08:44:23 EST


On Mon, 2012-09-17 at 13:38 -0300, Rafael Aquini wrote:
> +static inline void assign_balloon_mapping(struct page *page,
> + struct address_space
> *mapping)
> +{
> + page->mapping = mapping;
> + smp_wmb();
> +}
> +
> +static inline void clear_balloon_mapping(struct page *page)
> +{
> + page->mapping = NULL;
> + smp_wmb();
> +}

barriers without a comment describing the data race are a mortal sin.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/