[PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

Peter Zijlstra
Mon, 24 Sep 2012 12:44:09 -0000

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.