diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 14:39:01 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 14:39:01 -0400 |
commit | 0a08ddf78c9cf4b6671ba64b049c37da64233f4f (patch) | |
tree | 5c373e315fd49da181fdf0b06ff6ba0fffe5dccf /libbcachefs/inode.h | |
parent | d320a4e927fd706b34c714b77130965a385ea4fb (diff) |
Update bcachefs sources to b9bd69421f73 bcachefs: x-macro-ify inode flags enumv1.3.1
Diffstat (limited to 'libbcachefs/inode.h')
-rw-r--r-- | libbcachefs/inode.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbcachefs/inode.h b/libbcachefs/inode.h index 74c62e6c..5068ba9c 100644 --- a/libbcachefs/inode.h +++ b/libbcachefs/inode.h @@ -177,7 +177,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); } @@ -187,10 +187,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; } } |