summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/storage/posix/src/posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 1dcaba3dc57..b4b4a3cca72 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -4288,7 +4288,8 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this,
strcpy (entry_path + real_path_len + 1,
tmp_entry->d_name);
posix_lstat_with_gfid (this, entry_path, &stbuf);
- tmp_entry->d_ino = stbuf.ia_ino;
+ if (stbuf.ia_ino)
+ tmp_entry->d_ino = stbuf.ia_ino;
tmp_entry->d_stat = stbuf;
}
}