diff options
Diffstat (limited to 'xlators/nfs/server/src')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 1a229af0afe..2e0274624de 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -94,10 +94,15 @@ struct nfs3stat_strerror nfs3stat_strerror_table[] = { uint64_t nfs3_iatt_gfid_to_ino (struct iatt *buf) { + uint64_t ino = 0; + if (!buf) return 0; - memcpy (&buf->ia_ino, &buf->ia_gfid[8], sizeof (uint64_t)); + if (buf->ia_ino != 1) + memcpy (&buf->ia_ino, &buf->ia_gfid[8], sizeof (uint64_t)); + else + ino = 1; return buf->ia_ino; } |