From patchwork Sat Oct 13 00:06:45 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: 10639511 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 4DBA51508 for ; Sat, 13 Oct 2018 00:06:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B9392B79F for ; Sat, 13 Oct 2018 00:06:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F3992B7FA; Sat, 13 Oct 2018 00:06:54 +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 C00E72B79F for ; Sat, 13 Oct 2018 00:06:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C7A56B0273; Fri, 12 Oct 2018 20:06:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 178B96B0274; Fri, 12 Oct 2018 20:06:52 -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 EE0DD6B0275; Fri, 12 Oct 2018 20:06:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by kanga.kvack.org (Postfix) with ESMTP id C52746B0273 for ; Fri, 12 Oct 2018 20:06:51 -0400 (EDT) Received: by mail-qk1-f199.google.com with SMTP id n188-v6so13344439qke.6 for ; Fri, 12 Oct 2018 17:06:51 -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=Kfx6b01y0nD5NBow+aLHaMRvX2Vt7rtxPOY+lM34dJ0=; b=XkmtR5Ee90FV5oRTwNh+MfWhHDJAM32JbKuSdO4Txmgbbldj91b32deRUtZCZpvi43 ikTnGljULo+Y9C7s3UOcMCBTuMSHJFT7b6l2Si85VY916R9m+N5wWapIk0PESBggq4Ym Z9lTNJaTlHwXGLCP65hR5xNJcMBItFVXYWUGqk9ICwtCo24uxeo5pIvBbhQzWijwiPTh oRfdNlRKNDYu0Xs3uSsEWPVt46fw/eFqKNI9MOp2lLorZlF3gHzA17NuUuKTIe6ko0UW WMOXdgC8c33VCbB+9baPf457N5yW8Gd6+BY3pw068Kzf/50DBH74IldNwNed2a3Pq8/E O35A== X-Gm-Message-State: ABuFfoiqcMQghyEl8VJGQd7TC6Nthb3xlVxFg5uZWz5NheOXYSMUCK9j qyo06P1zXw860t0fq5nbGSp7i6IoIZjPlufkuYoZ7/w9Vd4V2EW6vnH0BnaLRXl6EDE0qrjOn1l BhJtKy7Koep9ewn+WQrCpEEuNsRxh9Zi1XXm097lctxbFnmnLV87afK5gH+33gnZsqw== X-Received: by 2002:ac8:5257:: with SMTP id y23-v6mr7805515qtn.78.1539389211599; Fri, 12 Oct 2018 17:06:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV63EGwMuba52601YaX5lvzICVt+NJ0lQFCcBTK7z+SPzbjvHaZCmN2goqV25qJl0OmQfs1Pl X-Received: by 2002:ac8:5257:: with SMTP id y23-v6mr7805498qtn.78.1539389211125; Fri, 12 Oct 2018 17:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539389211; cv=none; d=google.com; s=arc-20160816; b=un32IOBOm3Ux6OjymwBrz+2/TPC2JECCfreKINIhPUp+DYFKzXcH2RBScqru76c4zA JaoqlE5iTf+0qH/fZpaaV7S6K9C5c45fgOjNCsXFosEqnvwPj6TWT+Uq16kxR1g7Pucn Z5sJcAo4rQX0RAQ5qPVqoBuQEG1fyrs372DSD4K3aYa5t47mQZ6iLuhIKYREw1CiAPou bPr3er23RbLFHs2mtvXaNLViXnAI3HHmht8LUfmpm0VCSNKz+SnzqgoHrq/KTOuoVutn BcZ3F8tXifRE2yZ1h3GV0AQra88MLgs+gSPjQmYm/oWXZpTfojS5BTS6JFcmUlapbkGf 2XWw== 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=Kfx6b01y0nD5NBow+aLHaMRvX2Vt7rtxPOY+lM34dJ0=; b=UN0H6hLkRYJdah5voEsTr8BjqhUksamNrLATeD9usWRrmR6eLobPwkRly8qo3VEon7 90TaOiCDcFBBc8TV/h6d0c/uFnqoGXJPCbBeqj6nvV35v/i7/g7Vl9N9dErP6qWTPIwb vx23jOOB+Lom/2QEWj3vj4R37pDdIkz6bOrFQYRYoHHFA0OjKUWYN6PrUR5fj/mPPQrH IKul2fPGiLIxd6kGJpPP4FI+ztNPa6MSool3TVlX3DVu/9nYRHzue5XoUjpcNLuoGz4d v/QnSWJ47Dz6swRPZ2BcIsFzHaqVwrxV7ZyDj6XuXqQD1Ha1SgUPEY4ezHj5hnjxx7Zs 1dew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=GyqOWL0c; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2120.oracle.com (userp2120.oracle.com. [156.151.31.85]) by mx.google.com with ESMTPS id l15-v6si467239qkj.184.2018.10.12.17.06.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 17:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) client-ip=156.151.31.85; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=GyqOWL0c; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 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 (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9D04QNx104849; Sat, 13 Oct 2018 00:06:48 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=Kfx6b01y0nD5NBow+aLHaMRvX2Vt7rtxPOY+lM34dJ0=; b=GyqOWL0cUdSzX/9zPjcH1a8PqRvhjb5Ux0q7TVuExawynupsH4bc7CSoWwrfcTfahe/5 K2L85IoiIY06b2hSYdm2H6s95lYZPSzrP0zhALOxFJmS+5wj6EUllj/9I+rb2A4KOFr/ Z3pT0qao0kidwTiAaxA2C4hEVvdMrbX1X4KS1CbkFf9Kc84qvIEI9IuCDve0uLio3bY7 rIM+X+gkz7/g/UlLXIMbcTPtsnDAAwfE/cF6k4pDL5lftkAxP47Bnp31m6l6M+yUkJr7 MpZz1fvDjqJuhmwse/wmy3/hobn5X1h48mE43b3gLZJOB99a5LxBfZQAcjDQUev0dGBl kw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2mxnprnfhb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 00:06:48 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9D06lF1018185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 00:06:47 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9D06kV9018800; Sat, 13 Oct 2018 00:06:47 GMT Received: from localhost (/10.159.251.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Oct 2018 00:06:46 +0000 Subject: [PATCH 09/25] 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: Fri, 12 Oct 2018 17:06:45 -0700 Message-ID: <153938920501.8361.2713830760292171099.stgit@magnolia> In-Reply-To: <153938912912.8361.13446310416406388958.stgit@magnolia> References: <153938912912.8361.13446310416406388958.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9044 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=708 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810130000 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 65285524e4c3..ff6fcb3b99dd 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); @@ -1834,11 +1834,11 @@ int do_clone_file_range(struct file *file_in, loff_t pos_in, if (!file_in->f_op->remap_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; @@ -1971,7 +1971,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; @@ -2033,7 +2033,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;