]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: avoid i_ino of 0 on 32-bit platforms
authorSage Weil <sage@newdream.net>
Thu, 18 Jun 2009 20:10:34 +0000 (13:10 -0700)
committerSage Weil <sage@newdream.net>
Thu, 18 Jun 2009 20:10:34 +0000 (13:10 -0700)
This confuses ls.  How lame!

Reported-by: Jeremy Hanmer <jeremy@hq.newdream.net>
src/kernel/super.h

index 18ea537c2fb84f2da14a80e8be1ac6c695bdb190..1eaf82e7979220ac0bb44f2c98e65572b331c858 100644 (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;
 }