]> git.karo-electronics.de Git - karo-tx-linux.git/commit
The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 3 Aug 2011 00:52:43 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 22 Aug 2011 03:27:08 +0000 (13:27 +1000)
commit92008cc7a63aff1bceb651a19d856888e2e36892
tree9f5af549f168c1591121e73fcdd35aa4c697045d
parentef94ddf99937bb30d071f7f1348923ace0177473
The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
but not 64-bit aligned.  The dqc_bitmap is accessed by ocfs2_set_bit(),
ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit().  These
are wrapper macros for ext2_*_bit() which need to take an unsigned long
aligned address (though some architectures are able to handle unaligned
address correctly)

So some 64bit architectures may not be able to access the dqc_bitmap
correctly.

This avoids such unaligned access by using another wrapper functions for
ext2_*_bit().  The code is taken from fs/ext4/mballoc.c which also need to
handle unaligned bitmap access.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/ocfs2.h
fs/ocfs2/quota_local.c