Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4804658ybh; Tue, 6 Aug 2019 18:36:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlw/6MhJjdVmMdHopj5tKQIHdjb1yBuqZTPzeynq1agL2jNO5E8oVJ/PhkuaETqfMUbhzF X-Received: by 2002:a17:90a:2430:: with SMTP id h45mr6167684pje.14.1565141773108; Tue, 06 Aug 2019 18:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565141773; cv=none; d=google.com; s=arc-20160816; b=KIkm+ysydJOQsL8KdvbJYxLGTcenIK2xm39MBlzcwBTWB281RSZwXUwd28AfYDMqYf mDIGCqx6qYrHir3KLOI/tQcIZmr+OFvBA6kVKYTqMSHJM93XIwnbflAhzR0x3JqRFlCD 0e2tWZ9hgjxkLtvuX8ebmH0SlLuKoZN75peK9rhR/JnICANVm5jzvPPhuzIVc+9n+w6+ +iAqKgvSaWwnEHExsoYYmTN793ZlB/RU5B1P64pGiT4qEnB7og2sujAT6vNmnWQsIJfP lfZvnarH0qVXziR8JbDcSjf9hdKG24GkUjtppxFS3gm2g6Wq8hWimRYr7gqMDFwGG3E2 QjuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H0Etnn7JHR8H7TocLV05oLauZ77NAi3PGTTr9FTaKTw=; b=TcNEhe0ujWliTR8o33dFPGo00Papwxt20rv1jb+mlSnUpm7S2R5xnx9BsgcUGDhKiX EagyvFqv2qO8r9m7HyptT7KTNd6k6coDsVsz9DpNT0+sii7CQwWXUdQPHWEaFGPBpAtV h954h0cdHP8/4atY7yp9z4Ui41jSQOzqja+EtC+lCB8ZSilLuuu4QcRAsFk3ZFudhChR YZ2dioYcpMnyV2+l6Yk12Txumt6LpmZ7EjUO+n6x0iASBOGIl9VDBvaCgUTjuI9Ss+iW LEeWh5cbFTdSTAYu5LKFK2MUhSJUrOWivt2fHorhgi2lehuyAkmZpwCIXJFnyom+wNzS pSJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eS3YB7ZT; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si48455267pgm.188.2019.08.06.18.35.59; Tue, 06 Aug 2019 18:36:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eS3YB7ZT; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730285AbfHGBfg (ORCPT + 99 others); Tue, 6 Aug 2019 21:35:36 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40834 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730010AbfHGBes (ORCPT ); Tue, 6 Aug 2019 21:34:48 -0400 Received: by mail-pg1-f196.google.com with SMTP id w10so42542887pgj.7; Tue, 06 Aug 2019 18:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H0Etnn7JHR8H7TocLV05oLauZ77NAi3PGTTr9FTaKTw=; b=eS3YB7ZT4YXwuCcgQbB/xbD+n10dBypw+iZZVQIUwi66vhDfcSIp39QkGkG7an7OJl OiukENJvNGRlLtpSvoOFB7XysgcSlBHri3dSlfLLl2JoybffI8wnImTZeHQEdnORxVLa EBXGZhIf+YSKbjfkupoovScD765pOoXW+wmQ3q47Y78G67P4azJFj7Z03p0IlFla0TF0 WGS9epzDu3lNP0Hir82G8T/Dsucq+VMZQ717BtULEmOp/zZ+HeTgTfaZfag+K5X0r5bl +CKlJZyT3xTot1t0x6sX+RloIZlzVtbmPtAqvydRbxbh9+Ay6+ppy+Ss6WRVBPk23UrF ZgCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H0Etnn7JHR8H7TocLV05oLauZ77NAi3PGTTr9FTaKTw=; b=fSJ2AsSOXC0LDl/D/lBc6CzNf4M1WdOxZm1Vt0frrTx+zBGvKl7bgvLvDtyhkboebH fptzv6R8IhMcZkVwxmjQo1g+gWV+RYsD1evXUJB/1ulkagtGsA65lnK46DLV84UqIMJz OuuDK2sUbKjNoFitVLK0NRS+O7XiWfvBuWenhcT1zDkRpczvuCCYGwBYctBeV7Q6R3Xe pP6/EnTNOkLBhidjWKWgVq9zbnkeT6i5BTjIRIMTx8uIzKIcuxMwiYwowuzqZ9vXyHpH EcIVnzZqngEHm1fKStnApLrRffNFHsLJOONy7Ikd4koQB44iHAuq7/6+b1eo2oqKbQQT 0Frw== X-Gm-Message-State: APjAAAXNMcwFSP0vdANjL5DkOeyIha8hAu+NAfeMQuLX9ZV1XmHZOHMJ XqxLU+aQ1IKUIhT+ktvDWgs= X-Received: by 2002:aa7:8201:: with SMTP id k1mr6559788pfi.97.1565141687010; Tue, 06 Aug 2019 18:34:47 -0700 (PDT) Received: from blueforge.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id u69sm111740800pgu.77.2019.08.06.18.34.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 18:34:46 -0700 (PDT) From: john.hubbard@gmail.com X-Google-Original-From: jhubbard@nvidia.com To: Andrew Morton Cc: Christoph Hellwig , Dan Williams , Dave Chinner , Dave Hansen , Ira Weiny , Jan Kara , Jason Gunthorpe , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , LKML , amd-gfx@lists.freedesktop.org, ceph-devel@vger.kernel.org, devel@driverdev.osuosl.org, devel@lists.orangefs.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-xfs@vger.kernel.org, netdev@vger.kernel.org, rds-devel@oss.oracle.com, sparclinux@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org, John Hubbard , Daniel Black , Matthew Wilcox , Mike Kravetz Subject: [PATCH v3 39/41] mm/mlock.c: convert put_page() to put_user_page*() Date: Tue, 6 Aug 2019 18:33:38 -0700 Message-Id: <20190807013340.9706-40-jhubbard@nvidia.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190807013340.9706-1-jhubbard@nvidia.com> References: <20190807013340.9706-1-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: John Hubbard For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page() or release_pages(). This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions"). Cc: Dan Williams Cc: Daniel Black Cc: Jan Kara Cc: Jérôme Glisse Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: John Hubbard --- mm/mlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index a90099da4fb4..b980e6270e8a 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -345,7 +345,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone) get_page(page); /* for putback_lru_page() */ __munlock_isolated_page(page); unlock_page(page); - put_page(page); /* from follow_page_mask() */ + put_user_page(page); /* from follow_page_mask() */ } } } @@ -467,7 +467,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma, if (page && !IS_ERR(page)) { if (PageTransTail(page)) { VM_BUG_ON_PAGE(PageMlocked(page), page); - put_page(page); /* follow_page_mask() */ + put_user_page(page); /* follow_page_mask() */ } else if (PageTransHuge(page)) { lock_page(page); /* @@ -478,7 +478,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma, */ page_mask = munlock_vma_page(page); unlock_page(page); - put_page(page); /* follow_page_mask() */ + put_user_page(page); /* follow_page_mask() */ } else { /* * Non-huge pages are handled in batches via -- 2.22.0