]> git.kernelconcepts.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>
Tue, 26 Jul 2011 10:14:46 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 29 Jul 2011 05:49:11 +0000 (15:49 +1000)
commitccaee8acd8d61398d15bece44593882a8a26c71b
tree7e91abd5e70d94497c96bef2921f056126c93454
parent5e80c6c81220ab9a65e0ce57d000a1c81ee270c1
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