btrfs: move super prototypes into super.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 26 Oct 2022 19:08:39 +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 super.h to cut down on code in ctree.h.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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/disk-io.c
fs/btrfs/ioctl.c
fs/btrfs/super.c
fs/btrfs/super.h [new file with mode: 0644]

index 27bfedf3a9fb6bff00fb12771371480d40b44fb6..c32f6b6ae9720b6fa702a3643f69d5358ca7ebb7 100644 (file)
@@ -682,13 +682,6 @@ int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
 int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
                          struct btrfs_root *root, u64 offset);
 
-/* super.c */
-int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
-                       unsigned long new_flags);
-int btrfs_sync_fs(struct super_block *sb, int wait);
-char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
-                                         u64 subvol_objectid);
-
 /*
  * Get the correct offset inside the page of extent buffer.
  *
index 880bd39680bc2e688423a33a66bd01e56e17f731..f5f793af12a02eb68733ef852bfca9423ad806bc 100644 (file)
@@ -51,6 +51,7 @@
 #include "uuid-tree.h"
 #include "relocation.h"
 #include "scrub.h"
+#include "super.h"
 
 #define BTRFS_SUPER_FLAG_SUPP  (BTRFS_HEADER_FLAG_WRITTEN |\
                                 BTRFS_HEADER_FLAG_RELOC |\
index 98cf16f118b58cc405716a91a35819b8f7f34a45..6f9f8e8dfea681fa0bac77fb8931a98d52200ddb 100644 (file)
@@ -60,6 +60,7 @@
 #include "ioctl.h"
 #include "file.h"
 #include "scrub.h"
+#include "super.h"
 
 #ifdef CONFIG_64BIT
 /* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
index ae49bdf71d321b3dc7e342ff1fdca6a3ef930ea1..d54bfec8e5064d9825a9b911cb4864ccd90b21b8 100644 (file)
@@ -57,6 +57,7 @@
 #include "ioctl.h"
 #include "scrub.h"
 #include "verity.h"
+#include "super.h"
 #define CREATE_TRACE_POINTS
 #include <trace/events/btrfs.h>
 
diff --git a/fs/btrfs/super.h b/fs/btrfs/super.h
new file mode 100644 (file)
index 0000000..c887565
--- /dev/null
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef BTRFS_SUPER_H
+#define BTRFS_SUPER_H
+
+int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
+                       unsigned long new_flags);
+int btrfs_sync_fs(struct super_block *sb, int wait);
+char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
+                                         u64 subvol_objectid);
+
+#endif