提交 40612351 编写于 作者: D David Hildenbrand 提交者: Martin Schwidefsky

s390: get_user_pages_fast() might sleep

Let's annotate it correctly, so we directly get a warning if
we ever were to use it in atomic/preempt_disable/spinlock environment.
Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 db1c4515
...@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, ...@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
int nr, ret; int nr, ret;
might_sleep();
start &= PAGE_MASK; start &= PAGE_MASK;
nr = __get_user_pages_fast(start, nr_pages, write, pages); nr = __get_user_pages_fast(start, nr_pages, write, pages);
if (nr == nr_pages) if (nr == nr_pages)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册