From fd524dda532a05cb2485935212d1a66f4130256c Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 28 Feb 2009 01:49:40 -0800 Subject: Fix solaris server segfault in recent "rc3" release. typecasting from uint64_t directly over pl_inode structure segfaults are all the calls from posix-locks. Signed-off-by: Anand V. Avati --- xlators/features/locks/src/common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators') diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index d87aec229..675fb0235 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -51,15 +51,16 @@ __insert_and_merge (pl_inode_t *pl_inode, posix_lock_t *lock, pl_inode_t * pl_inode_get (xlator_t *this, inode_t *inode) { + uint64_t tmp_pl_inode = 0; pl_inode_t *pl_inode = NULL; mode_t st_mode = 0; int ret = 0; - ret = inode_ctx_get (inode, this, - (uint64_t *)(&pl_inode)); - if (ret == 0) + ret = inode_ctx_get (inode, this,&tmp_pl_inode); + if (ret == 0) { + pl_inode = (pl_inode_t *)(long)tmp_pl_inode; goto out; - + } pl_inode = CALLOC (1, sizeof (*pl_inode)); if (!pl_inode) { gf_log (this->name, GF_LOG_ERROR, -- cgit