diff mbox

Btrfs: fix unaligned access at btrfs_csum_final()

Message ID 1269214268-1151-1-git-send-email-a.beregalov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Beregalov March 21, 2010, 11:31 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 0af2e38..4dbf330 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -327,7 +327,7 @@  struct btrfs_header {
  * it currently lacks any block count etc etc
  */
 struct btrfs_super_block {
-	u8 csum[BTRFS_CSUM_SIZE];
+	u8 csum[BTRFS_CSUM_SIZE] __attribute__ ((aligned(4)));
 	/* the first 4 fields must match struct btrfs_header */
 	u8 fsid[BTRFS_FSID_SIZE];    /* FS specific uuid */
 	__le64 bytenr; /* this block number */