blob: 7a3c2f01c259d8a781628950813cb2fe35372e42 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001
2From: Jonas Gorski <jogo@openwrt.org>
3Date: Sun, 6 Apr 2014 22:33:16 +0200
4Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp
5
6Unligned memcpy_fromio randomly fails with an unaligned dst. Work around
7it by ensuring we are always doing aligned copies.
8
9Should fix filename corruption in jffs2 with SMP.
10
11Signed-off-by: Jonas Gorski <jogo@openwrt.org>
12---
13 fs/jffs2/nodelist.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16--- a/fs/jffs2/nodelist.h
17+++ b/fs/jffs2/nodelist.h
18@@ -259,7 +259,7 @@ struct jffs2_full_dirent
19 uint32_t ino; /* == zero for unlink */
20 unsigned int nhash;
21 unsigned char type;
22- unsigned char name[0];
23+ unsigned char name[0] __attribute__((aligned((sizeof(long)))));
24 };
25
26 /*