Message ID | 153981631026.5568.8290637209446807642.stgit@magnolia (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 F0672157A for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 17 Oct 2018 22:45:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E19E7288C7 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 17 Oct 2018 22:45:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D56F5288F8; Wed, 17 Oct 2018 22:45:18 +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 70CE2288C7 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 17 Oct 2018 22:45:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA7DB6B0275; Wed, 17 Oct 2018 18:45:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C2EC16B0277; Wed, 17 Oct 2018 18:45:16 -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 A80346B0278; Wed, 17 Oct 2018 18:45:16 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id 605116B0275 for <linux-mm@kvack.org>; Wed, 17 Oct 2018 18:45:16 -0400 (EDT) Received: by mail-pf1-f199.google.com with SMTP id v88-v6so28415378pfk.19 for <linux-mm@kvack.org>; Wed, 17 Oct 2018 15:45:16 -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=ubVWP/WPtiUS8mf3LZX4usL0O6ISRabDaqHhRZ8Zx9bXEdVXJyu87v2pPgMJTpcS/s nFT2iaf78Nn+6/QnOKq72Pfd6IzZ/HEKX9QVhxdWYSMp5yZjfnfid0/tWbIMASqKzf/T +rxz8Q9i5cUJ85CI7TM3kj0JzZHZPR/PjT+PModQV7jRLsXI/pHzrxfDza8Vuxh9ZUTK KLgXU1M+ao4jXsVXe9XzElP4fJt669xDKSsKXwUTJ4I3k1MbprFxFvUKTAhsrfSbGcYv U8t2cj7UZKkzS6DOqH+cSw/NS2K3diHEBASbEwF0xXfFjwlN3b/xXvNdQ36RCgvEAtdi jU5Q== X-Gm-Message-State: ABuFfohIHQBcN/Sf2hgEZSJUcPxCr0zMUOc61EHtAzfGzYxZC5hWdC59 nICs3seeYxI1BxSSElnGdfyLvzwdTwWdblIDYRwi9J/x0BBBOzcju9efai5tD4xdr5SrvN4aIf8 cr19BxErW4ik9YQhD7u4zvTMCtBxRyp/bB+e4/FRw+2igXTOLGuoklMO4HIgENti4Fg== X-Received: by 2002:a17:902:f203:: with SMTP id gn3mr26504867plb.93.1539816316083; Wed, 17 Oct 2018 15:45:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV60RMLXllv0YlwztXdPdmDmJwqohv5uFgQHS5EwIMKGzDyYFyAWimvxuj0gTdPhFzw4y9Klg X-Received: by 2002:a17:902:f203:: with SMTP id gn3mr26504837plb.93.1539816315432; Wed, 17 Oct 2018 15:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539816315; cv=none; d=google.com; s=arc-20160816; b=WaV73XEkUAs6KU5nuj5F8m3pbnWpB8iNlcTClD664Yd68qoozZw4BvP4Sl3X92ESLu dFgPtuh5499AKWcrarzCcDqmQ8GAhqjQ+4WjDp5KyXO3J04EY0XueI6oImiGzL0+ScSw /esj86A8UqFRv3a2mkbAEL1F1LTLMiUVEFIRAglw3fK77a0huhRAP4IlmNMbeah1Jxv+ leYujXRNLDXCLiUFuEsUiiwCZrwhzlhzt68sTuUFEkdQePB7y2sHf3udiGJfqNNkwDtG 4/MZSoM8kFVwuWOxn9Dmg4ZWvtwfhkWVDYSwOXw1OV4wEgQ0wiAefndc/aWfxD1ur+mm NWxA== 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=lEgDL1nJ4H+CQJOVmMUlMW02mJ6Vmq1WdmWD0XYW9cq+uoCSd/0etqXFkYceVZfji+ lCZWDZTK0+80g2CxfhaA/N7VYuhKRv2nNDhQ9OQPtLBSNGpYfP18riLzTBTHZXlTmZrw 55cQnStSnJVziZulqxy+dCBDpfyJCM1K234bKfbPPuwXPvX/IYGLosLdFAtCUfe4UEDx HdX0OV45kUfeBOGwvN/eM1mkfDHcPZQHgcpHAEUoGXXdZ1OqZzoy2kTilZEDvJNfQ01W +neyjdc3+4ar2LSmEtN46utmEiNJ+5qPypoy+eAPRcHaOSQlJ7rTORzTW57AAYg/hGEe smcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=a0WQ4eNp; 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 e3-v6si2517531plk.215.2018.10.17.15.45.15 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:45:15 -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=a0WQ4eNp; 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 w9HMiGVa040211; Wed, 17 Oct 2018 22:45:13 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=a0WQ4eNpPV039yem0kQR1DYG4bktBk8YqILWNlveUzMisQBxCkkf1s6909UG3Tzg2eyp p0mbi1m9GTiLsGNIU4265KRt3hPIFlmIdLvnATM/SiIM5MFh9mka1YYCKxjXWrYnziUg ONHRSYh8OUvyHRgOzPqczLCZ1Y8lMqroEzF6fUsTP+spSBFGksjm+v/FWuQf2RAFeXuT VySIebyEKSwIaxCCa59W/Bk2k0GPyrLF9wTAB/wAfPOVC7ZtzvwfBj8Fc4MvAVwpzFsn YpIserfWD9WaOvEjIs8Zddosprp8qnXsZv0KpYTBBdOfn+Z0dP9BO3zJ9Zk1xBOOEcqq 0w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2n384u9yx5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 22:45:13 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9HMjCBa012260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 22:45:12 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9HMjClM014843; Wed, 17 Oct 2018 22:45:12 GMT Received: from localhost (/10.159.132.177) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Oct 2018 15:45:11 -0700 Subject: [PATCH 08/29] vfs: rename clone_verify_area to remap_verify_area From: "Darrick J. Wong" <darrick.wong@oracle.com> To: david@fromorbit.com, darrick.wong@oracle.com Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, Amir Goldstein <amir73il@gmail.com>, 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: Wed, 17 Oct 2018 15:45:10 -0700 Message-ID: <153981631026.5568.8290637209446807642.stgit@magnolia> In-Reply-To: <153981625504.5568.2708520119290577378.stgit@magnolia> References: <153981625504.5568.2708520119290577378.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9049 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=710 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810170188 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 |
fs: fixes for serious clone/dedupe problems
|
expand
|
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;