summaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r--fs/bcachefs/inode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index 82cec2836cbd..b8ec3e628d90 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -254,6 +254,11 @@ static inline bool bch2_inode_casefold(struct bch_fs *c, const struct bch_inode_
: c->opts.casefold;
}
+static inline bool bch2_inode_has_backpointer(const struct bch_inode_unpacked *bi)
+{
+ return bi->bi_dir || bi->bi_dir_offset;
+}
+
/* i_nlink: */
static inline unsigned nlink_bias(umode_t mode)