From patchwork Tue Jan 10 18:35:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9508309 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 A51356075C 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 9C8232859F for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9139C2859B; 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 2D100285A1 for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939235AbdAJSgI (ORCPT ); Tue, 10 Jan 2017 13:36:08 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34192 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765917AbdAJSgE (ORCPT ); Tue, 10 Jan 2017 13:36:04 -0500 Received: by mail-wm0-f65.google.com with SMTP id c85so31527397wmi.1 for ; Tue, 10 Jan 2017 10:35:58 -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=KFdVZepltDGhRgdMvIQ+vaCslaXuC3kXL0LAZbe0y1o=; b=IEFmC4J1sZ49f3wOBBn+5EedSDD/jYCOsl8SRZbW/bfVLe4w4c4rbMFx4exdNj3Pwl xZffgJpCZBz8ey3w19g5a2r/EPHyu9TtrqAmn5QBq++jwMVY2yHFoMy/R/mUOqzoNkPo eCxNshFEIvOcLSy1h0S2vpW3csidp31yNp4+bet9Y/SukFkyJngbTsyFusjQGqQ/o6if OVWKGHR3WTEFIrIzY8Rq0F/coxCUJXbYJp8AGLhBZivnn+QFaU419Q5AFVwV1O2YTDgL BUEQI5z7i0Z6S/wV4/Y7k5Sq7hIWPmKVuhkrMrMns8tFGUfwowQuVMdHm2F1XMb+OGR4 4TWg== 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=KFdVZepltDGhRgdMvIQ+vaCslaXuC3kXL0LAZbe0y1o=; b=cve+gn97oa4i3XSlpsQAhyj789oWBUUISEdF3VFdYizoJJtRlmrZkavdkFQ31/5TUr 26jHAWWFTUwN0J3my/IRq46K9GKkajSYCmhSA9xQzVX1nv3wrP4+JwWX9Y6YargyvHUd D7/xKjHklzu6FhBT9cBMQNMZqLXi0a0790myPlWH/0z7dAGjF5Z+F/2C36qBAmXUzRhH tXZ1vYV7kyx8FBrFeAGP8KGmcmAwmvYQSjbim0UWZ9SOkEqRxgZVoKaHQ+XWPDaTNdL/ 7eJgZiX9kuIXRMdiQ0GSHGgifi72Z/684ABK4m+DYpjaO5i4LEiy7hU2kaUx5GGpWAmM d1cw== X-Gm-Message-State: AIkVDXLXO+oaxIk8RA+yOk3n1p+xfZzURKzfuUfujUbcOA1EAhBwzvpTe+lVpCm57Xx0yQ== X-Received: by 10.28.90.65 with SMTP id o62mr2593511wmb.80.1484073357952; Tue, 10 Jan 2017 10:35:57 -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.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 10:35:57 -0800 (PST) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 05/12] btrfs: Make btrfs_insert_delayed_dir_index take btrfs_inode Date: Tue, 10 Jan 2017 20:35:35 +0200 Message-Id: <1484073342-28854-6-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/dir-item.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 7be90eb978d5..473df414be1b 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1432,7 +1432,7 @@ void btrfs_balance_delayed_items(struct btrfs_fs_info *fs_info) int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, const char *name, int name_len, - struct inode *dir, + struct btrfs_inode *dir, struct btrfs_disk_key *disk_key, u8 type, u64 index) { @@ -1441,7 +1441,7 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, struct btrfs_dir_item *dir_item; int ret; - delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(dir)); + delayed_node = btrfs_get_or_create_delayed_node(dir); if (IS_ERR(delayed_node)) return PTR_ERR(delayed_node); @@ -1451,7 +1451,7 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, goto release_node; } - delayed_item->key.objectid = btrfs_ino(BTRFS_I(dir)); + delayed_item->key.objectid = btrfs_ino(dir); delayed_item->key.type = BTRFS_DIR_INDEX_KEY; delayed_item->key.offset = index; diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h index 8a2bf5e3e4cf..3cbd9bb79713 100644 --- a/fs/btrfs/delayed-inode.h +++ b/fs/btrfs/delayed-inode.h @@ -101,7 +101,7 @@ static inline void btrfs_init_delayed_root( int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, const char *name, int name_len, - struct inode *dir, + struct btrfs_inode *dir, struct btrfs_disk_key *disk_key, u8 type, u64 index); diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index 74de492bd490..2c2b707567e4 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c @@ -174,7 +174,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root btrfs_release_path(path); ret2 = btrfs_insert_delayed_dir_index(trans, root->fs_info, name, - name_len, dir, &disk_key, type, + name_len, BTRFS_I(dir), &disk_key, type, index); out_free: btrfs_free_path(path);