The patch titled Subject: ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 has been added to the -mm tree. Its filename is ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jane Chu <jane.chu@xxxxxxxxxx> Subject: ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 relocate comment Link: http://lkml.kernel.org/r/20180731044831.26036-1-jane.chu@xxxxxxxxxx Signed-off-by: Jane Chu <jane.chu@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN include/linux/mm.h~ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 include/linux/mm.h --- a/include/linux/mm.h~ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 +++ a/include/linux/mm.h @@ -389,13 +389,6 @@ enum page_entry_size { * These are the virtual MM functions - opening of an area, closing and * unmapping it (needed to keep files on disk up-to-date etc), pointer * to the functions called when a no-page or a wp-page exception occurs. - * - * Note, when a new function is introduced to vm_operations_struct and - * added to hugetlb_vm_ops, please consider adding the function to - * shm_vm_ops. This is because under System V memory model, though - * mappings created via shmget/shmat with "huge page" specified are - * backed by hugetlbfs files, their original vm_ops are overwritten with - * shm_vm_ops. */ struct vm_operations_struct { void (*open)(struct vm_area_struct * area); diff -puN mm/hugetlb.c~ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 mm/hugetlb.c --- a/mm/hugetlb.c~ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2 +++ a/mm/hugetlb.c @@ -3167,6 +3167,13 @@ static vm_fault_t hugetlb_vm_op_fault(st return 0; } +/* + * When a new function is introduced to vm_operations_struct and added + * to hugetlb_vm_ops, please consider adding the function to shm_vm_ops. + * This is because under System V memory model, mappings created via + * shmget/shmat with "huge page" specified are backed by hugetlbfs files, + * their original vm_ops are overwritten with shm_vm_ops. + */ const struct vm_operations_struct hugetlb_vm_ops = { .fault = hugetlb_vm_op_fault, .open = hugetlb_vm_op_open, _ Patches currently in -mm which might be from jane.chu@xxxxxxxxxx are ipc-shmc-add-pagesize-function-to-shm_vm_ops.patch ipc-shmc-add-pagesize-function-to-shm_vm_ops-v2.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html