diff options
author | Jan Beulich <JBeulich@novell.com> | 2010-10-26 23:22:27 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 01:52:13 +0200 |
commit | 3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0 (patch) | |
tree | 1fe91114d8829a511db48d757c787cfede3b929c /mm | |
parent | modules: no need to align .modinfo strings (diff) | |
download | linux-3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0.tar.xz linux-3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0.zip |
use clear_page()/copy_page() in favor of memset()/memcpy() on whole pages
After all that's what they are intended for.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 861f7982dd54..02e48aa0ed13 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2080,7 +2080,7 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo * zeroes. */ if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE)) - memset(kaddr, 0, PAGE_SIZE); + clear_page(kaddr); kunmap_atomic(kaddr, KM_USER0); flush_dcache_page(dst); } else |