diff options
author | Akinobu Mita | 2011-11-15 23:56:34 +0100 |
---|---|---|
committer | Joel Becker | 2011-12-01 23:39:32 +0100 |
commit | 939255798a468e1a92f03546de6e87be7b491e57 (patch) | |
tree | 4ba0db743223eea3dea3405b3532d98716dcf250 /include/linux/tick.h | |
parent | ocfs2: Use filemap_write_and_wait() instead of write_inode_now() (diff) | |
download | kernel-qcow2-linux-939255798a468e1a92f03546de6e87be7b491e57.tar.gz kernel-qcow2-linux-939255798a468e1a92f03546de6e87be7b491e57.tar.xz kernel-qcow2-linux-939255798a468e1a92f03546de6e87be7b491e57.zip |
ocfs2: avoid unaligned access to dqc_bitmap
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>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
Diffstat (limited to 'include/linux/tick.h')
0 files changed, 0 insertions, 0 deletions