Skip to content

Commit

Permalink
Btrfs: fix wrong orphan count of the fs/file tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miao Xie authored and Chris Mason committed Oct 1, 2012
1 parent 4e2f84e commit 321f0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,7 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
insert = 1;
#endif
insert = 1;
atomic_dec(&root->orphan_inodes);
atomic_inc(&root->orphan_inodes);
}

if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
Expand Down

0 comments on commit 321f0e7

Please sign in to comment.