patch-2.4.26 linux-2.4.26/fs/hfsplus/wrapper.c

Next file: linux-2.4.26/fs/inode.c
Previous file: linux-2.4.26/fs/fat/inode.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/fs/hfsplus/wrapper.c linux-2.4.26/fs/hfsplus/wrapper.c
@@ -14,6 +14,7 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #include <linux/buffer_head.h>
 #endif
+#include <asm/unaligned.h>
 
 #include "hfsplus_fs.h"
 #include "hfsplus_raw.h"
@@ -45,7 +46,7 @@
 		return 0;
 	wd->ablk_start = be16_to_cpu(*(u16 *)(bufptr + HFSP_WRAPOFF_ABLKSTART));
 
-	extent = be32_to_cpu(*(u32 *)(bufptr + HFSP_WRAPOFF_EMBEDEXT));
+	extent = be32_to_cpu(get_unaligned((u32 *)(bufptr + HFSP_WRAPOFF_EMBEDEXT)));
 	wd->embed_start = (extent >> 16) & 0xFFFF;
 	wd->embed_count = extent & 0xFFFF;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)