Btrfs: fix wrong orphan count of the fs/file tree
If we add a new orphan item, we should increase the atomic counter, not decrease it. Fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
This commit is contained in:
parent
4e2f84e63d
commit
321f0e7022
@ -2228,7 +2228,7 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
|
|||||||
insert = 1;
|
insert = 1;
|
||||||
#endif
|
#endif
|
||||||
insert = 1;
|
insert = 1;
|
||||||
atomic_dec(&root->orphan_inodes);
|
atomic_inc(&root->orphan_inodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
|
if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
|
||||||
|
Loading…
Reference in New Issue
Block a user