]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: use proper little-endian bitops
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 8 Dec 2011 04:33:17 +0000 (15:33 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Dec 2011 04:18:50 +0000 (15:18 +1100)
commitb170a21ab02e246f9c3c9fa4b56d2f7011d0f3b8
tree181d41d16d2315e3e6e3e380f8b0c55c39b1a2d7
parentd95d9876ac16410daf29adc32d6c28811eacffc2
ext4: use proper little-endian bitops

ext4_{set,clear}_bit() is defined as __test_and_{set,clear}_bit_le() for
ext4.  Only two ext4_{set,clear}_bit() calls check the return value.  The
rest of calls ignore the return value and they can be replaced with
__{set,clear}_bit_le().

This changes ext4_{set,clear}_bit() from __test_and_{set,clear}_bit_le()
to __{set,clear}_bit_le() and introduces ext4_test_and_{set,clear}_bit()
for the two places where old bit needs to be returned.

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

This also removes unused ext4_find_first_zero_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ext4/ext4.h
fs/ext4/ialloc.c