From patchwork Tue Jan 10 18:35:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9508315 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 0E13060762 for ; Tue, 10 Jan 2017 18:36:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0302C2858A for ; Tue, 10 Jan 2017 18:36:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC0F728595; Tue, 10 Jan 2017 18:36:25 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 977492859E for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761365AbdAJSgT (ORCPT ); Tue, 10 Jan 2017 13:36:19 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34237 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938830AbdAJSgC (ORCPT ); Tue, 10 Jan 2017 13:36:02 -0500 Received: by mail-wm0-f65.google.com with SMTP id c85so31527749wmi.1 for ; Tue, 10 Jan 2017 10:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cLstQgIlIN0yl6PZI3BqHpLQaV/qts2ZLX8LmpttD5E=; b=OHc6gMRbG0snoLqKR2ikk08EG4gyee1ueHWiZBc52guAGGrB2Dxv2Z67UHs1GgTjWs 1GQCB634h9PtgBaJ270gYK2O/PwXVG3tzB0Vv7+eOfWz8ndoNuGMiL9i6P2Mfa7n7rgb GHi6OmVsf8TKdz0nDOnfgwk4HFK6QLmdihbtRk26SWEBwBV2aKeLxoDBT0gcHZOe7rAp RnmaqTbezfFCbKSyjq59Q5IsrTmjeh3jfTnxvVE1hfTTxSg0R5X/U6cvKzYp5OgdY/m0 WAKgm5N+OxTgssYiZoLBkPLVqlGfbnOOucVr9jie1C/dVoB9Mnb08CJ6hWKICdiDaJyY B70Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cLstQgIlIN0yl6PZI3BqHpLQaV/qts2ZLX8LmpttD5E=; b=sx0rGpZVj7eagQE0/psN1Ht0Cnk86hgyzcfEGu6Fyek3dQ2Tqo/f8FmdP5p2Uikb/d 3dl3UTR14Qj/q3G88Xe//R7uzOLrl1LWXLLCY2IS4NxdmdwEtk/LXZ5YIvmrs2X+lT83 6UQT1ovGeawcCzTV9EuQ2AmyBs0n9QQhmf7BpBm3OKF56YiVhkfmCgoQ5US/2GRAPsgV jMALkRQ1DJYHgCWJAIEXYUmvYzk1PxI4+LbGFVYlvj3z5In1bYCq07zhiFgp9e7/w3DV 0c4v3nZUZXj/j6qZpp6pGhIBNrC+xvLhTQ39X6uD32BnHdRrPif5TrKG+RYyhXKteeok gIMg== X-Gm-Message-State: AIkVDXIrrBo6AZrQpaMoPNpIsPuvgd0gpFR3fnK9j3FOU9tlO2SVbx9E2iBr5Z97eKAcMQ== X-Received: by 10.223.150.34 with SMTP id b31mr2827112wra.196.1484073361414; Tue, 10 Jan 2017 10:36:01 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id jm6sm4572626wjb.27.2017.01.10.10.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 10:36:00 -0800 (PST) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 09/12] btrfs: Make btrfs_remove_delayed_node take btrfs_inode Date: Tue, 10 Jan 2017 20:35:39 +0200 Message-Id: <1484073342-28854-10-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484073342-28854-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484073342-28854-1-git-send-email-n.borisov.lkml@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nikolay Borisov --- fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 73a588d0f957..5d4dd3e18af3 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1286,15 +1286,15 @@ int btrfs_commit_inode_delayed_inode(struct inode *inode) return ret; } -void btrfs_remove_delayed_node(struct inode *inode) +void btrfs_remove_delayed_node(struct btrfs_inode *inode) { struct btrfs_delayed_node *delayed_node; - delayed_node = ACCESS_ONCE(BTRFS_I(inode)->delayed_node); + delayed_node = ACCESS_ONCE(inode->delayed_node); if (!delayed_node) return; - BTRFS_I(inode)->delayed_node = NULL; + inode->delayed_node = NULL; btrfs_release_delayed_node(delayed_node); } diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h index fbada25cd17e..81572693d0e0 100644 --- a/fs/btrfs/delayed-inode.h +++ b/fs/btrfs/delayed-inode.h @@ -121,7 +121,7 @@ void btrfs_balance_delayed_items(struct btrfs_fs_info *fs_info); int btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans, struct inode *inode); /* Used for evicting the inode. */ -void btrfs_remove_delayed_node(struct inode *inode); +void btrfs_remove_delayed_node(struct btrfs_inode *inode); void btrfs_kill_delayed_inode_items(struct btrfs_inode *inode); int btrfs_commit_inode_delayed_inode(struct inode *inode); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1a72ee1e4994..874a8689938f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5399,7 +5399,7 @@ void btrfs_evict_inode(struct inode *inode) btrfs_end_transaction(trans); btrfs_btree_balance_dirty(fs_info); no_delete: - btrfs_remove_delayed_node(inode); + btrfs_remove_delayed_node(BTRFS_I(inode)); clear_inode(inode); }