summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src
diff options
context:
space:
mode:
authorHarshavardhana <harsha@zresearch.com>2009-02-28 01:49:40 -0800
committerAnand V. Avati <avati@amp.gluster.com>2009-02-28 23:39:27 +0530
commitfd524dda532a05cb2485935212d1a66f4130256c (patch)
tree5500177ef6dc3527a1de9c00bec5177b098a6afd /xlators/features/locks/src
parentb6bf3b8d6efb995d4ca7b91ff41709c57753d632 (diff)
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 <avati@amp.gluster.com>
Diffstat (limited to 'xlators/features/locks/src')
-rw-r--r--xlators/features/locks/src/common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index d87aec229ed..675fb0235be 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,