From patchwork Tue Oct 16 03:10: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: 10642811 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 3955618FD for ; Tue, 16 Oct 2018 03:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24DFC2988C for ; Tue, 16 Oct 2018 03:11:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1937E2989B; Tue, 16 Oct 2018 03:11:13 +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 A658E29897 for ; Tue, 16 Oct 2018 03:11:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A12486B0271; Mon, 15 Oct 2018 23:11:11 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9C2536B0272; Mon, 15 Oct 2018 23:11:11 -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 863C66B0273; Mon, 15 Oct 2018 23:11:11 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id 45CB26B0271 for ; Mon, 15 Oct 2018 23:11:11 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id b7-v6so16145349pgt.10 for ; Mon, 15 Oct 2018 20:11:11 -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=rEfUXhW9/07VWvUOTTL8k/fp/WOhaLhYwHwSFO9YygLhv7nPZYn281PmQieq35iofD Ewkxy24+ueqxxwqklPeTo/bM/dxkYixGHrUwRtrIf32kkB9PjvTD9eoElqbx9V4CTgYf gAPcaIjR+xFdv7djbQRYd8HZSltIyEVe8pea87RR9pOWResy+0Z5qeZzbaN9FLxue75U vet1KgX9kQTCG2tSHrHW43apNHjTZi7TtoSuRSspmp+j4pakBAIB4yOfyWlx976HkDnh gsfzeEGIdrM/83HgriikTeM4jhHBUV77J/Sa6lxp6o7aOFQBv6lo02k359B6q1wPckWt nccA== X-Gm-Message-State: ABuFfojLx6pRfsZ1j9Vgnqbd2iyXmiXOIs65jK4q9gCvkjEikMR8ks5+ mz8ApnJwOCuF9FLY8NFv6gcnGY6zSGqlJftl7BknsbEIewgLTOc8fYaPfQTwPT3Z/d03XJFVGsY XJS6eSmc4FLbTATdTC+bIvsptYACeUAsPRlLxMC6k4T2iSLqxwRa/KYCEUsba9d9dOA== X-Received: by 2002:a17:902:8a93:: with SMTP id p19-v6mr19426253plo.41.1539659470909; Mon, 15 Oct 2018 20:11:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV60/AGnMGLc+vikUBstacCrhe46ze9EzmJRI0jzjAZXEdSQO6LKQxSjH0MNrn+afq/5SbXFH X-Received: by 2002:a17:902:8a93:: with SMTP id p19-v6mr19426232plo.41.1539659470298; Mon, 15 Oct 2018 20:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539659470; cv=none; d=google.com; s=arc-20160816; b=Gnc4ALQXuTHKVxwdST62e9mX1ePrb1i1RSNoXmgQNa9xW4tNKIBCs9aM+on/EGRjEp 6YT9qIDOJwhhxy2IHVvez5/m58AKbpcyr3xgGDJ0ap2lHwPej5Uxzjfw9+VMx+NXaV4B kcEpH2SwvmV9XUuiffHpwVDs+XWmYaFHhziK8W5oey9+NlUPHAXxwPY7p4uPbixRq6kA hllXm8m3CZCNMUjDp80APpKLcoPbyeTWao8DqGXTfhRX5jY0t+1l7YiXov9rL4RIvTCn MEsFF1ZIADiBOeWkxofrj5q86ZJXUNmXG7jTH2h+Hz8xmk6aIxZDjBZRoICIsEnxvRZm eYQw== 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=g1JK8ZUjRClNxybunS/M71qnPZtswewzOZVDhtHvAtEmaxkMcJ7n+Bj36HIC3+0aAo LvbPQ1ICNj1UuTOHvDHf3Oe6t+7WGfh1ADdfCKuKCeZap8IYpNPJ+ifsl0r79jlMIjpR oaW2kiFkqYSH8hJGyD7xVa8aY+Kz6dcJVFZfXWYjp0w5BPDT1d5fuqpjqy0qFRGcMQp7 jdJhAgPM+BuZptqra+SeYBtAZeeJfggXKtj8u8v84mWQNcqWOBy9ZzsqQAKarV7mXNrg gQAGQqE5OsxfLZ9ACE4ZWQc//rZ/H8qL0OcRPHvx+oLxVIETLFFBxaoPqNQhSIFkNOMW kM8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=CLJP3nk3; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2130.oracle.com (userp2130.oracle.com. [156.151.31.86]) by mx.google.com with ESMTPS id s12-v6si12442127pfk.213.2018.10.15.20.11.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 20:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 as permitted sender) client-ip=156.151.31.86; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=CLJP3nk3; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 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 (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9G38Tvk044640; Tue, 16 Oct 2018 03:11:08 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=CLJP3nk3ZTAlz6+QdMB5a+jvV9WEbxvUXSfGLF94I3hUY3lhsXFVAbVmUStXlh/FmiX2 0BmyoJ/zCRkMvGAmMqnrmLwHAQMhUsia2VOGL/9OKrCvlok74Ju7cehCD8XwvopdwCwr ydRBPvn1CzYBucGpNXKoVaEg7420L/YXDOVd8K8KJRUr6TksXnK0CO2mN50tN4qxDWQE 90JdIwJVx/aN5WiofXW2Md89xm/zbAFkq8rZmJxXPta9b4gKiIxRnUXe3APmQagjJwmq +CGhhJGZMOIpSBnFDaNbR+DFODliCbUvSDBCJWlHJ6FbLrbeltbuOh+y0Cxs5Nm+C41R jQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2n384tx1mn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Oct 2018 03:11:08 +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 w9G3B27v012387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Oct 2018 03:11:02 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9G3B0Aw003992; Tue, 16 Oct 2018 03:11:00 GMT Received: from localhost (/10.159.227.150) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Oct 2018 20:10:59 -0700 Subject: [PATCH 09/26] 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: Mon, 15 Oct 2018 20:10:58 -0700 Message-ID: <153965945819.1256.12048748621963848640.stgit@magnolia> In-Reply-To: <153965939489.1256.7400115244528045860.stgit@magnolia> References: <153965939489.1256.7400115244528045860.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9047 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=709 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810160026 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;