aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-07-19 21:48:46 -0400
committerDave Chinner <david@fromorbit.com>2016-07-19 21:48:46 -0400
commitaa2dd0ad4d6d7dd85bb13ed64b872803be046f96 (patch)
tree18f0ee6ce0117ed398da2f126d5fee759097d519
parent266b6969c3dfd3c81d8601754c8b0e25bb52615b (diff)
xfs: remove __arch_pack
Instead we always declare struct xfs_dir2_sf_hdr as packed. That's the expected layout, and while most major architectures do the packing by default the new structure size and offset checker showed that not only the ARM old ABI got this wrong, but various minor embedded architectures did as well. [Verified that no code change on x86-64 results from this change] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/xfs/libxfs/xfs_da_format.h2
-rw-r--r--fs/xfs/xfs_linux.h7
2 files changed, 1 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h
index f877bb17c6c3..685f23b67056 100644
--- a/fs/xfs/libxfs/xfs_da_format.h
+++ b/fs/xfs/libxfs/xfs_da_format.h
@@ -229,7 +229,7 @@ typedef struct xfs_dir2_sf_hdr {
229 __uint8_t count; /* count of entries */ 229 __uint8_t count; /* count of entries */
230 __uint8_t i8count; /* count of 8-byte inode #s */ 230 __uint8_t i8count; /* count of 8-byte inode #s */
231 __uint8_t parent[8]; /* parent dir inode number */ 231 __uint8_t parent[8]; /* parent dir inode number */
232} __arch_pack xfs_dir2_sf_hdr_t; 232} __packed xfs_dir2_sf_hdr_t;
233 233
234typedef struct xfs_dir2_sf_entry { 234typedef struct xfs_dir2_sf_entry {
235 __u8 namelen; /* actual name length */ 235 __u8 namelen; /* actual name length */
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index a8192dc797dc..b8d64d520e12 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -328,13 +328,6 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)
328 return x; 328 return x;
329} 329}
330 330
331/* ARM old ABI has some weird alignment/padding */
332#if defined(__arm__) && !defined(__ARM_EABI__)
333#define __arch_pack __attribute__((packed))
334#else
335#define __arch_pack
336#endif
337
338#define ASSERT_ALWAYS(expr) \ 331#define ASSERT_ALWAYS(expr) \
339 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 332 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
340 333