[lkml]   [2011]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v4 14/24] ext4: 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 <>
Acked-by: "Theodore Ts'o" <>
Cc: Andreas Dilger <>
Signed-off-by: Andrew Morton <>

Change from v3:
- change to the post-fix notation e.g. s/test_le_bit/test_bit_le/

The whole series is available in the git repository at:
git:// le-bitops-v4

fs/ext4/ext4.h | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 1de65f5..eaad5fc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -922,14 +922,20 @@ struct ext4_inode_info {
#define test_opt2(sb, opt) (EXT4_SB(sb)->s_mount_opt2 & \

-#define ext4_set_bit ext2_set_bit
+#define ext4_set_bit(nr, addr) \
+ __test_and_set_bit_le((nr), (unsigned long *)(addr))
#define ext4_set_bit_atomic ext2_set_bit_atomic
-#define ext4_clear_bit ext2_clear_bit
+#define ext4_clear_bit(nr, addr) \
+ __test_and_clear_bit_le((nr), (unsigned long *)(addr))
#define ext4_clear_bit_atomic ext2_clear_bit_atomic
-#define ext4_test_bit ext2_test_bit
-#define ext4_find_first_zero_bit ext2_find_first_zero_bit
-#define ext4_find_next_zero_bit ext2_find_next_zero_bit
-#define ext4_find_next_bit ext2_find_next_bit
+#define ext4_test_bit(nr, addr) \
+ test_bit_le((nr), (unsigned long *)(addr))
+#define ext4_find_first_zero_bit(addr, size) \
+ find_first_zero_bit_le((unsigned long *)(addr), (size))
+#define ext4_find_next_zero_bit(addr, size, off) \
+ find_next_zero_bit_le((unsigned long *)(addr), (size), (off))
+#define ext4_find_next_bit(addr, size, off) \
+ find_next_bit_le((unsigned long *)(addr), (size), (off))

* Maximal mount counts between two filesystem checks

 \ /
  Last update: 2011-01-16 14:13    [W:0.203 / U:0.256 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site