diff options
Diffstat (limited to 'arch/sh/mm/gup.c')
-rw-r--r-- | arch/sh/mm/gup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index 37458f38b220..e7af6a65baab 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c | |||
@@ -17,7 +17,7 @@ | |||
17 | static inline pte_t gup_get_pte(pte_t *ptep) | 17 | static inline pte_t gup_get_pte(pte_t *ptep) |
18 | { | 18 | { |
19 | #ifndef CONFIG_X2TLB | 19 | #ifndef CONFIG_X2TLB |
20 | return ACCESS_ONCE(*ptep); | 20 | return READ_ONCE(*ptep); |
21 | #else | 21 | #else |
22 | /* | 22 | /* |
23 | * With get_user_pages_fast, we walk down the pagetables without | 23 | * With get_user_pages_fast, we walk down the pagetables without |
@@ -257,10 +257,8 @@ slow_irqon: | |||
257 | start += nr << PAGE_SHIFT; | 257 | start += nr << PAGE_SHIFT; |
258 | pages += nr; | 258 | pages += nr; |
259 | 259 | ||
260 | down_read(&mm->mmap_sem); | 260 | ret = get_user_pages_unlocked(current, mm, start, |
261 | ret = get_user_pages(current, mm, start, | 261 | (end - start) >> PAGE_SHIFT, write, 0, pages); |
262 | (end - start) >> PAGE_SHIFT, write, 0, pages, NULL); | ||
263 | up_read(&mm->mmap_sem); | ||
264 | 262 | ||
265 | /* Have to be a bit careful with return values */ | 263 | /* Have to be a bit careful with return values */ |
266 | if (nr > 0) { | 264 | if (nr > 0) { |