From: David Sterba Date: Tue, 15 Sep 2020 19:10:03 +0000 (+0200) Subject: btrfs: document byte swap optimization of root_item::flags accessors X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3f4c00b0bb62f2cdc0d2cc449e06fac753059445;p=users%2Fjedix%2Flinux-maple.git btrfs: document byte swap optimization of root_item::flags accessors Reviewed-by: Anand Jain Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index dc15d40d5ed65..444046d6ee322 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -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; }