Message ID | 153981642640.5568.16793693439327747778.stgit@magnolia |
---|---|
State | New |
Headers | show
Return-Path: <linux-cifs-owner@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="qoLvGvXL"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42b6n84Dylz9sBn for <incoming@patchwork.ozlabs.org>; Thu, 18 Oct 2018 09:49:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbeJRGrX (ORCPT <rfc822;incoming@patchwork.ozlabs.org>); Thu, 18 Oct 2018 02:47:23 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50064 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbeJRGrX (ORCPT <rfc822; linux-cifs@vger.kernel.org>); Thu, 18 Oct 2018 02:47:23 -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 w9HMhlRq048467; Wed, 17 Oct 2018 22:47:15 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=5749FIFK93ihy3lPNOQ7wkYeCVTZYvwQHKIL7IXrY6w=; b=qoLvGvXLW/mrOXWPJD7EXkzG6Z31dK3ldUbZ74sXxqpN0oTWNkjoEqRr/lcWC4x+PKVF t0QUEBQw0LlSo7KHBWE5XXuRt3y8VMEG/+V6WiL3zutRxXaLCAvDISDzaDN6CbVODyov FWixDpXUva3ebZg1ZTziiVmKnUAfhTjRDMx4E5+VVusNDonLaEPXM7S4Fwg73obGiLrH uyVUUI80d+OiAx28Rk7ld79sY3W3f0JZtkOL6KVa9X0dMdlJrS+vpHDLyq3eNCoojx1X IpfRIASRl6ZGM49hli0UvK8hrQma8o2OzZRG8QozLQBC1Rhn9e2ptbLmTFVMXQntL+TI Rg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2n38nq9t3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 22:47:14 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9HMl9Qf012414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 22:47:09 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9HMl8er029254; Wed, 17 Oct 2018 22:47:08 GMT Received: from localhost (/10.159.132.177) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Oct 2018 15:47:08 -0700 Subject: [PATCH 24/29] xfs: fix pagecache truncation prior to reflink 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, Dave Chinner <dchinner@redhat.com>, linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>, ocfs2-devel@oss.oracle.com Date: Wed, 17 Oct 2018 15:47:06 -0700 Message-ID: <153981642640.5568.16793693439327747778.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=947 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810170188 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-cifs.vger.kernel.org> X-Mailing-List: linux-cifs@vger.kernel.org |
Series |
fs: fixes for serious clone/dedupe problems
|
expand
|
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 9b1ea42c81d1..e8e86646bb4b 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -1369,8 +1369,9 @@ xfs_reflink_remap_prep( goto out_unlock; /* Zap any page cache for the destination file's range. */ - truncate_inode_pages_range(&inode_out->i_data, pos_out, - PAGE_ALIGN(pos_out + *len) - 1); + truncate_inode_pages_range(&inode_out->i_data, + round_down(pos_out, PAGE_SIZE), + round_up(pos_out + *len, PAGE_SIZE) - 1); return 1; out_unlock: