Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6504090yba; Wed, 1 May 2019 13:44:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQK0v06q+iuZKI4oTBr8nBSQkyCc6xJKTeDB1fg9lruo0OUp317B0Dbo3XDC9fakigJH69 X-Received: by 2002:a63:e110:: with SMTP id z16mr42121pgh.165.1556743488737; Wed, 01 May 2019 13:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556743488; cv=none; d=google.com; s=arc-20160816; b=loZ96kd6canOh6XKLKJx0hIGtGcth3Ia4AzHVYb6OVnjUDipW53FCJT4tIU+nIpQSn yuS74m3+pIerRA/AQWndIbl3SpFN9cepAf+dCc1wO2UYXcAL1uqNvDoN3PVqUCbJ1sGC +YUJqU+wX2+w/abkeRXb9Wui7b0yl9EXIY4v8p6xkV2oHxPIxTNluTaYGo2OVDLadBza tuRaQqNG46uErNkbfkKa5Mg/DHfqKQNUFHFK2ZFQTW8sHHM647yR0ohu4m2vcsJZht8j RltisRaAVC2Qyof4cKqJSLZ0D+LuZU+r7ahD+fgmV+uZ4E7/AgyXnQS1chSVh2KVTIOE 529Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=xjFUiKHVKRYeZR2wUaD2tSOO8e6Ya1jD8WtfOGkq95Y=; b=SEi3WBy6M6Xr4s330gBBw8jMKY+l+0yWS4DGj7srkemEKNM+Tw+zNmyXBWjL8wGppi 2xPNE6xFKUGrjs4KZPgmLSWcC5Pcn5zJn6xJ+MTzyuEUygrYCii/D7zu019BpLGPyp90 m7GeICqpqFIymNryKDtvMVdkPr4yOBmq2rBAIht6Px0EsIVqakQEIZYFFEdBkFfjZDMf r1HqYeBrke5N9XBhv30u0jcJRNEZ85itQWDOR0q6ITUoxOaS9xedV4QhwDRvpYp0+cKE CLqOprnIrxJbCMROMwNsSX2GcMpz7FkOFmRK9hF6uyeGaK7udSWT09aWizlzw7k77UBb y8Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Wj+Rkbod; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si13429131pgq.180.2019.05.01.13.44.32; Wed, 01 May 2019 13:44:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Wj+Rkbod; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726270AbfEAUmB (ORCPT + 99 others); Wed, 1 May 2019 16:42:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58408 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbfEAUmA (ORCPT ); Wed, 1 May 2019 16:42:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xjFUiKHVKRYeZR2wUaD2tSOO8e6Ya1jD8WtfOGkq95Y=; b=Wj+RkbodXdXD8te9RPXfkToEu SifdbqvPQeFbdZ6nsnUxyXxNblHAFtIx/QJS1Z+UfSwLVE5oK5V1GRj4WbCG3F+UfkOd3iV95MD2B 2uiSigDEnf8eouEFLFTXfECiRstIdz81Zzy390omGT0BRP5V8pyylSVSR+gzsto2fVy2CyNTXrv8e 2RORYRDpoqjd/ImdNawKryn1ydZ3Xr8DsBJefdaFA/zGs8ZwdoEEPyzgxSkSFB2bP8W1uTG0P0Bbc udFmI0pB4+NTTnB42XM9jZyDA32Yj5relRWWlae/hqBYqhVccyOgITfDQppTVADE4XobuoEEsOH14 2iMz2+67g==; Received: from adsl-173-228-226-134.prtc.net ([173.228.226.134] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLw2P-0000N1-Nj; Wed, 01 May 2019 20:41:59 +0000 From: Christoph Hellwig To: ceph-devel@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: remove ceph_get_direct_page_vector Date: Wed, 1 May 2019 16:40:32 -0400 Message-Id: <20190501204032.26380-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function is entirely unused. Signed-off-by: Christoph Hellwig --- include/linux/ceph/libceph.h | 4 ---- net/ceph/pagevec.c | 33 --------------------------------- 2 files changed, 37 deletions(-) diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 337d5049ff93..a3cddf5f0e60 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h @@ -299,10 +299,6 @@ int ceph_wait_for_latest_osdmap(struct ceph_client *client, /* pagevec.c */ extern void ceph_release_page_vector(struct page **pages, int num_pages); - -extern struct page **ceph_get_direct_page_vector(const void __user *data, - int num_pages, - bool write_page); extern void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty); extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index d3736f5bffec..64305e7056a1 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -10,39 +10,6 @@ #include -/* - * build a vector of user pages - */ -struct page **ceph_get_direct_page_vector(const void __user *data, - int num_pages, bool write_page) -{ - struct page **pages; - int got = 0; - int rc = 0; - - pages = kmalloc_array(num_pages, sizeof(*pages), GFP_NOFS); - if (!pages) - return ERR_PTR(-ENOMEM); - - while (got < num_pages) { - rc = get_user_pages_fast( - (unsigned long)data + ((unsigned long)got * PAGE_SIZE), - num_pages - got, write_page, pages + got); - if (rc < 0) - break; - BUG_ON(rc == 0); - got += rc; - } - if (rc < 0) - goto fail; - return pages; - -fail: - ceph_put_page_vector(pages, got, false); - return ERR_PTR(rc); -} -EXPORT_SYMBOL(ceph_get_direct_page_vector); - void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) { int i; -- 2.20.1