diff options
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 5c72430b8f71..b01442aaf278 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -346,9 +346,10 @@ static inline struct ceph_vino ceph_vino(struct inode *inode) | |||
346 | * x86_64+ino32 64 32 | 346 | * x86_64+ino32 64 32 |
347 | * x86_64 64 64 | 347 | * x86_64 64 64 |
348 | */ | 348 | */ |
349 | static inline u32 ceph_ino_to_ino32(ino_t ino) | 349 | static inline u32 ceph_ino_to_ino32(__u64 vino) |
350 | { | 350 | { |
351 | ino ^= ino >> (sizeof(ino) * 8 - 32); | 351 | u32 ino = vino & 0xffffffff; |
352 | ino ^= vino >> 32; | ||
352 | if (!ino) | 353 | if (!ino) |
353 | ino = 1; | 354 | ino = 1; |
354 | return ino; | 355 | return ino; |
@@ -359,11 +360,11 @@ static inline u32 ceph_ino_to_ino32(ino_t ino) | |||
359 | */ | 360 | */ |
360 | static inline ino_t ceph_vino_to_ino(struct ceph_vino vino) | 361 | static inline ino_t ceph_vino_to_ino(struct ceph_vino vino) |
361 | { | 362 | { |
362 | ino_t ino = (ino_t)vino.ino; /* ^ (vino.snap << 20); */ | ||
363 | #if BITS_PER_LONG == 32 | 363 | #if BITS_PER_LONG == 32 |
364 | ino = ceph_ino_to_ino32(ino); | 364 | return ceph_ino_to_ino32(vino.ino); |
365 | #else | ||
366 | return (ino_t)vino.ino; | ||
365 | #endif | 367 | #endif |
366 | return ino; | ||
367 | } | 368 | } |
368 | 369 | ||
369 | /* | 370 | /* |