803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch 809 B

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