aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-03-23 19:42:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:18 -0400
commitb9b9144a5336f0d85428e2870e1010641f27b3f4 (patch)
treef009d3b0beb33aa5a58c4434a9f61e53689958ad /include/linux/reiserfs_fs.h
parenta49ebbabb084d345991b72818a119616431416f2 (diff)
reiserfs: use little-endian bitops
As a preparation for removing ext2 non-atomic bit operations from asm/bitops.h. This converts ext2 non-atomic bit operations to little-endian bit operations. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index c21072adbfad..0a3842aacba9 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1124,15 +1124,18 @@ struct reiserfs_de_head {
1124# define aligned_address(addr) ((void *)((long)(addr) & ~((1UL << ADDR_UNALIGNED_BITS) - 1))) 1124# define aligned_address(addr) ((void *)((long)(addr) & ~((1UL << ADDR_UNALIGNED_BITS) - 1)))
1125# define unaligned_offset(addr) (((int)((long)(addr) & ((1 << ADDR_UNALIGNED_BITS) - 1))) << 3) 1125# define unaligned_offset(addr) (((int)((long)(addr) & ((1 << ADDR_UNALIGNED_BITS) - 1))) << 3)
1126 1126
1127# define set_bit_unaligned(nr, addr) ext2_set_bit((nr) + unaligned_offset(addr), aligned_address(addr)) 1127# define set_bit_unaligned(nr, addr) \
1128# define clear_bit_unaligned(nr, addr) ext2_clear_bit((nr) + unaligned_offset(addr), aligned_address(addr)) 1128 __test_and_set_bit_le((nr) + unaligned_offset(addr), aligned_address(addr))
1129# define test_bit_unaligned(nr, addr) ext2_test_bit((nr) + unaligned_offset(addr), aligned_address(addr)) 1129# define clear_bit_unaligned(nr, addr) \
1130 __test_and_clear_bit_le((nr) + unaligned_offset(addr), aligned_address(addr))
1131# define test_bit_unaligned(nr, addr) \
1132 test_bit_le((nr) + unaligned_offset(addr), aligned_address(addr))
1130 1133
1131#else 1134#else
1132 1135
1133# define set_bit_unaligned(nr, addr) ext2_set_bit(nr, addr) 1136# define set_bit_unaligned(nr, addr) __test_and_set_bit_le(nr, addr)
1134# define clear_bit_unaligned(nr, addr) ext2_clear_bit(nr, addr) 1137# define clear_bit_unaligned(nr, addr) __test_and_clear_bit_le(nr, addr)
1135# define test_bit_unaligned(nr, addr) ext2_test_bit(nr, addr) 1138# define test_bit_unaligned(nr, addr) test_bit_le(nr, addr)
1136 1139
1137#endif 1140#endif
1138 1141
@@ -2329,14 +2332,10 @@ __u32 keyed_hash(const signed char *msg, int len);
2329__u32 yura_hash(const signed char *msg, int len); 2332__u32 yura_hash(const signed char *msg, int len);
2330__u32 r5_hash(const signed char *msg, int len); 2333__u32 r5_hash(const signed char *msg, int len);
2331 2334
2332/* the ext2 bit routines adjust for big or little endian as 2335#define reiserfs_test_and_set_le_bit __test_and_set_bit_le
2333** appropriate for the arch, so in our laziness we use them rather 2336#define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le
2334** than using the bit routines they call more directly. These 2337#define reiserfs_test_le_bit test_bit_le
2335** routines must be used when changing on disk bitmaps. */ 2338#define reiserfs_find_next_zero_le_bit find_next_zero_bit_le
2336#define reiserfs_test_and_set_le_bit ext2_set_bit
2337#define reiserfs_test_and_clear_le_bit ext2_clear_bit
2338#define reiserfs_test_le_bit ext2_test_bit
2339#define reiserfs_find_next_zero_le_bit ext2_find_next_zero_bit
2340 2339
2341/* sometimes reiserfs_truncate may require to allocate few new blocks 2340/* sometimes reiserfs_truncate may require to allocate few new blocks
2342 to perform indirect2direct conversion. People probably used to 2341 to perform indirect2direct conversion. People probably used to