Message ID | 153913031261.32295.9177776550062804985.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 284CB17E3 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17307284C9 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B15028F95; Wed, 10 Oct 2018 00:14:14 +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 9DC32284C9 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 477C36B0285; Tue, 9 Oct 2018 20:14:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 401076B0286; Tue, 9 Oct 2018 20:14:12 -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 2C8846B0287; Tue, 9 Oct 2018 20:14:12 -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 D8A506B0285 for <linux-mm@kvack.org>; Tue, 9 Oct 2018 20:14:11 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id o18-v6so2529686pgv.14 for <linux-mm@kvack.org>; Tue, 09 Oct 2018 17:14: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=qoHfXTGN73w1yOvbXxBgoMbXWKug5+dBd9AX7FAJxDk=; b=kk6rgv/Sx8DwyoEZji1sgW907VOc1u9cBjjM4mn9m3LX/gQrrqI2eWSDN3SsCHi6oL FRsVvCL07/qw0Tpj/zeiyt0f4GFBTGu7krTOQZwNPbXv7PscdJoF/B/Nmv0pvHbZYp/Z rqaooRF1ESilefoj+jC0tj1+yDrQCZz/TMhFPXysVXtMB+MV1a4NRhafj7+48gl863g6 Nm5fHgDkZ184y63kT/Y4o1YL1u12v3vW2nAQgYRAzSt/iRzIEVVcOeceHtheMgdoyMVe Yz9LFIXuBEdYH3wKeE9WIZ9UdqRcHL51HSpVk7Vn64S6DCJJhAdVK9yL9k8jU9l4bohi ZL+g== X-Gm-Message-State: ABuFfohN6pMlq2QGMkoEoKV2dydrfSI8/cBCjC6mPSSN5eIGVI8vSLvo pxkBbRqCtsc5Ij/Ul//9bI+vJps+xNF9HHDHcUn0cD3BHrqsKeHclWI2pwHv3KaqSC2VE+xb5Eu oY6X/TEBFrVGiLG6YhYxfQ/JM5v07NVtItJIDl7TQCg/rDVIXjoGklqjeTVTZygYoLA== X-Received: by 2002:a17:902:3064:: with SMTP id u91-v6mr30315813plb.176.1539130451497; Tue, 09 Oct 2018 17:14:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Am9xP7bJ9uAlUMDPkDZQEov/5f0G5EEmQ/bHPPm4DgxQ2zn26An+dCBtgjiokLri73inT X-Received: by 2002:a17:902:3064:: with SMTP id u91-v6mr30315771plb.176.1539130450860; Tue, 09 Oct 2018 17:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539130450; cv=none; d=google.com; s=arc-20160816; b=b5Cc8d6T3MFejYetgOMuqD/r8oAfPaXy5aiUwuhGVhuh+wfMg6D8ShyMpW+PtACrZ9 KgDU5pnTWml4kl79NSUaRsF7dkd+i7jWyES5a7qPSfNRDzSKwn9cEg5RyWe2Ksddl/TM 9xTi68poSX1vhceEJ1+c6ZOB27Z2QDYYTuDpqEqgsq8NHQ9NIs9WfR9YTqzy/XFg/VkL EFec9izoJVFNYGTDlfgFVIGnwPf3/Tus41UjHnACK+uyhJcWau3jM2PkzijlRVVXLZmU Bdr+xEUcvdqP1ZYsmvTd63hqp29e5TrkY7REQCu55HEU7lwdOxrfIS4eImpk62CReHNr E9zA== 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=qoHfXTGN73w1yOvbXxBgoMbXWKug5+dBd9AX7FAJxDk=; b=uqWN5Qjedw3NmPB9WTtNWHI91ISHchgqgxJja22lh2atlvl5h4iWL4x2WkZX/ACNXB d8mfp6OycqvyrXgfhdxmrFiZ2v9wdmVM80ExJeBBW6uZ5yhLV5tjX9Qmt8dricOsZA09 EYIUP6WwyhPRImwEdf2HJb78SJOSjsxZgtm/1rfuA0QHyG8td+UuAt1qL/wZDrC7TPTl o2xUKkcIqeWuqKnb/sk0Ej5iJ2xMej+R6vHJPlLZsSSqlnLNO+IFnJQKfP5v0ncfx/e0 UEPahJXBIwsFZoHm441g/EK40sxWJpNrGpNf4hlzm18+E6EgT/FMUmyKO5SomyQHW9YB 3z8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="JnVcx/7I"; 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 d11-v6si20296135pgg.91.2018.10.09.17.14.10 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 17:14:10 -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="JnVcx/7I"; 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 w9A0Dh8s086475; Wed, 10 Oct 2018 00:14:10 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=qoHfXTGN73w1yOvbXxBgoMbXWKug5+dBd9AX7FAJxDk=; b=JnVcx/7IBOgzjbUMaZ0SRGU0eV6V6tVYy9v1BMhcDeQA00pDS3ijQ6u/9QgCPpWKY9Rz VDgWJcG8P1MQfLbKBR4qkmEl05PZeIP7bN2BCmCWbgA7fChng1Kpf9g74Zu3R29EYsow s8vlNPVTuQKwy1c7le2KWmZVvbCWCk5NFotmPNi2CZ5tzWf+GuIDuftdrWvZv8MHAvt0 B2pt4kB/NSiIc0B6IkCp8Lqkb0yJMx88TVUJ53uFdzLS9R5zsaYh+GmgFgoXCERrNT52 AB/zA+pM5jYSXpbv1nUD1JjFee2Q2UZl8sUS0DuK9AHkyhdhRCjo1jzQgpXTW7f+nMLu jg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2mxnpr0p88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:14:10 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9A0E9aV031137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:14:09 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9A0DKTr017179; Wed, 10 Oct 2018 00:13:26 GMT Received: from localhost (/10.159.249.114) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 10 Oct 2018 00:12:49 +0000 Subject: [PATCH 10/25] 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, 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: Tue, 09 Oct 2018 17:11:52 -0700 Message-ID: <153913031261.32295.9177776550062804985.stgit@magnolia> In-Reply-To: <153913023835.32295.13962696655740190941.stgit@magnolia> References: <153913023835.32295.13962696655740190941.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=9041 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=706 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100001 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 4ea81ea7d78d..b4acfb45d916 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); @@ -1818,11 +1818,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; @@ -1955,7 +1955,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; @@ -2017,7 +2017,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;