Message ID | 20181115155217.GA28043@jordon-HP-15-Notebook-PC (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5680E109C for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 15 Nov 2018 15:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99E0A2C55A for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 15 Nov 2018 15:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87A612C55E; Thu, 15 Nov 2018 15:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CF6E2C55A for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 15 Nov 2018 15:48:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39E466B04A3; Thu, 15 Nov 2018 10:48:44 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 34DAE6B04A4; Thu, 15 Nov 2018 10:48:44 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EFA36B04A5; Thu, 15 Nov 2018 10:48:44 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by kanga.kvack.org (Postfix) with ESMTP id C9F916B04A3 for <linux-mm@kvack.org>; Thu, 15 Nov 2018 10:48:43 -0500 (EST) Received: by mail-pg1-f198.google.com with SMTP id r13so13158004pgb.7 for <linux-mm@kvack.org>; Thu, 15 Nov 2018 07:48:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:mime-version:content-disposition:user-agent; bh=oOYDPl7I11jBlyi0EH4ySGobxWcMxdpKNBu+OKkydwU=; b=VgVYbwYFa+xaHUHIBvJ7mNEA8pKYVY4L6qpYJGJ8H79Tf2r2gBBWY3EVfy2/UYCDWY GAHTpH0kcf2qjciucDQmV0Vyx5Gu1BW+Xfg+/JCv9pnLB9EBnptuZOsyXaPrsZ7I/ycx 0CeEQA5HLCNOzaxlRZxviO0fOSzisdwx1QurfkI6KZ/xcF3dKAIJoF9q168sfuuYfytS 0ztjB+x89vjTQYUvO5EkSyFgvto23U8oE0gcyupsCEuSProMJQI/+BLwcHAkZKsRCAPb FoPgJJRfPQblTs55ilFnzjdGOY5etI+925iztaI8NDi3h2+9ts2P+UWCBoDArXIOqM3o Ts0Q== X-Gm-Message-State: AGRZ1gKDnjSs6aOG5b0GNnM+SZjUZ1k0hWvf2cLoQoGxtUViGgc4jjib eq6Co1UZ1Lo/CBqcH9Ui5olueXKCUOkDs6OETCpmU2PEAquN5WojOcoeCUPzaBvR+AeXVyGaWUm 0+vPNqM4j6CvR3nx0rrbEew0YHglOsUT6RACmonZhAT8mHO+jF/Rx3xhNK+ha31rak1jh97J9RX ogoSjmC4oakcuctP/oknVbLvsaMdntpNua7BQ91pR4EOCTWt+kZAnXjQR/UbuQK5zR68cf//I/G p0zDTwUesEeV2YEy13jrJOnO2bsoloGMap4t9TsezXZIHW3sw029SPCe/BegXMYsIREEbq2aG9O 09op5KikQOK6hMpl6n7k/7D10kKLZ0coP323JehLX/Dl3nUG+PjZceQbZFJFNcuDQ3/h1MEqDUh C X-Received: by 2002:a17:902:6848:: with SMTP id f8mr6618198pln.300.1542296923496; Thu, 15 Nov 2018 07:48:43 -0800 (PST) X-Received: by 2002:a17:902:6848:: with SMTP id f8mr6618157pln.300.1542296922708; Thu, 15 Nov 2018 07:48:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542296922; cv=none; d=google.com; s=arc-20160816; b=J4V5Igkxc/hNE7TnkAO69Q8FK3aao0Uj9DzH1W1Pxs6JjBeXDmfbnOLSC7wyNHJXUl /pDw16acNBNAiv5t5SnzUjcBgLyziHsKTFHaOEZImN+2mBJSuGz43fxv0SoY3hHDIZPR NRwD3FtqWhe42LWw//MYV+hVKn397U7DfKBSnYzZxFdAqXZwvFm7RGzIZIbqa2x6/PgS eFE7ZC+mLT0OuWQzlegr1nslyh9ey8aFKCV94uejDB/2gE46CHmyNPnNdcL7c2WxArdA bKIuIzae7UKkiGHQ3g5JCTR+q/iarDB/sZ9YmUKKTTNonE+bnNjkB4CK9YYyeoC53HsN oPPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature; bh=oOYDPl7I11jBlyi0EH4ySGobxWcMxdpKNBu+OKkydwU=; b=cThQ3roTdE0vYtlzJj8tXdckCJ5oa/17pUAl4dKvAsBq2Qe1qpFi23MrhsgbsIALaq wfYKjFeDhl4v7e3w8auBZLAsTBt2tH1rs7D3GKZImgA7u92i2eSPfTqslevjINzTkhqL t2BXMOpIRZTZ3WMS/phbzEe4CsPR0QKrMayGTQaAZkcYXXL4QAFHw7d1S7dw17SDbTXO L72EDpD6LCDk28dqlYGZETxdv/0BJVD2ILn7Ut1tpzwYsHrlr449/lUR0kc4pWE/+VCP odEB8KZKkqVedo771BmE6REW350EctMFsblnRmUHBerEC5NJ478eNpKTI4UH9mTrHgvD QP6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inoihOzV; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e188sor31719514pgc.19.2018.11.15.07.48.42 for <linux-mm@kvack.org> (Google Transport Security); Thu, 15 Nov 2018 07:48:42 -0800 (PST) Received-SPF: pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inoihOzV; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=oOYDPl7I11jBlyi0EH4ySGobxWcMxdpKNBu+OKkydwU=; b=inoihOzVvauWHLvinRNbPtuEK6bN3+FQjdHdAI6xnemcLobPU0Xt6Ugh9wMw8hy+rs SOOfP9IJWbgvb3W6nI6Vu/Ctq16+fij7Hf5bE9+b2zmCxmJgqSyAiDDy1MisrdVm1oJP HiYJF6PEIMeekVPyyUZs2rrfC/13Ml+iDvdsOlZIgYkCH/4ILc2Xy/vGY1bNwte/mJp3 A3JcWZ7VJduEIzQ/vGk77Gd8mfS3EUtNGkFSc5B6qUpWwGsTGf1W1Ptu/h9scnpbIm0/ dkkTPFv3gU6AJIK9HYZuzsg45rCpYszyCjUkQGTMFgGNAUHkMJeJ7XErWJR4PEsddndp roHQ== X-Google-Smtp-Source: AJdET5c287Ctegge8urpXjRpkwaEtQ9te3hfg5O2h3PwVJmQ1DKCM7oivVkSw2SZUVl3XEpvWdPufg== X-Received: by 2002:a63:c746:: with SMTP id v6-v6mr6404071pgg.108.1542296921906; Thu, 15 Nov 2018 07:48:41 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([103.227.97.233]) by smtp.gmail.com with ESMTPSA id w66-v6sm30499900pfb.51.2018.11.15.07.48.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Nov 2018 07:48:41 -0800 (PST) Date: Thu, 15 Nov 2018 21:22:17 +0530 From: Souptick Joarder <jrdr.linux@gmail.com> To: akpm@linux-foundation.org, willy@infradead.org, mhocko@suse.com, boris.ostrovsky@oracle.com, jgross@suse.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 9/9] xen/privcmd-buf.c: Convert to use vm_insert_range Message-ID: <20181115155217.GA28043@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Use vm_insert_range
|
expand
|
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c index df1ed37..8d8255b 100644 --- a/drivers/xen/privcmd-buf.c +++ b/drivers/xen/privcmd-buf.c @@ -180,12 +180,8 @@ static int privcmd_buf_mmap(struct file *file, struct vm_area_struct *vma) if (vma_priv->n_pages != count) ret = -ENOMEM; else - for (i = 0; i < vma_priv->n_pages; i++) { - ret = vm_insert_page(vma, vma->vm_start + i * PAGE_SIZE, - vma_priv->pages[i]); - if (ret) - break; - } + ret = vm_insert_range(vma, vma->vm_start, vma_priv->pages, + vma_priv->n_pages); if (ret) privcmd_buf_vmapriv_free(vma_priv);