Commit 6ed3cf2cdfce4c9f1d73171bd3f27d9cb77b734e
1 parent
af1584f570
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
btrfs: btrfs_root_readonly() broken on big-endian
->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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/btrfs/ctree.h
... | ... | @@ -2166,7 +2166,7 @@ |
2166 | 2166 | |
2167 | 2167 | static inline bool btrfs_root_readonly(struct btrfs_root *root) |
2168 | 2168 | { |
2169 | - return root->root_item.flags & BTRFS_ROOT_SUBVOL_RDONLY; | |
2169 | + return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; | |
2170 | 2170 | } |
2171 | 2171 | |
2172 | 2172 | /* struct btrfs_root_backup */ |