]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: account for orphan inodes properly during cleanup
authorJosef Bacik <jbacik@fusionio.com>
Fri, 1 Feb 2013 20:57:47 +0000 (15:57 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:31 +0000 (12:59 -0500)
commite7140c9357c1f6159bdf2e45d5a285f75dface43
tree046fc18a32543d07aad52383afcd26c462ce12af
parent7186cb8fe08f9cd63bccf75e90634930db3f9a60
Btrfs: account for orphan inodes properly during cleanup

Dave sent me a panic where we were doing the orphan cleanup and panic'ed
trying to release our reservation from the orphan block rsv.  The reason for
this is because our orphan block rsv had been free'd out from underneath us
because the transaction commit found that there were no orphan inodes
according to its count and decided to free it.  This is incorrect so make
sure we inc the orphan inodes count so the accounting is all done properly.
This would also cause the warning in the orphan commit code normally if you
had any orphans to cleanup as they would only decrement the orphan count so
you'd get a negative orphan count which could cause problems during runtime.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/inode.c