From: Miao Xie Date: Wed, 29 Aug 2012 04:13:02 +0000 (-0600) Subject: Btrfs: fix wrong orphan count of the fs/file tree X-Git-Tag: v3.7-rc1~71^2~87 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=321f0e70225abc792d74902a2bc4a60164265fd4;p=~emulex%2Finfiniband.git 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 --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 878116d9625..a6824bd0449 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) 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,