From patchwork Wed Nov 16 10:26:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 20913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp69477wru; Wed, 16 Nov 2022 02:43:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf458iOg4gcrTFLzYosxmulAKtanSuKiCwHxCzJr7wwB93EwhnBCYS625HieGPfnzWmNaetP X-Received: by 2002:a17:90a:e606:b0:218:f09:8759 with SMTP id j6-20020a17090ae60600b002180f098759mr3179287pjy.133.1668595419292; Wed, 16 Nov 2022 02:43:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668595419; cv=none; d=google.com; s=arc-20160816; b=HlmAfdy1LP1uHAGYTCRfqc6e7x2lzt9cpPooF4wDWdut98Wyt5HnNiKEQ5qljx2WnZ 75sE4/vreIFwlUtEBZFm1lTGty/+jDbhxqR8B5V1PVjwQZ2v/qnR6A0ghDfQ8M4BZAw9 SvpUM+QDbERujldSHt+/a4vR/3qIZEb+cZiR1MHdNfBxsNb8WNi6ZXGDcLYB2CKAhVjb ZyIZnHhONP86Td0pCE35msg+hIvII8vrvNlu3E2NaIKvkuwkX2haXtOZl+vZvSRmoskN 69Qjx2QMCDTXNtutPkveHl2rmtikHkIFGODAl2C+L1EvTDbPbSQKZoK9+4FkMKe0Mvr+ 9yqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vwm/knGeRKTOygKvA/Obl+ChXNhkjAzB2LSFVD/DetE=; b=t72kkKCdW1Q8TzaYnLSzkCmzWueyllpZbwO6H+KoTbNk2Svu/NrlAvu2qhj8amm5Jg YbUmAj7g1mJReE9M5yhyBLJvq98n9ByFJz37gS/Cc74DaqMOJ4QctHxVoFLVC3Gm8nYZ GGWWPx8g6zPN3Gjx2EO/wiPOPdprNFh2+3FWu6YOU2ePZMCsqD0toCzim5rZUJbeTPwf J1F1sah+ppFYYdcjkspFVL5EXOiufYCqbDw/I4/RcKiquR8yq/kwKghbYIsJCc66dp5S HD+qAt9QPxnHS2t7i3Knm2+Z8KxjDlk2E3X0R0gExtSyho0n5BpgbaJBUiwAzfZTH04J IMsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LjiHv8xC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa3-20020a17090b1bc300b00214201e8996si1828473pjb.18.2022.11.16.02.43.26; Wed, 16 Nov 2022 02:43:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LjiHv8xC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238176AbiKPKme (ORCPT + 99 others); Wed, 16 Nov 2022 05:42:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238619AbiKPKkm (ORCPT ); Wed, 16 Nov 2022 05:40:42 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E5B2FC19 for ; Wed, 16 Nov 2022 02:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668594587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vwm/knGeRKTOygKvA/Obl+ChXNhkjAzB2LSFVD/DetE=; b=LjiHv8xCyA2Wlwt1ZSXOYcMq1jumYWpyiy06+YTXqEt8njzY2Tc4By+nPv7U81Jmcc9zQ2 bzIUDY0EId+pWECWd1rE1iBbYs5F2hnyk+3/R0u24hEGpSt143qQ5iEcMt94gpzkOrGjr8 0JQ9qX9jKlOt6CoFlJU2eNsYDlhrtyc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-454-brbllGSGP4mJ4Nc_w7a0rA-1; Wed, 16 Nov 2022 05:29:41 -0500 X-MC-Unique: brbllGSGP4mJ4Nc_w7a0rA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 714823C0E216; Wed, 16 Nov 2022 10:29:40 +0000 (UTC) Received: from t480s.fritz.box (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A8D52028E8F; Wed, 16 Nov 2022 10:29:33 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, Linus Torvalds , Andrew Morton , Jason Gunthorpe , John Hubbard , Peter Xu , Greg Kroah-Hartman , Andrea Arcangeli , Hugh Dickins , Nadav Amit , Vlastimil Babka , Matthew Wilcox , Mike Kravetz , Muchun Song , Shuah Khan , Lucas Stach , David Airlie , Oded Gabbay , Arnd Bergmann , Christoph Hellwig , Alex Williamson , David Hildenbrand , Dennis Dalessandro , Leon Romanovsky Subject: [PATCH mm-unstable v1 18/20] RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage Date: Wed, 16 Nov 2022 11:26:57 +0100 Message-Id: <20221116102659.70287-19-david@redhat.com> In-Reply-To: <20221116102659.70287-1-david@redhat.com> References: <20221116102659.70287-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749649110310787140?= X-GMAIL-MSGID: =?utf-8?q?1749649110310787140?= FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: David Hildenbrand --- drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index f4b5f05058e4..f693bc753b6b 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c @@ -110,7 +110,7 @@ int qib_get_user_pages(unsigned long start_page, size_t num_pages, for (got = 0; got < num_pages; got += ret) { ret = pin_user_pages(start_page + got * PAGE_SIZE, num_pages - got, - FOLL_LONGTERM | FOLL_WRITE | FOLL_FORCE, + FOLL_LONGTERM | FOLL_WRITE, p + got, NULL); if (ret < 0) { mmap_read_unlock(current->mm);