Message ID | 154013854491.29026.1645091969567859095.stgit@magnolia (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.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 8064113A9 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7245A287C7 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66A11287CC; Sun, 21 Oct 2018 16:16:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22976287C7 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 21 Oct 2018 16:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728004AbeJVAav (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Sun, 21 Oct 2018 20:30:51 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:41050 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727641AbeJVAau (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Sun, 21 Oct 2018 20:30:50 -0400 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 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.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: