summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-10-26 15:08:41 -0400
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:47 +0100
commitaa5d3003ddee8d7c5c517db072f888e114ff1529 (patch)
treedf3337a8b076768c353f0252bc08ebe5070bf038 /fs
parent7f0add250f829248281e1745d92648f72192a8f4 (diff)
downloadlinux-aa5d3003ddee8d7c5c517db072f888e114ff1529.tar.bz2
btrfs: move orphan prototypes into orphan.h
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ctree.h6
-rw-r--r--fs/btrfs/extent-tree.c1
-rw-r--r--fs/btrfs/inode.c1
-rw-r--r--fs/btrfs/orphan.c1
-rw-r--r--fs/btrfs/orphan.h11
-rw-r--r--fs/btrfs/root-tree.c1
-rw-r--r--fs/btrfs/tree-log.c1
-rw-r--r--fs/btrfs/verity.c1
8 files changed, 17 insertions, 6 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index c32f6b6ae972..5649f8907984 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -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.
*
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 940d4fe23cfb..b037107678c8 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -41,6 +41,7 @@
#include "extent-tree.h"
#include "root-tree.h"
#include "file-item.h"
+#include "orphan.h"
#undef SCRAMBLE_DELAYED_REFS
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 83e5ae6b74ef..9abed40ade11 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -69,6 +69,7 @@
#include "relocation.h"
#include "verity.h"
#include "super.h"
+#include "orphan.h"
struct btrfs_iget_args {
u64 ino;
diff --git a/fs/btrfs/orphan.c b/fs/btrfs/orphan.c
index aa534108c1e2..7a1b021b5669 100644
--- a/fs/btrfs/orphan.c
+++ b/fs/btrfs/orphan.c
@@ -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
index 000000000000..3faab5cbb59a
--- /dev/null
+++ b/fs/btrfs/orphan.h
@@ -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
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 42f046e5e25f..859874579456 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -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
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 1c505713511c..b6e99ef99679 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -28,6 +28,7 @@
#include "dir-item.h"
#include "file-item.h"
#include "file.h"
+#include "orphan.h"
#define MAX_CONFLICT_INODES 10
diff --git a/fs/btrfs/verity.c b/fs/btrfs/verity.c
index b31d6c7627ff..bf9eb693a6a7 100644
--- a/fs/btrfs/verity.c
+++ b/fs/btrfs/verity.c
@@ -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.