diff options
author | Amar Tumballi <amar@gluster.com> | 2009-11-15 21:39:20 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-16 00:41:28 -0800 |
commit | 63e966d8c466599f84affb55fbedfb39e2a0068f (patch) | |
tree | a18f6bb74ed266c9add002ded8b5a0ccf5c925b4 /xlators | |
parent | 91f8b2a1668a4c63e0c21df4f7ac6dfb506f79d7 (diff) |
fixing a crash in posix (on 32bit)
fd_ctx_get () was getting passed with type punned argument, now
corrected by passing the right argument, and doing the typecasting
later
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 383 (glusterfs server crash on 2.0.8)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=383
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 5ef577910a5..23db0d72ad7 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3479,6 +3479,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this, int ret = 0; int _fd = -1; + uint64_t tmp_pfd = 0; struct posix_fd *pfd = NULL; data_pair_t *trav = NULL; @@ -3493,7 +3494,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this, trav = xattr->members_list; if (fd) { - ret = fd_ctx_get (fd, this, (uint64_t *)&pfd); + ret = fd_ctx_get (fd, this, &tmp_pfd); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get pfd from fd=%p", @@ -3502,6 +3503,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this, op_errno = EBADFD; goto out; } + pfd = (struct posix_fd *)(long)tmp_pfd; _fd = pfd->fd; } |