From patchwork Fri Sep 22 13:59:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9966185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8B1026035E for ; Fri, 22 Sep 2017 13:59:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B4FD1FE85 for ; Fri, 22 Sep 2017 13:59:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 802D6298E8; Fri, 22 Sep 2017 13:59:50 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 2BF5E1FE85 for ; Fri, 22 Sep 2017 13:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751979AbdIVN7t (ORCPT ); Fri, 22 Sep 2017 09:59:49 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:43518 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbdIVN7s (ORCPT ); Fri, 22 Sep 2017 09:59:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=twCmg+1qTvC46B21r+iRIjy7jgCam5O3gBb2isDvEs0=; b=nTRJ5cEXiEnzyrWeYdfALnuxP pDJUBXnaS+pUjOTtRsI0rSwuomwq4HHbU9rxEm6qatxX/OJZtfIbvIA5v/Gzn0FZVHj9Dy5l1mjgt iKtOSUZPHiHhFmpRJJk4MPwZBpgIxDQ1J6Z4twEVN9FeH6I3pZkPwY9RPWAm/TJmXl5s996fFX9l8 KMk6VTDA0eSnZFvhzYP9hwjttlpPn4JyGKDfM7UcntkOglM6PJ/1XlEXwpsBDat3pAZ/bnpEsyRsa May2qgmWq62iYPfyu925YmK/zlmmMCe7XGyRfjGkR4orPxhsu8plQdLjrkwc/V6dJPBbbVDYT7qLY osDkNegUg==; Received: from ip-64-134-232-11.public.wayport.net ([64.134.232.11] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dvOUd-00019b-PW for linux-xfs@vger.kernel.org; Fri, 22 Sep 2017 13:59:47 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Subject: [PATCH 03/19] xfs: don't set XFS_BTCUR_BPRV_WASDEL in xfs_bunmapi Date: Fri, 22 Sep 2017 06:59:29 -0700 Message-Id: <20170922135945.31574-4-hch@lst.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922135945.31574-1-hch@lst.de> References: <20170922135945.31574-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The XFS_BTCUR_BPRV_WASDEL flag is supposed to indicate that we are converting a delayed allocation to a real one, which isn't the case in xfs_bunmapi. Setting it could theoretically lead to misaccounting here, but it's unlikely that we ever hit it in practice. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_bmap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 555ff198e28c..ef30b52c32af 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -5725,11 +5725,7 @@ __xfs_bunmapi( XFS_QMOPT_RES_REGBLKS); } ip->i_delayed_blks -= del.br_blockcount; - if (cur) - cur->bc_private.b.flags |= - XFS_BTCUR_BPRV_WASDEL; - } else if (cur) - cur->bc_private.b.flags &= ~XFS_BTCUR_BPRV_WASDEL; + } error = xfs_bmap_del_extent(ip, tp, &lastx, dfops, cur, &del, &tmp_logflags, whichfork, flags);