aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-08-29 00:13:02 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:05 -0400
commit321f0e70225abc792d74902a2bc4a60164265fd4 (patch)
tree07562dc275a2f29f2162ece6afcc1e90515420b9 /fs/btrfs
parent4e2f84e63dc138eca91e89ccbc34f37732ce58f7 (diff)
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 878116d9625d..a6824bd04493 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2228,7 +2228,7 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
2228 insert = 1; 2228 insert = 1;
2229#endif 2229#endif
2230 insert = 1; 2230 insert = 1;
2231 atomic_dec(&root->orphan_inodes); 2231 atomic_inc(&root->orphan_inodes);
2232 } 2232 }
2233 2233
2234 if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED, 2234 if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,