* [PATCH] btrfs: Open code insert_orphan_item
@ 2020-10-22 15:40 Nikolay Borisov
2020-10-23 3:11 ` Anand Jain
2020-10-23 17:00 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Borisov @ 2020-10-22 15:40 UTC (permalink / raw)
To: linux-btrfs; +Cc: Nikolay Borisov
Just open code it in its sole caller and remove a level of indirection.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/tree-log.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 3ec3e06783a0..71bd0f08543b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1565,18 +1565,6 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
return ret;
}
-static int insert_orphan_item(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, u64 ino)
-{
- int ret;
-
- ret = btrfs_insert_orphan_item(trans, root, ino);
- if (ret == -EEXIST)
- ret = 0;
-
- return ret;
-}
-
static int count_inode_extrefs(struct btrfs_root *root,
struct btrfs_inode *inode, struct btrfs_path *path)
{
@@ -1728,7 +1716,9 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
if (ret)
goto out;
}
- ret = insert_orphan_item(trans, root, ino);
+ ret = btrfs_insert_orphan_item(trans, root, ino);
+ if (ret == -EEXIST)
+ ret = 0;
}
out:
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-23 17:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-22 15:40 [PATCH] btrfs: Open code insert_orphan_item Nikolay Borisov
2020-10-23 3:11 ` Anand Jain
2020-10-23 17:00 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox