summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index ddcd0bca3..4130adc6f 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -570,6 +570,7 @@ afr_hash_child (int32_t *success_children, int32_t child_count,
unsigned int hmode, uuid_t gfid)
{
uuid_t gfid_copy = {0,};
+ pid_t pid;
if (!hmode) {
return -1;
@@ -588,7 +589,8 @@ afr_hash_child (int32_t *success_children, int32_t child_count,
* perfection here. All we need is a low probability that
* multiple clients won't converge on the same subvolume.
*/
- *((pid_t *)gfid_copy) = getpid();
+ pid = getpid();
+ memcpy (gfid_copy, &pid, sizeof(pid));
}
return SuperFastHash((char *)gfid_copy,