summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2011-11-24 09:15:29 +0100
committerAnand Avati <avati@gluster.com>2011-11-24 00:26:40 -0800
commit26fd1cecc985d3cd4d84c7fa061b371757c34a6e (patch)
tree94bfa41f34d0492638ad28c3a1d0e6d077c591be
parentad2d5765d955899f56fec5c05ba9e0e55ccac395 (diff)
case to uint64_t when convering gfid to inode, otherwise it can get
garbled on 32 bit machines. Change-Id: Id2acc1f9ae98194d541f5468616be441896c4239 BUG: 2923 Reviewed-on: http://review.gluster.com/753 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
-rw-r--r--xlators/storage/posix/src/posix-helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index d2cf880fb09..edc64f583da 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -255,7 +255,7 @@ posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf)
goto out;
}
for (i = 15; i > (15 - 8); i--) {
- temp_ino += buf->ia_gfid[i] << j;
+ temp_ino += (uint64_t)(buf->ia_gfid[i]) << j;
j += 8;
}
buf->ia_ino = temp_ino;