mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 16:14:13 +08:00
btrfs: document byte swap optimization of root_item::flags accessors
Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
7735cd755b
commit
49547068f6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user