linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/7] Btrfs: fix wrong orphan count of the fs/file tree
@ 2012-08-29  4:13 Miao Xie
  0 siblings, 0 replies; only message in thread
From: Miao Xie @ 2012-08-29  4:13 UTC (permalink / raw)
  To: Linux Btrfs; +Cc: Josef Bacik

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>
---
 fs/btrfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7131fac..cae4c32 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2222,7 +2222,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,
-- 
1.7.6.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-29  4:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29  4:13 [PATCH 5/7] Btrfs: fix wrong orphan count of the fs/file tree Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).