From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF3B8C4332F for ; Mon, 4 Oct 2021 12:51:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5042C61154 for ; Mon, 4 Oct 2021 12:51:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5042C61154 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3B5AD94000E; Mon, 4 Oct 2021 08:51:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CE14940010; Mon, 4 Oct 2021 08:51:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E3A3794000B; Mon, 4 Oct 2021 08:51:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id C464094000E for ; Mon, 4 Oct 2021 08:51:44 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 869E31813CBAC for ; Mon, 4 Oct 2021 12:51:44 +0000 (UTC) X-FDA: 78658741728.03.8AB305B Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by imf27.hostedemail.com (Postfix) with ESMTP id 1DB647008644 for ; Mon, 4 Oct 2021 12:51:43 +0000 (UTC) Received: from wittgenstein.fritz.box (ip5f5bd0d9.dynamic.kabel-deutschland.de [95.91.208.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id BD28D4199E; Mon, 4 Oct 2021 12:51:41 +0000 (UTC) From: Christian Brauner To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Vlastimil Babka , Suren Baghdasaryan , Matthew Bobrowski , Alexander Duyck , Jan Kara , Christian Brauner Subject: [PATCH 0/2] Introduce simple pidfd to task helper Date: Mon, 4 Oct 2021 14:50:48 +0200 Message-Id: <20211004125050.1153693-1-christian.brauner@ubuntu.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1DB647008644 X-Stat-Signature: owzd7ooj1xo178iw8a8pihmnb73cb9ji Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=none (imf27.hostedemail.com: domain of christian.brauner@ubuntu.com has no SPF policy when checking 185.125.188.121) smtp.mailfrom=christian.brauner@ubuntu.com X-HE-Tag: 1633351903-652787 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hey everyone, This adds a simple helper to get rid of some code duplication introduced with the addition of two new pidfd-based syscalls in mm. We should've probably added the helper right away and I think I mentioned this during in the review on one of the revisions but we probably just lost track of it. If this looks ok to you, I'll queue this up for next. Thanks! Christian Christian Brauner (2): pid: add pidfd_get_task() helper mm: use pidfd_get_task() include/linux/pid.h | 1 + kernel/pid.c | 34 ++++++++++++++++++++++++++++++++++ mm/madvise.c | 15 +++------------ mm/oom_kill.c | 15 +++------------ 4 files changed, 41 insertions(+), 24 deletions(-) base-commit: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 --=20 2.30.2