diff options
author | Al Viro <viro@www.linux.org.uk> | 2005-05-01 08:59:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:59:19 -0700 |
commit | f8e08a8466c4ac5f61b4bdb6338fd97eedb9c9e8 (patch) | |
tree | 082b472e19d4b21f2ecb0eb486e961b16ffeaab0 /fs/seq_file.c | |
parent | 6b9f5829e6e3af44f20c681e26524c637d4f82ff (diff) |
[PATCH] reiserfs endianness: sanitize reiserfs_key union
Since we only access reiserfs_key ->u.k_offset_v2 guts in four helper
functions, we are free to sanitize those, as long as
- layout of the structure is unchanged (it's on-disk object)
- behaviour of these helpers is same as before.
Patch kills the mess with endianness-dependent bitfields and replaces them
with a single __le64. Helpers are switched to straightforward shift/and/or.
Benefits:
- exact same definitions for little- and big-endian architectures; no ifdefs
in sight.
- generate the same code on little-endian and improved on big-endian.
- doesn't rely on lousy bitfields handling in gcc codegenerator.
- happens to be standard C (unsigned long long is not a valid type for a
bitfield; it's a gccism and not well-implemented one, at that).
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/seq_file.c')
0 files changed, 0 insertions, 0 deletions