diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-13 11:49:04 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-05-11 13:14:13 +0100 |
commit | e8488d51a55aa5f87369e3ad9bda8969b0d4feb2 (patch) | |
tree | 70eb3d7aa59d9664444135f01701b2be0eae1f6c /fs | |
parent | 120aa796a02fbe93143bdb1fe2b1d313e41b85b1 (diff) |
btrfs: btrfs_root_readonly() broken on big-endian
commit 6ed3cf2cdfce4c9f1d73171bd3f27d9cb77b734e 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 67385033323d..83a871ffe092 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2025,7 +2025,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_root_backup */ |