summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-02 11:42:48 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-05 13:12:18 -0500
commit103ffe9aaf85660f40c8b68797a374b80b29b91d (patch)
tree7af0c930701f3d8849a100e7af5a162f10e90d07 /fs/bcachefs/inode.h
parentd4c8bb69d0208907f98af6a0f4da02778f2d7bdb (diff)
downloadlinux-stable-103ffe9aaf85660f40c8b68797a374b80b29b91d.tar.gz
linux-stable-103ffe9aaf85660f40c8b68797a374b80b29b91d.tar.bz2
linux-stable-103ffe9aaf85660f40c8b68797a374b80b29b91d.zip
bcachefs: x-macro-ify inode flags enum
This lets us use bch2_prt_bitflags to print them out. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r--fs/bcachefs/inode.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index b09fda452d6f..88818a332b1e 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -186,7 +186,7 @@ static inline unsigned nlink_bias(umode_t mode)
static inline unsigned bch2_inode_nlink_get(struct bch_inode_unpacked *bi)
{
- return bi->bi_flags & BCH_INODE_UNLINKED
+ return bi->bi_flags & BCH_INODE_unlinked
? 0
: bi->bi_nlink + nlink_bias(bi->bi_mode);
}
@@ -196,10 +196,10 @@ static inline void bch2_inode_nlink_set(struct bch_inode_unpacked *bi,
{
if (nlink) {
bi->bi_nlink = nlink - nlink_bias(bi->bi_mode);
- bi->bi_flags &= ~BCH_INODE_UNLINKED;
+ bi->bi_flags &= ~BCH_INODE_unlinked;
} else {
bi->bi_nlink = 0;
- bi->bi_flags |= BCH_INODE_UNLINKED;
+ bi->bi_flags |= BCH_INODE_unlinked;
}
}