[patch 1/3] mm: fix PageUptodate memorder

2007-02-08 Thread Nick Piggin
After running SetPageUptodate, preceeding stores to the page contents to actually bring it uptodate may not be ordered with the store to set the page uptodate. Therefore, another CPU which checks PageUptodate is true, then reads the page contents can get stale data. Fix this by ensuring

[patch 1/3] mm: fix PageUptodate memorder

2007-02-08 Thread Nick Piggin
After running SetPageUptodate, preceeding stores to the page contents to actually bring it uptodate may not be ordered with the store to set the page uptodate. Therefore, another CPU which checks PageUptodate is true, then reads the page contents can get stale data. Fix this by ensuring

Re: [patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Nick Piggin
Andrew Morton wrote: On Tue, 6 Feb 2007 09:02:11 +0100 (CET) Nick Piggin <[EMAIL PROTECTED]> wrote: +static inline void __SetPageUptodate(struct page *page) +{ +#ifdef CONFIG_S390 if (!test_and_set_bit(PG_uptodate, >flags)) page_test_and_clear_dirty(page); -} #else

Re: [patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Andrew Morton
On Tue, 6 Feb 2007 09:02:11 +0100 (CET) Nick Piggin <[EMAIL PROTECTED]> wrote: > +static inline void __SetPageUptodate(struct page *page) > +{ > +#ifdef CONFIG_S390 > if (!test_and_set_bit(PG_uptodate, >flags)) > page_test_and_clear_dirty(page); > -} > #else > -#define

[patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Nick Piggin
After running SetPageUptodate, preceeding stores to the page contents to actually bring it uptodate may not be ordered with the store to set the page uptodate. Therefore, another CPU which checks PageUptodate is true, then reads the page contents can get stale data. Fix this by ensuring

[patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Nick Piggin
After running SetPageUptodate, preceeding stores to the page contents to actually bring it uptodate may not be ordered with the store to set the page uptodate. Therefore, another CPU which checks PageUptodate is true, then reads the page contents can get stale data. Fix this by ensuring

Re: [patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Andrew Morton
On Tue, 6 Feb 2007 09:02:11 +0100 (CET) Nick Piggin [EMAIL PROTECTED] wrote: +static inline void __SetPageUptodate(struct page *page) +{ +#ifdef CONFIG_S390 if (!test_and_set_bit(PG_uptodate, page-flags)) page_test_and_clear_dirty(page); -} #else -#define

Re: [patch 1/3] mm: fix PageUptodate memorder

2007-02-06 Thread Nick Piggin
Andrew Morton wrote: On Tue, 6 Feb 2007 09:02:11 +0100 (CET) Nick Piggin [EMAIL PROTECTED] wrote: +static inline void __SetPageUptodate(struct page *page) +{ +#ifdef CONFIG_S390 if (!test_and_set_bit(PG_uptodate, page-flags)) page_test_and_clear_dirty(page); -} #else