Skip to contentSkip to conversation

dlm: align midcomms message buffer

PATCH New David Teigland 1 participant 1 message Jan 21, 2008 Distributed lock manager (DLM)

lore
Share & tools
lore

David Teigland

author maintainer
#0 lore raw

PATCH 1/1 dlm: align midcomms message buffer

From: Fabio M. Di Nitto <[email protected]>

gcc does not guarantee that a static buffer is 64bit aligned. This change allows sparc64 to work.

---
 fs/dlm/midcomms.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/dlm/midcomms.c +1 -1
index f8c69dd..da653b5 100644
@@ -58,7 +58,7 @@ static void copy_from_cb(void *dst, const void *base, unsigned offset,
 int dlm_process_incoming_buffer(int nodeid, const void *base,
 				unsigned offset, unsigned len, unsigned limit)
 {
-	unsigned char __tmp[DLM_INBUF_LEN];
+	unsigned char __tmp[DLM_INBUF_LEN] __attribute__((aligned(64)));
 	struct dlm_header *msg = (struct dlm_header *) __tmp;
 	int ret = 0;
 	int err = 0;
Signature · 1 line
1.5.3.3