From: Hugh Dickins Date: Tue, 14 Feb 2006 21:52:59 +0000 (-0800) Subject: [PATCH] compound page: no access_process_vm check X-Git-Tag: v2.6.16-rc4~76 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16bf134840da3920ded1290973c56ec214636f12;p=linux-2.6 [PATCH] compound page: no access_process_vm check The PageCompound check before access_process_vm's set_page_dirty_lock is no longer necessary, so remove it. But leave the PageCompound checks in bio_set_pages_dirty, dio_bio_complete and nfs_free_user_pages: at least some of those were introduced as a little optimization on hugetlb pages. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 5f33cdb6ff..d2cf144d0a 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -242,8 +242,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in if (write) { copy_to_user_page(vma, page, addr, maddr + offset, buf, bytes); - if (!PageCompound(page)) - set_page_dirty_lock(page); + set_page_dirty_lock(page); } else { copy_from_user_page(vma, page, addr, buf, maddr + offset, bytes);