From patchwork Thu Jan 12 14:00:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513265 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 6F6A260710 for ; Thu, 12 Jan 2017 14:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60BB5286B9 for ; Thu, 12 Jan 2017 14:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 559F0286D9; Thu, 12 Jan 2017 14:01: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 EC396286B9 for ; Thu, 12 Jan 2017 14:01:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092AbdALOBX (ORCPT ); Thu, 12 Jan 2017 09:01:23 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:35268 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbdALOBW (ORCPT ); Thu, 12 Jan 2017 09:01:22 -0500 Received: by mail-qk0-f196.google.com with SMTP id u25so2786930qki.2 for ; Thu, 12 Jan 2017 06:01:21 -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=nJfs38P4Q5ktX9Mpgj/+n1GlIWevajS+PMo8ohTuwto=; b=QPdF1OGx/CluHHW6jTx0pDrKgECSLXp/C1jNdriFnY3AkMi6hVfKhQWtw0sWv9zz4s U1oqGhbYq48bm+RnssxiGGa51BP59FrpS6eKKpBDlXBXhWCFsVLd3swwcQR7qlK2mI93 696laiN5+9Y6SMnYhXkI8mL8qM0ip/rJGw5YiG+MVmP7hnUEpSW7IXGSs5wvnoApbzOj SYeXZ4gkreoCg7rz1PgfA/JZtOHNhDezaxUNc7ll1MDq5hiB7A6HDvOoZA/C3yPzjHlu sj+mQNI5mrpaqjuuCiXC0SC43RXcQyD/E4xCXO1NpsCPhD0x7Qen5Tfj697GxanrAHlx MsWg== 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=nJfs38P4Q5ktX9Mpgj/+n1GlIWevajS+PMo8ohTuwto=; b=Nj/fmKc+JT5WICpn1gqAVaxFcbybfyt3otSqMvIP/3NPSUcEPQ7QF20Uo81cGvZE9S 9rz3txNqncG5dyzSC4sSpPJK9xJabLrPy4qmlc2pdRUplCJ7a6DlkUsXqw0sS8lSr6/q kp9PMtmgx+xv5W8f3MCpHmQJ9+MSadU7b8/z2xmyfIfBIATfkx22iZyr/OPcckodtFVe UXqVKnwL/cEWAQMjJSx0LJq8ZE7mDwHjHLGBv4pObNhm3+YuwCkIJqxEU5GmTh6mx4mw hlXjDIKuHm6WNFuA6L1CpSmRrRntTQcJJTdWLd/79wE9wNVjWBPbZQKHM5i0ic8FzUey EHXA== X-Gm-Message-State: AIkVDXJUyWVVizN5gGti6qimHTg7EeCjeexIPvPz05eoZ391L0Li+D4Nz/c7Ct6ry/XR0A== X-Received: by 10.194.123.170 with SMTP id mb10mr9829472wjb.158.1484229681025; Thu, 12 Jan 2017 06:01:21 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y145sm725670wmc.17.2017.01.12.06.01.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:20 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 24/24] btrfs: Make count_inode_refs take btrfs_inode Date: Thu, 12 Jan 2017 16:00:50 +0200 Message-Id: <1484229650-24554-25-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484229650-24554-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484229650-24554-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/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 0c5eb664640f..162223404eca 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -1401,7 +1401,7 @@ static int count_inode_extrefs(struct btrfs_root *root, } static int count_inode_refs(struct btrfs_root *root, - struct inode *inode, struct btrfs_path *path) + struct btrfs_inode *inode, struct btrfs_path *path) { int ret; struct btrfs_key key; @@ -1409,7 +1409,7 @@ static int count_inode_refs(struct btrfs_root *root, unsigned long ptr; unsigned long ptr_end; int name_len; - u64 ino = btrfs_ino(BTRFS_I(inode)); + u64 ino = btrfs_ino(inode); key.objectid = ino; key.type = BTRFS_INODE_REF_KEY; @@ -1480,7 +1480,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans, if (!path) return -ENOMEM; - ret = count_inode_refs(root, inode, path); + ret = count_inode_refs(root, BTRFS_I(inode), path); if (ret < 0) goto out;