From patchwork Sun Oct 21 16:15:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10651019 Return-Path: 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 3328F13A9 for ; Sun, 21 Oct 2018 16:16:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20F94287BE for ; Sun, 21 Oct 2018 16:16:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15898287C2; Sun, 21 Oct 2018 16:16:08 +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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY 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 A7C45287BE for ; Sun, 21 Oct 2018 16:16:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 71F616B026A; Sun, 21 Oct 2018 12:16:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6CF286B026B; Sun, 21 Oct 2018 12:16:06 -0400 (EDT) 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 5BE786B026C; Sun, 21 Oct 2018 12:16:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-yw1-f70.google.com (mail-yw1-f70.google.com [209.85.161.70]) by kanga.kvack.org (Postfix) with ESMTP id 2B13E6B026B for ; Sun, 21 Oct 2018 12:16:06 -0400 (EDT) Received: by mail-yw1-f70.google.com with SMTP id d23-v6so25303243ywd.8 for ; Sun, 21 Oct 2018 09:16:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:cc:date :message-id:in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=lbgR3wOuOLZGLL8/c8R4UCc54EWHiKBjm/iFOf5M+sk=; b=LWpex+3F7Kde0OCiK80C5g+h+l4qaqTKiRWiL1nHMZHNpTdremdS1aNUfEtr46oD6F NluyNo+dDTCgLegHG+DwCA5jksWlxC1aUmnURkpvvoV+v5YlS4cXnt9qZBrU7i4IfHBv eqvOxhOK723m+fOIQ5Pb6wYJ7JbsZBW+VHskqtry9XThisObuSW3aXJTsVaQfulAwepO if1mnE5lFI3YN6L8vjOiHWBxN37ECpLN6Q0IJkBKwgyvDEGF3ozT8x4EVwAUQAAsSQan vzXR9Mw1+N1mT3BsN8tv591S621779es/bJ+zV4e1KzQING1knNoTPrKBhLztFmcoSPV s4BQ== X-Gm-Message-State: ABuFfog7eO82YFaTVtUK9Gf1VyTXYQZ5CN7mOAFRPJ6fXZZAjrk4z3V9 fNtOAr1NL0vU2CFdhXWK781jiEi6y8/dOiS2swLCi0kAV7Qp9KIdnH65UBx8uP/mGQzWRmTC3gu y5XNFP4xq4SutWC1YyB9pDKINuevkcdZfR6nm0p6TnRQSa4MIgz6nfquJHQvX6eBJvA== X-Received: by 2002:a81:53c1:: with SMTP id h184-v6mr29851747ywb.101.1540138565872; Sun, 21 Oct 2018 09:16:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62SpcOoH8nl7SnXFHBK+qZZ7B3hIrhk9rBzN/aguj1hdYWdKGNvLXuToSziLzLYbrBvxF7m X-Received: by 2002:a81:53c1:: with SMTP id h184-v6mr29851710ywb.101.1540138565352; Sun, 21 Oct 2018 09:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540138565; cv=none; d=google.com; s=arc-20160816; b=q9pANm51BLy29gi3UwBA7L8vPSEOPfuMCEv01A85L+YHwfw1bqlKuWHFg1lkAnvsRY KPauMeHd5v4SuGRFuZpqo9cnZouyTDBvwrhSQrFoOHqNAsPrz9obYL215SmOYvXhwf2g O6tbSLJ2a4o9U+3lENiYWw3YFWWZ/R2ghhSw4+YMpl4kD3EsZKekbvjqH+fyYD4M4DxA 7K9teqLckGzMa481NzUTtpqshscQbOaUhbWzhdy0pfLZhLhKETBOPq6HtA7bFBMSeyne hYabRee4Vt/nrqzzxCJuUixuOXUHyt5d/Q0sD6VdsSuQ6dJoaTzeIZ/DGFPWfqlWLNin MCEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject:dkim-signature; bh=lbgR3wOuOLZGLL8/c8R4UCc54EWHiKBjm/iFOf5M+sk=; b=Xk7TbYL4jr5m3j9B4ATcFF3lB5OzAwA1Yluv4FRWZWCPJ1/OiAX6YOWlwLgqprnAhY fxf1k93uhZwjYUHf2Onf7no1IGHGr2bdj9TnFSj+GS26b2StUxhGfjc6zFjQKIOtzV7Y wM3YTedRTmknwExLsBntgh7VkicS2nfqGLRMeHq7ULSgywcishJMRJWzVzbTPWsNLPUa wpxrIfTTeFl0Pwb7v6TDMIYTJfxtWqxRM/ApaoS/sm84yXAV/H3HzMuDE43TTkaKB6Hr 7+c2fSKhuDZkzkvwIJgiqU7GjT89n6j7AR0HjU7cE8KRhiaExGXD0AafDnUAKI5r1kRM M+MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=n6L7avtx; spf=pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2120.oracle.com (aserp2120.oracle.com. [141.146.126.78]) by mx.google.com with ESMTPS id o26-v6si13920675ybj.34.2018.10.21.09.16.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Oct 2018 09:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) client-ip=141.146.126.78; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=n6L7avtx; spf=pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9LGE650154818; Sun, 21 Oct 2018 16:16:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=lbgR3wOuOLZGLL8/c8R4UCc54EWHiKBjm/iFOf5M+sk=; b=n6L7avtxPHSrZRUnsbJm+xUBs9dbvUZW8h8rDvfvIbXNC+YAJJimK8Lc+4n2NdxoaD6X a5de+M4HczsI+FTbTY8ADlMmmFf9LBfsJ47PVUBxqGl7wt42x/N7+cWibXLLpZN1ZHw0 EEyKV83b/5/ip2rtFyHNZmzKSf3jv3JYegQcMPSI2u5RqE6fJvW0cA4HZEu0S5eOFMbN 1khxwhvPjHoKFAkPdQZ4kNy5wZ+/TeCJwST+MuxBZ7MXSik3bVvc4jwCX+sjjpHO2Len vU36WlKLepmSUQr7Ai/dKlFocBQVXAwGu4VtpRa0o6CBG9TfWoPpSwZavJ6V4ZqwqWfW Mg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2n7vapjypd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Oct 2018 16:16:02 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9LGG1ri025777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Oct 2018 16:16:01 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9LGG0oR018910; Sun, 21 Oct 2018 16:16:00 GMT Received: from localhost (/10.159.225.70) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 21 Oct 2018 09:16:00 -0700 Subject: [PATCH 08/28] vfs: rename clone_verify_area to remap_verify_area From: "Darrick J. Wong" To: david@fromorbit.com, darrick.wong@oracle.com Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, Amir Goldstein , linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com Date: Sun, 21 Oct 2018 09:15:58 -0700 Message-ID: <154013855860.29026.18117400241937143769.stgit@magnolia> In-Reply-To: <154013850285.29026.16168387526580596209.stgit@magnolia> References: <154013850285.29026.16168387526580596209.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9053 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=706 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810210151 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: X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Since we use clone_verify_area for both clone and dedupe range checks, rename the function to make it clear that it's for both. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein --- fs/read_write.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index aca75a97a695..734c5661fb69 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1686,7 +1686,7 @@ SYSCALL_DEFINE6(copy_file_range, int, fd_in, loff_t __user *, off_in, return ret; } -static int clone_verify_area(struct file *file, loff_t pos, u64 len, bool write) +static int remap_verify_area(struct file *file, loff_t pos, u64 len, bool write) { struct inode *inode = file_inode(file); @@ -1852,11 +1852,11 @@ int do_clone_file_range(struct file *file_in, loff_t pos_in, if (!file_in->f_op->clone_file_range) return -EOPNOTSUPP; - ret = clone_verify_area(file_in, pos_in, len, false); + ret = remap_verify_area(file_in, pos_in, len, false); if (ret) return ret; - ret = clone_verify_area(file_out, pos_out, len, true); + ret = remap_verify_area(file_out, pos_out, len, true); if (ret) return ret; @@ -1989,7 +1989,7 @@ int vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, if (ret) return ret; - ret = clone_verify_area(dst_file, dst_pos, len, true); + ret = remap_verify_area(dst_file, dst_pos, len, true); if (ret < 0) goto out_drop_write; @@ -2051,7 +2051,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same) if (!S_ISREG(src->i_mode)) goto out; - ret = clone_verify_area(file, off, len, false); + ret = remap_verify_area(file, off, len, false); if (ret < 0) goto out; ret = 0;