btrfs: document byte swap optimization of root_item::flags accessors
authorDavid Sterba <dsterba@suse.com>
Tue, 15 Sep 2020 19:10:03 +0000 (21:10 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:06 +0000 (15:19 +0200)
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h

index d78cb2d..a3b628e 100644 (file)
@@ -2216,11 +2216,13 @@ BTRFS_SETGET_STACK_FUNCS(root_rtransid, struct btrfs_root_item,
 
 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;
 }