From patchwork Tue Jan 10 18:35:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9508323 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 BA38960231 for ; Tue, 10 Jan 2017 18:36:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B110528595 for ; Tue, 10 Jan 2017 18:36:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A571B28599; Tue, 10 Jan 2017 18:36:37 +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 5B34A28595 for ; Tue, 10 Jan 2017 18:36:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939401AbdAJSg2 (ORCPT ); Tue, 10 Jan 2017 13:36:28 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36040 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936994AbdAJSf5 (ORCPT ); Tue, 10 Jan 2017 13:35:57 -0500 Received: by mail-wm0-f67.google.com with SMTP id r126so11434545wmr.3 for ; Tue, 10 Jan 2017 10:35:56 -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=atNyEbeDvU0fdbqh96u0r8wN2xvHUboIaI8xdXp3jpc=; b=mfmzjWtNzPipYa7pybHjNmTkV/QasZE7U9wat9u+I3U4eMJDJHxvnEKW2/jZKAujqL p8SkKtIKG3vMz1ZtRAdLJz7eUDo5goNA1QlaOvgKSQpc36iNe215trIWeOWOnEAaCyJJ JthnUb5qZ0QYur/p6mymibRCVd/kh0NK9Gk11af1WGUK3Uqt528FFCxMnFjvTOBAwGzN rvxsXgKKaDv+V6C4Dq/A/xIf60bj//rDOZUOrRYDTc/NuxBYLiZiWXF0BQjhw5jTX/G8 5/GmjTvNvjp/ISEAKcyJrLBIfM2xz7uDJljo22J3NxiAf0LRvdUopvFP7qigKiEp/6Wt xdQQ== 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=atNyEbeDvU0fdbqh96u0r8wN2xvHUboIaI8xdXp3jpc=; b=ZMc3UcZfLlCInOrEfHLCNIb3PAQHoUUN/+I5OmqPDYQ6uvN3IS0jOqF3r36Dz/4GUb jIzXMagVlRsBusUWJNpZRTvld0UB4UR3jq5qKZ5tyqEaswEiqxmwU+lqnFeWjXfYb8/X omHY4jw3t9XRu5IRziFSpIzvFoABAwc0QGeJj1n4bYXSjp6DI1rEge7njtqgzwaLmOsn UK24UVQKbhx9rXg9QoHVVQrU+llUF87AfoRE9jZ/IhMWK3kJ7UW+5imn4vfqxB+8SQ6g a6wdLc3+ITY+OidzX9rMzDd9Xsl/cASlFbq34jG78OeBjeicdifL3jxOIVXksp6/GPeZ gOSw== X-Gm-Message-State: AIkVDXK/dIhAoMxTxZ6n9Eohnj3/ayISU7TPjYF8He4tKKx3Px84tZekVe9IWxDH0U4xEw== X-Received: by 10.223.136.197 with SMTP id g5mr2811341wrg.56.1484073355883; Tue, 10 Jan 2017 10:35:55 -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.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 10:35:55 -0800 (PST) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 03/12] btrfs: Make btrfs_get_or_create_delayed_node take btrfs_inode Date: Tue, 10 Jan 2017 20:35:33 +0200 Message-Id: <1484073342-28854-4-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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index ad95b97bb6c6..4059b4168210 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -106,10 +106,9 @@ static struct btrfs_delayed_node *btrfs_get_delayed_node(struct btrfs_inode *btr /* Will return either the node or PTR_ERR(-ENOMEM) */ static struct btrfs_delayed_node *btrfs_get_or_create_delayed_node( - struct inode *inode) + struct btrfs_inode *btrfs_inode) { struct btrfs_delayed_node *node; - struct btrfs_inode *btrfs_inode = BTRFS_I(inode); struct btrfs_root *root = btrfs_inode->root; u64 ino = btrfs_ino(btrfs_inode); int ret; @@ -1442,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(dir); + delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(dir)); if (IS_ERR(delayed_node)) return PTR_ERR(delayed_node); @@ -1516,7 +1515,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, struct btrfs_key item_key; int ret; - node = btrfs_get_or_create_delayed_node(dir); + node = btrfs_get_or_create_delayed_node(BTRFS_I(dir)); if (IS_ERR(node)) return PTR_ERR(node); @@ -1830,7 +1829,7 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, struct btrfs_delayed_node *delayed_node; int ret = 0; - delayed_node = btrfs_get_or_create_delayed_node(inode); + delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(inode)); if (IS_ERR(delayed_node)) return PTR_ERR(delayed_node); @@ -1868,7 +1867,7 @@ int btrfs_delayed_delete_inode_ref(struct inode *inode) if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) return -EAGAIN; - delayed_node = btrfs_get_or_create_delayed_node(inode); + delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(inode)); if (IS_ERR(delayed_node)) return PTR_ERR(delayed_node);