From: Filipe David Borba Manana Date: Sun, 22 Sep 2013 20:54:55 +0000 (+0100) Subject: Btrfs: fix tracking of orphan inode count X-Git-Tag: v3.13-rc1~85^2~89 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=703c88e035242202e3ab48fcbbbe0a7bc62fb7bb;p=pandora-kernel.git Btrfs: fix tracking of orphan inode count In inode.c:btrfs_orphan_add() if we failed to insert the orphan item, we would return without decrementing the orphan count that we just incremented before attempting the insertion, leaving the orphan inode count wrong. In inode.c:btrfs_orphan_del(), we were decrementing the inode orphan count if the bit BTRFS_INODE_ORPHAN_META_RESERVED was set, which is logically wrong because it should be decremented if the bit BTRFS_INODE_HAS_ORPHAN_ITEM was set - after all we increment the count when we set the bit BTRFS_INODE_HAS_ORPHAN_ITEM elsewhere. Signed-off-by: Filipe David Borba Manana Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed