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>
This commit is contained in:

committed by
Linus Torvalds

parent
b647277681
commit
3ecb01df32
@@ -816,7 +816,7 @@ static int kimage_load_normal_segment(struct kimage *image,
|
||||
|
||||
ptr = kmap(page);
|
||||
/* Start with a clear page */
|
||||
memset(ptr, 0, PAGE_SIZE);
|
||||
clear_page(ptr);
|
||||
ptr += maddr & ~PAGE_MASK;
|
||||
mchunk = PAGE_SIZE - (maddr & ~PAGE_MASK);
|
||||
if (mchunk > mbytes)
|
||||
|
Reference in New Issue
Block a user