From: Sage Weil Date: Thu, 18 Jun 2009 20:10:34 +0000 (-0700) Subject: kclient: avoid i_ino of 0 on 32-bit platforms X-Git-Tag: v0.9~31 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7e769185a6fbceac2b53a67eda82fb5d30f682d4;p=ceph.git kclient: avoid i_ino of 0 on 32-bit platforms This confuses ls. How lame! Reported-by: Jeremy Hanmer --- diff --git a/src/kernel/super.h b/src/kernel/super.h index 18ea537c2fb8..1eaf82e79792 100644 --- a/src/kernel/super.h +++ b/src/kernel/super.h @@ -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; }