]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: userfaultfd: don't pass around both mm and vma
authorAxel Rasmussen <axelrasmussen@google.com>
Tue, 14 Mar 2023 22:12:48 +0000 (15:12 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:25:04 +0000 (16:25 -0700)
commit8b406e04a01eeba52fbfbae7d4cc7a620c68d28e
treeb845f14e6b6bd8f75c8bc00662f2ab4dd035c145
parent151f19f9dab8e63a3ca889710ed5bc2e3f38dc0b
mm: userfaultfd: don't pass around both mm and vma

Quite a few userfaultfd functions took both mm and vma pointers as
arguments.  Since the mm is trivially accessible via vma->vm_mm, there's
no reason to pass both; it just needlessly extends the already long
argument list.

Get rid of the mm pointer, where possible, to shorten the argument list.

Link: https://lkml.kernel.org/r/20230314221250.682452-3-axelrasmussen@google.com
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Acked-by: Peter Xu <peterx@redhat.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Hugh Dickins <hughd@google.com>
Cc: James Houghton <jthoughton@google.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nadav Amit <namit@vmware.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/userfaultfd.c
include/linux/hugetlb.h
include/linux/shmem_fs.h
include/linux/userfaultfd_k.h
mm/hugetlb.c
mm/shmem.c
mm/userfaultfd.c