From patchwork Thu Oct 19 06:59:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10016071 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 5408660215 for ; Thu, 19 Oct 2017 06:59:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 479C628C64 for ; Thu, 19 Oct 2017 06:59:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CBA228CA3; Thu, 19 Oct 2017 06:59:59 +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 DFC1F28C64 for ; Thu, 19 Oct 2017 06:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbdJSG76 (ORCPT ); Thu, 19 Oct 2017 02:59:58 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35653 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbdJSG75 (ORCPT ); Thu, 19 Oct 2017 02:59:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc: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=EncuzmEPabBb+1IGCZxJdSiitsv3dzt+AbA+Qr1CGDU=; b=GUbmuFBbpCE7oJ1X+VpcuTz/z 0pwjYaHMYNvsVwpUFYUPOYjTPP0FVXlCKXk9V7CYpCIiXd0WC7OrYmjISL0MDs2660E54LLiTZHT0 NCPRt6qxfKX3vUQj4vtkXwgnkxA6rr0yzRhqGZRQ5uHXX8zfxXo5G1MunriIV1cOpcp7ExqhqBAsS DkuUoVZFn6diitbobgEv3jyNU19Peqw1Y7LtDnWMhObCEm0qb20wrQNREYmmp+FGkWndQEak4OTdu xYjM2sGVrCAft3buQIRLxtzKvX1hQeuob66cz7U01gu3jds9hKXgXQElp0zmjJHkWhkmWaXUJy2Yz CPKaOAnjw==; Received: from 212095007233.public.telering.at ([212.95.7.233] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1e54o8-0004Bj-NO for linux-xfs@vger.kernel.org; Thu, 19 Oct 2017 06:59:57 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Subject: [PATCH 02/15] xfs: make better use of the 'state' variable in xfs_bmap_del_extent_real Date: Thu, 19 Oct 2017 08:59:29 +0200 Message-Id: <20171019065942.18813-3-hch@lst.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171019065942.18813-1-hch@lst.de> References: <20171019065942.18813-1-hch@lst.de> MIME-Version: 1.0 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 We already have all the information about the fork aѕ well as additional tracing information, so pass that to xfs_iext_remove(). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_bmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 676fc8aed67f..06a9ac7dcdab 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -5022,8 +5022,7 @@ xfs_bmap_del_extent_real( * Matches the whole extent. Delete the entry. */ trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_); - xfs_iext_remove(ip, *idx, 1, - whichfork == XFS_ATTR_FORK ? BMAP_ATTRFORK : 0); + xfs_iext_remove(ip, *idx, 1, state); --*idx; XFS_IFORK_NEXT_SET(ip, whichfork,