]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: move root helpers back into ctree.h
authorJosef Bacik <josef@toxicpanda.com>
Tue, 15 Nov 2022 16:16:10 +0000 (11:16 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:58 +0000 (18:00 +0100)
These accidentally got brought into accessors.h, but belong with the
btrfs_root definitions which are currently in ctree.h.  Move these to
make it easier to sync accessors.[ch] into btrfs-progs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.h
fs/btrfs/ctree.h

index cb59b69d2af14359b3486b159c33fb4e7d4fa8e0..57ba6894a5f4c5d86bc5a15fbabe798a95b18970 100644 (file)
@@ -712,23 +712,6 @@ BTRFS_SETGET_STACK_FUNCS(root_otransid, struct btrfs_root_item, otransid, 64);
 BTRFS_SETGET_STACK_FUNCS(root_stransid, struct btrfs_root_item, stransid, 64);
 BTRFS_SETGET_STACK_FUNCS(root_rtransid, struct btrfs_root_item, rtransid, 64);
 
-static inline bool btrfs_root_readonly(const struct btrfs_root *root)
-{
-       /* Byte-swap the constant at compile time, root_item::flags is LE */
-       return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0;
-}
-
-static inline bool btrfs_root_dead(const struct btrfs_root *root)
-{
-       /* Byte-swap the constant at compile time, root_item::flags is LE */
-       return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0;
-}
-
-static inline u64 btrfs_root_id(const struct btrfs_root *root)
-{
-       return root->root_key.objectid;
-}
-
 /* struct btrfs_root_backup */
 BTRFS_SETGET_STACK_FUNCS(backup_tree_root, struct btrfs_root_backup,
                   tree_root, 64);
index 99defab7e1f66372f274b1d305e6db363f2c55e6..4e58b0532b36b339bb084a4c23c20472d8212f1e 100644 (file)
@@ -335,6 +335,23 @@ struct btrfs_root {
 #endif
 };
 
+static inline bool btrfs_root_readonly(const struct btrfs_root *root)
+{
+       /* Byte-swap the constant at compile time, root_item::flags is LE */
+       return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0;
+}
+
+static inline bool btrfs_root_dead(const struct btrfs_root *root)
+{
+       /* Byte-swap the constant at compile time, root_item::flags is LE */
+       return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0;
+}
+
+static inline u64 btrfs_root_id(const struct btrfs_root *root)
+{
+       return root->root_key.objectid;
+}
+
 /*
  * Structure that conveys information about an extent that is going to replace
  * all the extents in a file range.