Thread (8 messages) 8 messages, 5 authors, 2015-03-25

Re: [PATCH] mm: Remove usages of ACCESS_ONCE

From: Jason Low <hidden>
Date: 2015-03-24 16:58:40
Also in: linux-mm, lkml

On Tue, 2015-03-24 at 15:42 +0100, Christian Borntraeger wrote:
Am 23.03.2015 um 23:44 schrieb Jason Low:
quoted
Commit 38c5ce936a08 converted ACCESS_ONCE usage in gup_pmd_range() to
READ_ONCE, since ACCESS_ONCE doesn't work reliably on non-scalar types.

This patch removes the rest of the usages of ACCESS_ONCE, and use
READ_ONCE for the read accesses. This also makes things cleaner,
instead of using separate/multiple sets of APIs.

Signed-off-by: Jason Low <redacted>
Reviewed-by: Christian Borntraeger <redacted>
Thanks.
one remark or question:
quoted
-	anon_mapping = (unsigned long) ACCESS_ONCE(page->mapping);
+	anon_mapping = (unsigned long)READ_ONCE(page->mapping);
Were the white space changes intentional? IIRC checkpatch does prefer
it your way and you have changed several places - so I assume yes.
Yeah, those changes were intentional.

I thought that this was more of the standard style to do casting, so I
made those changes as well.
Either way, its probably fine to change that along.
Okay, I'll assume that this is fine for now unless something thinks this
shouldn't be part of the patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help