From patchwork Tue Jan 10 18:35:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9508313 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 DF8D36075F for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4AFA2858A for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9A2D28595; 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 774592858A for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939293AbdAJSgM (ORCPT ); Tue, 10 Jan 2017 13:36:12 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:35045 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757051AbdAJSgK (ORCPT ); Tue, 10 Jan 2017 13:36:10 -0500 Received: by mail-wj0-f195.google.com with SMTP id ey1so9326061wjd.2 for ; Tue, 10 Jan 2017 10:36:10 -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=4XaYAHQqRgnBIxQWjEYVuhQ0/XBxbgoT/ebimdAA8s4=; b=XzG9Jh2vbYU9SWgNZ3kx+Gjy1w2EvartrwfRsYYfTAVBcUg0DmpRv/lE3X6yln2RSq aVN/mll2gSxXPv6auV9q+zPo//irlRb82CUefFrvJrYvtRE9TsefDkzNZ9PJ6aL5/iBj gDbM8ZF7qhXPRSHoUN1iAMDmbAxRTzZI7x1FjqeiT6sx7wUwkFeLlkI/fvvryjvmkcMg m0lrZkfq0c6yDgZhCJfKZTakaK+FhGb019gdl3Kg424pa7nhsbiUh8j32DX2XExbM7U7 pwW0398JMRI5LBlYVGNAoaQe6fNkl/O3yi4M8FMxmBXyDqfbTIQm5aCurcQVcTgI8DJz k6Jg== 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=4XaYAHQqRgnBIxQWjEYVuhQ0/XBxbgoT/ebimdAA8s4=; b=Ha0/3700X2OdaWYNAB4aP/wsLFXCiW3+5ulIuaIF/hVCA0iP7VtcZuL1ZrPRn1eyLo cpvln9lYODBgKkpJBlXfdKmb77tNS4FcH2VcoD7yPHybdTBlfC0ttOJArbi5lBSEV72P 4AR73HCC1r6cp2qwMJdKTgj3eZ5latFaPd7YrAUFCaSzLTNQLLezSPM0pGKNtXO1XMcc u3vGbaRMplcwgHvaLcFKTFQA+SHGio6y7J7Qm2kpdtS0HZqlykayp++XQlfzpAaRpECl akK1h41O7ChNsaJZ821roQKExjE3mX0Co2vi54HeUuHcSsUb3K7I3GmfU4vQJFPt5V4k mkGg== X-Gm-Message-State: AIkVDXK7rjOxyWQbpgd4kkWhRGe8S8J3tNU/UxbdmCBPvFli3lWDJYXagYu+1Pyog1r7fg== X-Received: by 10.194.87.198 with SMTP id ba6mr2558124wjb.126.1484073364454; Tue, 10 Jan 2017 10:36:04 -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.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 10:36:03 -0800 (PST) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 12/12] btrfs: Make btrfs_inode_delayed_dir_index_count take btrfs_inode Date: Tue, 10 Jan 2017 20:35:42 +0200 Message-Id: <1484073342-28854-13-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 0afbea220fbb..00a3e62222d6 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1556,9 +1556,9 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, return ret; } -int btrfs_inode_delayed_dir_index_count(struct inode *inode) +int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode) { - struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); + struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(inode); if (!delayed_node) return -ENOENT; @@ -1573,7 +1573,7 @@ int btrfs_inode_delayed_dir_index_count(struct inode *inode) return -EINVAL; } - BTRFS_I(inode)->index_cnt = delayed_node->index_cnt; + inode->index_cnt = delayed_node->index_cnt; btrfs_release_delayed_node(delayed_node); return 0; } diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h index 40bf1a943146..40327cc3b99a 100644 --- a/fs/btrfs/delayed-inode.h +++ b/fs/btrfs/delayed-inode.h @@ -109,7 +109,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, struct btrfs_inode *dir, u64 index); -int btrfs_inode_delayed_dir_index_count(struct inode *inode); +int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode); int btrfs_run_delayed_items(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 92051c441435..80060aa2eda2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6106,7 +6106,7 @@ int btrfs_set_inode_index(struct inode *dir, u64 *index) int ret = 0; if (BTRFS_I(dir)->index_cnt == (u64)-1) { - ret = btrfs_inode_delayed_dir_index_count(dir); + ret = btrfs_inode_delayed_dir_index_count(BTRFS_I(dir)); if (ret) { ret = btrfs_set_inode_index_count(dir); if (ret)