]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
btrfs: move sysfs declarations out of ctree.h
authorDavid Sterba <dsterba@suse.com>
Thu, 1 Aug 2019 15:34:41 +0000 (17:34 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:06 +0000 (14:59 +0200)
As the header for sysfs code already exists, use it to clean up ctree.h.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/super.c
fs/btrfs/sysfs.h

index b95d7472b2a9f42c982100173775e02eea2cc7d8..c40f28f175c8c6acc4b6070ef7b2899b71b0d42a 100644 (file)
@@ -398,12 +398,6 @@ struct btrfs_dev_replace {
        wait_queue_head_t replace_wait;
 };
 
-/* For raid type sysfs entries */
-struct raid_kobject {
-       u64 flags;
-       struct kobject kobj;
-};
-
 /*
  * free clusters are used to claim free space in relatively large chunks,
  * allowing us to do less seeky writes. They are used for all metadata
@@ -3096,12 +3090,6 @@ loff_t btrfs_remap_file_range(struct file *file_in, loff_t pos_in,
 int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
                        struct btrfs_root *root);
 
-/* sysfs.c */
-int __init btrfs_init_sysfs(void);
-void __cold btrfs_exit_sysfs(void);
-int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
-void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
-
 /* super.c */
 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
                        unsigned long new_flags);
index 16c7af333d3ac46b9549af87982fe8cdb7329cfd..1b151af2577288055d1743b23732294bf2864d13 100644 (file)
@@ -43,6 +43,7 @@
 #include "free-space-cache.h"
 #include "backref.h"
 #include "space-info.h"
+#include "sysfs.h"
 #include "tests/btrfs-tests.h"
 #include "block-group.h"
 
index 4bb4fe96d4bde3d20751b27c0c64a67845a521e7..4f622989b594741d368caf23bcb72e692bde303b 100644 (file)
@@ -35,6 +35,12 @@ struct btrfs_feature_attr {
        u64 feature_bit;
 };
 
+/* For raid type sysfs entries */
+struct raid_kobject {
+       u64 flags;
+       struct kobject kobj;
+};
+
 #define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit)  \
 static struct btrfs_feature_attr btrfs_attr_features_##_name = {            \
        .kobj_attr = __INIT_KOBJ_ATTR(_name, S_IRUGO,                        \
@@ -86,4 +92,9 @@ void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
 void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
                u64 bit, enum btrfs_feature_set set);
 
+int __init btrfs_init_sysfs(void);
+void __cold btrfs_exit_sysfs(void);
+int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
+void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
+
 #endif