btrfs: move orphan prototypes into orphan.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 26 Oct 2022 19:08:41 +0000 (15:08 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:47 +0000 (18:00 +0100)
Move these out of ctree.h into orphan.h to cut down on code in ctree.h.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/orphan.c
fs/btrfs/orphan.h [new file with mode: 0644]
fs/btrfs/root-tree.c
fs/btrfs/tree-log.c
fs/btrfs/verity.c

index c32f6b6ae9720b6fa702a3643f69d5358ca7ebb7..5649f8907984da9a5f28dca0ebac19daca5c1aad 100644 (file)
@@ -676,12 +676,6 @@ static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
 }
 int btrfs_leaf_free_space(struct extent_buffer *leaf);
 
-/* orphan.c */
-int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
-                            struct btrfs_root *root, u64 offset);
-int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
-                         struct btrfs_root *root, u64 offset);
-
 /*
  * Get the correct offset inside the page of extent buffer.
  *
index 940d4fe23cfbe68868f4b6a7443732c0cedcb133..b037107678c8c221405b938b03d98ccc44d01815 100644 (file)
@@ -41,6 +41,7 @@
 #include "extent-tree.h"
 #include "root-tree.h"
 #include "file-item.h"
+#include "orphan.h"
 
 #undef SCRAMBLE_DELAYED_REFS
 
index 83e5ae6b74efb5525f10bb5790b3ec93b1474cd2..9abed40ade1105b75b0a428ce825b32c2eb558e5 100644 (file)
@@ -69,6 +69,7 @@
 #include "relocation.h"
 #include "verity.h"
 #include "super.h"
+#include "orphan.h"
 
 struct btrfs_iget_args {
        u64 ino;
index aa534108c1e2ff713b1e16f9fac684c0ae16500b..7a1b021b5669d2d3b67d292b613cd918515aa732 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "ctree.h"
 #include "disk-io.h"
+#include "orphan.h"
 
 int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
                             struct btrfs_root *root, u64 offset)
diff --git a/fs/btrfs/orphan.h b/fs/btrfs/orphan.h
new file mode 100644 (file)
index 0000000..3faab5c
--- /dev/null
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef BTRFS_ORPHAN_H
+#define BTRFS_ORPHAN_H
+
+int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
+                            struct btrfs_root *root, u64 offset);
+int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
+                         struct btrfs_root *root, u64 offset);
+
+#endif
index 42f046e5e25f04901c88bad7fecb5e553e21b0ca..859874579456fc44593d4a885c20db05f847f2dc 100644 (file)
@@ -15,6 +15,7 @@
 #include "space-info.h"
 #include "accessors.h"
 #include "root-tree.h"
+#include "orphan.h"
 
 /*
  * Read a root item from the tree. In case we detect a root item smaller then
index 1c505713511c56a1b0f0f17be3cf20260dfb2572..b6e99ef99679488978e41a75bc899266743209e2 100644 (file)
@@ -28,6 +28,7 @@
 #include "dir-item.h"
 #include "file-item.h"
 #include "file.h"
+#include "orphan.h"
 
 #define MAX_CONFLICT_INODES 10
 
index b31d6c7627ff54a4423a87587a8632bb8e679581..bf9eb693a6a7e5f5de9c5104460d7b8c551a8357 100644 (file)
@@ -20,6 +20,7 @@
 #include "accessors.h"
 #include "ioctl.h"
 #include "verity.h"
+#include "orphan.h"
 
 /*
  * Implementation of the interface defined in struct fsverity_operations.