]> git.baikalelectronics.ru Git - kernel.git/commit
userfaultfd: convert to use anon_inode_getfd()
authorEric Biggers <ebiggers@google.com>
Thu, 1 Feb 2018 00:19:48 +0000 (16:19 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Feb 2018 01:18:39 +0000 (17:18 -0800)
commit94bcce7ae441346328755a9f8703f050dc873e30
tree001b843c3d63357e0a6a7dbb95192bd5feba116d
parent8d2f4ffc2e9da4aa86368e2de8b8074cd5c9a4ee
userfaultfd: convert to use anon_inode_getfd()

Nothing actually calls userfaultfd_file_create() besides the
userfaultfd() system call itself.  So simplify things by folding it into
the system call and using anon_inode_getfd() instead of
anon_inode_getfile().  Do the same in resolve_userfault_fork() as well.

This removes over 50 lines with no change in functionality.

Link: http://lkml.kernel.org/r/20171229212403.22800-1-ebiggers3@gmail.com
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/userfaultfd.c