mirror of
https://github.com/ceph/ceph
synced 2025-01-19 01:21:49 +00:00
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:
parent
fffc9f3855
commit
7e769185a6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user