diff options
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r-- | fs/bcachefs/inode.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h index 9e84cddcc6cb..009b807cc167 100644 --- a/fs/bcachefs/inode.h +++ b/fs/bcachefs/inode.h @@ -134,6 +134,11 @@ static inline u8 mode_to_type(umode_t mode) return (mode >> 12) & 15; } +static inline u8 inode_d_type(struct bch_inode_unpacked *inode) +{ + return inode->bi_subvol ? DT_SUBVOL : mode_to_type(inode->bi_mode); +} + /* i_nlink: */ static inline unsigned nlink_bias(umode_t mode) |