mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
btrfs: btrfs_root_readonly() broken on big-endian
commit 6ed3cf2cdf upstream.
->root_flags is __le64 and all accesses to it go through the helpers
that do proper conversions. Except for btrfs_root_readonly(), which
checks bit 0 as in host-endian...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5479e78788
commit
025a55c8ac
|
|
@ -1972,7 +1972,7 @@ BTRFS_SETGET_STACK_FUNCS(root_last_snapshot, struct btrfs_root_item,
|
|||
|
||||
static inline bool btrfs_root_readonly(struct btrfs_root *root)
|
||||
{
|
||||
return root->root_item.flags & BTRFS_ROOT_SUBVOL_RDONLY;
|
||||
return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0;
|
||||
}
|
||||
|
||||
/* struct btrfs_super_block */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user