Message ID | 154013854491.29026.1645091969567859095.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 AA36413A9 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9911C287C7 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CF58287CC; Sun, 21 Oct 2018 16:16:02 +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 4F7B5287C7 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7224D6B0269; Sun, 21 Oct 2018 12:15:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6A9206B026A; Sun, 21 Oct 2018 12:15:58 -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 549246B026B; Sun, 21 Oct 2018 12:15:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by kanga.kvack.org (Postfix) with ESMTP id 044B46B0269 for <linux-mm@kvack.org>; Sun, 21 Oct 2018 12:15:58 -0400 (EDT) Received: by mail-yb1-f197.google.com with SMTP id z8-v6so22924584ybo.17 for <linux-mm@kvack.org>; Sun, 21 Oct 2018 09:15:57 -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=DsB/GfHe8rY/6K9TRDqJFG41++LpUZSoAdzvXmeEYVk=; b=BjFy4yVdYWO2p/xb/1EIcbnvJDDFQvUTi01+BaR9vc2LZPWYxeMVr4VC9nCE4zXOGE x2oUx2gx/M3fAEPBlFJVTe4P6c2U9a9HuxLt2nvYnC2CxBj30rE/EvXhw53+6M6UGs0X FJKTcEnHW57YoSjzKXP4pUzxbqgPiVpkav8gq1NFm9WJfjdYSqCjHsuWVWtVhOxy97uQ nHb4BltOidlEa0MXn5K3x0rOIOFAG5HsbmZxH7E+7d2RFb88eVNOX6ooMdkJyXwUUuiM F6pcLKTa7oS/EdBcjv+f8/3b7pxdKqSv7AMj8YfXOY4H+FdnxfldXrMF9e3w/vv8oZWb Sw1A== X-Gm-Message-State: ABuFfoitD8k1q0Dl6CUynMVVbiSAETNATNA2qyvlMepofh75LDPIiP/+ OURx3DPGWH6U9HfshAyHY59bXhRPCF/1ClFgm3hrlNF5Sdkk1L6AosGvDip97+UEtKm7fc22Z1s 4ARfdCca+O7iGH2YU1NXQ0L51GVzFCN6wim76us++vFu6dxO1CrBWBCuXOvqVKc3+YA== X-Received: by 2002:a25:c0c8:: with SMTP id c191-v6mr19323652ybf.429.1540138557762; Sun, 21 Oct 2018 09:15:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60p/KwKzEU+hiH2bJY+x0LNSw6uL9s9ljHKVyF/jn0CPbG7R3gS1Y7ZBKd7M9QYYSotIIkF X-Received: by 2002:a25:c0c8:: with SMTP id c191-v6mr19323620ybf.429.1540138557223; Sun, 21 Oct 2018 09:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540138557; cv=none; d=google.com; s=arc-20160816; b=NnVoj0lBA6hqn12vJtis7EKJqqUvlNBTx3qwOFbLvh6aeGslxRnXZ4UcyvLEC1JFhs ScmgmEaM9mHxI2ed97YEuczhqVBHAw7FzNMdys/S8vEzGSMxjYTMb7pMWbsrqwUqvdwd XXH3flLmozDgwWjEbmTpN7Gf9x3gqp27wlLf4xiqc567KIRE/xRFgdc6lofUAH4J4gU3 DnJt1OHmI6vxCR2/BH+iUC6KOlKOhCPHi6l9/BoLGue7oBJmDdJ+2h+kPRWqQr74nNTu xGVXDSjYY4Pnb1wSyvPy1ueL0UTxDFzvom3aq0FWjeBvqr2ynGQDo7tpn5bKmcBjf67l Yg/A== 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=DsB/GfHe8rY/6K9TRDqJFG41++LpUZSoAdzvXmeEYVk=; b=mxVodsvHyDafdyLJtMCQCYOu9wBLRDBTbYfyKPFW3hMaupVL+xcs1QJ4TeLyZqpyeJ VBSg2aQrp5see+ID1xRvfb+pvTOnxc1Sb+EsEyc3KlHTmzuIJP+sJKJT/7M6squZBG96 K3OmHU3i+KF/SdSZXOC/6c+KmYEW/KH6StMv5ekwF1OBfPnWvw2YaMzp3LSQ/CVPuwGm JziEzfKOKI5Jv1ik4jeXG5xICORpjDY56ft+vqgyDQBYteezE4v7zMIfMO0FOBdusx/5 592Dhk888BPGS9+UOKL3hIrfgE96MHqtaxboBgYu3By8jxkCfPeqekOwJSeCqPQbv1ZE /AqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=E1OEI7d8; 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 j66-v6si13879206ywe.442.2018.10.21.09.15.56 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Oct 2018 09:15:57 -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=E1OEI7d8; 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 w9LGEwQi155209; Sun, 21 Oct 2018 16:15:54 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=DsB/GfHe8rY/6K9TRDqJFG41++LpUZSoAdzvXmeEYVk=; b=E1OEI7d84CbIJscvXHDCDdpVPa2MBX+GXImkaOWtQFOayB2Txw8gd31Ny7x2N8NfSq5t 1ifIujoBu42x82czxOFmGO37JKvrpM4Zh4VDOgM7PH2tagytftxSQ2HmhSt40PGB92ne 9dlF0OTWNXegJzcI5/01NyBmhZAU/TRTOM8UehzfGomwA7AC1SdpQVwwnYpygcGi3ism mbFx/XOYwXvHbLjY1UZNTor8jd/4HudRjD4GN6OiidArQJ2yF860gy9r2W5mRmlOntjC BKogkNDwDVQAXL1pntCy9fA6ljbjIDLxHqycKz2bscGBBvCaIZbzLV+GDnl15nTL+PKQ eQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2n7vapjypa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Oct 2018 16:15:54 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9LGFl2G004097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Oct 2018 16:15:47 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9LGFkXR018894; Sun, 21 Oct 2018 16:15:47 GMT Received: from localhost (/10.159.225.70) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 21 Oct 2018 09:15:46 -0700 Subject: [PATCH 06/28] vfs: skip zero-length dedupe requests 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, Christoph Hellwig <hch@lst.de>, ocfs2-devel@oss.oracle.com Date: Sun, 21 Oct 2018 09:15:44 -0700 Message-ID: <154013854491.29026.1645091969567859095.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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=750 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: <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 0f0a6efdd502..f5395d8da741 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -2009,6 +2009,11 @@ int vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, if (!dst_file->f_op->dedupe_file_range) goto out_drop_write; + if (len == 0) { + ret = 0; + goto out_drop_write; + } + ret = dst_file->f_op->dedupe_file_range(src_file, src_pos, dst_file, dst_pos, len); out_drop_write: