kclient: avoid i_ino of 0 on 32-bit platforms

This confuses ls.  How lame!

Reported-by: Jeremy Hanmer <jeremy@hq.newdream.net>
This commit is contained in:
Sage Weil 2009-06-18 13:10:34 -07:00
parent fffc9f3855
commit 7e769185a6

View File

@ -452,6 +452,8 @@ static inline ino_t ceph_vino_to_ino(struct ceph_vino vino)
ino_t ino = (ino_t)vino.ino; /* ^ (vino.snap << 20); */
#if BITS_PER_LONG == 32
ino ^= vino.ino >> (sizeof(u64)-sizeof(ino_t)) * 8;
if (!ino)
ino = 1;
#endif
return ino;
}