We can use the refcount to decide if the inode is alive instead of these flags. Signed-off-by: Josef Bacik --- fs/bcachefs/fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 687af0eea0c2..7244c5a4b4cb 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -347,7 +347,7 @@ static struct bch_inode_info *bch2_inode_hash_find(struct bch_fs *c, struct btre spin_unlock(&inode->v.i_lock); return NULL; } - if ((inode->v.i_state & (I_FREEING|I_WILL_FREE))) { + if (!icount_read(inode)) { if (!trans) { __wait_on_freeing_inode(c, inode, inum); } else { @@ -2225,7 +2225,6 @@ void bch2_evict_subvolume_inodes(struct bch_fs *c, snapshot_id_list *s) continue; if (!(inode->v.i_state & I_DONTCACHE) && - !(inode->v.i_state & I_FREEING) && igrab(&inode->v)) { this_pass_clean = false; -- 2.49.0