diff options
author | Amar Tumballi <amar@gluster.com> | 2010-07-06 08:47:25 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-08 02:24:15 -0700 |
commit | f0578eb3acf0c14b519b74f87c693bd72c506b8a (patch) | |
tree | 26814b7455e72f02501f125e35206a793582fb1b | |
parent | 90717586363520bbb68e2ec4a7aa12272effa64e (diff) |
Handle a crash in inode.c on 32 bit, big endian platform
Thanks to <tlisiecki@proximetry.pl> for reporting the bug and
sending the patch.
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 985 (Crash with SEGV in libglusterfs on 32 bit, big endian platform)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=985
-rw-r--r-- | libglusterfs/src/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index c5784595426..a56256299a0 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -282,8 +282,8 @@ __inode_destroy (inode_t *inode) goto noctx; for (index = 0; index < inode->table->xl->graph->xl_count; index++) { - if (inode->_ctx[index].key) { - xl = (xlator_t *)(long)inode->_ctx[index].key; + if (inode->_ctx[index].xl_key) { + xl = (xlator_t *)(long)inode->_ctx[index].xl_key; old_THIS = THIS; THIS = xl; if (xl->cbks->forget) @@ -1175,7 +1175,7 @@ __inode_ctx_put2 (inode_t *inode, xlator_t *xlator, uint64_t value1, int put_idx = -1; for (index = 0; index < xlator->graph->xl_count; index++) { - if (!inode->_ctx[index].key) { + if (!inode->_ctx[index].xl_key) { if (put_idx == -1) put_idx = index; /* dont break, to check if key already exists @@ -1373,8 +1373,8 @@ inode_dump (inode_t *inode, char *prefix) goto out; for (i = 0; i < inode->table->xl->graph->xl_count; i++) { - if (inode->_ctx[i].key) { - xl = (xlator_t *)(long)inode->_ctx[i].key; + if (inode->_ctx[i].xl_key) { + xl = (xlator_t *)(long)inode->_ctx[i].xl_key; if (xl->dumpops && xl->dumpops->inodectx) xl->dumpops->inodectx (xl, inode); } |