Skip to content

Commit

Permalink
ext3: use proper little-endian bitops
Browse files Browse the repository at this point in the history
ext3_{set,clear}_bit() is defined as __test_and_{set,clear}_bit_le()
for ext3.  But all ext3_{set,clear}_bit() calls ignore return values.
So these can be replaced with __{set,clear}_bit_le().

This changes ext3_{set,clear}_bit safely, because if someone uses
these macros without noticing the change, new ext3_{set,clear}_bit
don't have return value and causes compiler errors where the return
value is used.

This also removes unused ext3_find_first_zero_bit().

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: [email protected]
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
mita authored and jankara committed Jun 25, 2011
1 parent fbcc9e6 commit 9008593
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/linux/ext3_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,11 @@ struct ext3_inode {
#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS
#endif

#define ext3_set_bit __test_and_set_bit_le
#define ext3_set_bit __set_bit_le
#define ext3_set_bit_atomic ext2_set_bit_atomic
#define ext3_clear_bit __test_and_clear_bit_le
#define ext3_clear_bit __clear_bit_le
#define ext3_clear_bit_atomic ext2_clear_bit_atomic
#define ext3_test_bit test_bit_le
#define ext3_find_first_zero_bit find_first_zero_bit_le
#define ext3_find_next_zero_bit find_next_zero_bit_le

/*
Expand Down

0 comments on commit 9008593

Please sign in to comment.