From: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> Since commit d2005e3f41d4 (userfaultfd: don't pin the user memory in userfaultfd_file_create()) userfaultfd uses mm_count rather than mm_users to pin mm_struct. Make dup_userfaultfd consistent with this behaviour Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> --- fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 07b1c25..e0bb733 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -523,7 +523,7 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs) ctx->features = octx->features; ctx->released = false; ctx->mm = vma->vm_mm; - atomic_inc(&ctx->mm->mm_users); + atomic_inc(&ctx->mm->mm_count); userfaultfd_ctx_get(octx); fctx->orig = octx; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>