aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2004-08-26 20:33:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-26 20:33:30 -0700
commit8843170edc7816ecd8a2131bfddb0091226859b5 (patch)
treefb31454deeec565f1ad4d9dd203741a142659545 /mm
parent026a14f002f20339ea70ec66c8b738bc59b9d08b (diff)
downloadhistory-8843170edc7816ecd8a2131bfddb0091226859b5.tar.gz
[PATCH] tmpfs atomicity fix
tmpfs must use __copy_from_user_inatomic now, to avoid might_sleep warning, when knowingly using __copy_from_user with an atomic kmap. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index c3b4cc5d59ff09..3c438c528ae98e 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1332,7 +1332,8 @@ shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t
__get_user(dummy, buf + bytes - 1);
kaddr = kmap_atomic(page, KM_USER0);
- left = __copy_from_user(kaddr + offset, buf, bytes);
+ left = __copy_from_user_inatomic(kaddr + offset,
+ buf, bytes);
kunmap_atomic(kaddr, KM_USER0);
}
if (left) {