diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-11-07 14:09:36 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-16 01:38:26 -0800 |
commit | 01de95f41429967fffaa0e9de4badb101839c3ea (patch) | |
tree | 15254179726258e6d48494ad4685106c440a2c9f | |
parent | a1fd4c9916cc56c10f83b2a1aa7ecee4d563f82a (diff) |
storage/posix: assign ino as -1 if gfid is missing
Change-Id: I422c87f977b5da083f9fcfaf20f0ca9a872da0a4
BUG: 3767
Reviewed-on: http://review.gluster.com/677
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 9e3c16de3..d2cf880fb 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -250,12 +250,17 @@ posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf) int i = 0; /* consider least significant 8 bytes of value out of gfid */ + if (uuid_is_null (buf->ia_gfid)) { + buf->ia_ino = -1; + goto out; + } for (i = 15; i > (15 - 8); i--) { temp_ino += buf->ia_gfid[i] << j; j += 8; } - buf->ia_ino = temp_ino; +out: + return; } int |