/* These are always considered to be available */
stx->stx_dev = in->snapid;
stx->stx_blksize = MAX(in->layout.stripe_unit, 4096);
- stx->stx_mode = S_IFMT & in->mode;
- if (use_faked_inos())
- stx->stx_ino = in->faked_ino;
- else
- stx->stx_ino = in->ino;
+ /* Type bits are always set, even when CEPH_STATX_MODE is not */
+ stx->stx_mode = S_IFMT & in->mode;
+ stx->stx_ino = use_faked_inos() ? in->faked_ino : (ino_t)in->ino;
stx->stx_rdev = in->rdev;
stx->stx_mask |= (CEPH_STATX_INO|CEPH_STATX_RDEV);