linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <n.borisov.lkml@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <n.borisov.lkml@gmail.com>
Subject: [PATCH 03/12] btrfs: Make btrfs_get_or_create_delayed_node take btrfs_inode
Date: Tue, 10 Jan 2017 20:35:33 +0200	[thread overview]
Message-ID: <1484073342-28854-4-git-send-email-n.borisov.lkml@gmail.com> (raw)
In-Reply-To: <1484073342-28854-1-git-send-email-n.borisov.lkml@gmail.com>

Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
---
 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);
 
-- 
2.7.4


  parent reply	other threads:[~2017-01-10 18:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 18:35 [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c Nikolay Borisov
2017-01-10 18:35 ` [PATCH 01/12] btrfs: Make btrfs_ino take a struct btrfs_inode Nikolay Borisov
2017-01-10 18:35 ` [PATCH 02/12] btrfs: Make btrfs_get_delayed_node take btrfs_inode Nikolay Borisov
2017-01-10 18:35 ` Nikolay Borisov [this message]
2017-01-10 18:35 ` [PATCH 04/12] btrfs: Make btrfs_delayed_inode_reserve_metadata " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 05/12] btrfs: Make btrfs_insert_delayed_dir_index " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 06/12] btrfs: Make btrfs_delete_delayed_dir_index " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 07/12] btrfs: Make btrfs_delayed_delete_inode_ref " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 08/12] btrfs: Make btrfs_kill_delayed_inode_items " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 09/12] btrfs: Make btrfs_remove_delayed_node " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 10/12] btrfs: Make btrfs_commit_inode_delayed_inode " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 11/12] btrfs: Make btrfs_commit_inode_delayed_items " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 12/12] btrfs: Make btrfs_inode_delayed_dir_index_count " Nikolay Borisov
2017-01-11 16:51 ` [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c David Sterba
2017-01-11 18:11   ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484073342-28854-4-git-send-email-n.borisov.lkml@gmail.com \
    --to=n.borisov.lkml@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).