]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix missed transaction->aborted check
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 15 Jan 2013 06:29:12 +0000 (06:29 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Thu, 24 Jan 2013 17:51:25 +0000 (12:51 -0500)
commit80f3f85f5cc4d1c5918fa731c1372c8ef0e85c1e
tree8030e3d762a432f92a56151736b7f149c22454bc
parent1aef70ed0d5ef25a42c4ad9be2086a245da8c922
Btrfs: fix missed transaction->aborted check

First, though the current transaction->aborted check can stop the commit early
and avoid unnecessary operations, it is too early, and some transaction handles
don't end, those handles may set transaction->aborted after the check.

Second, when we commit the transaction, we will wake up some worker threads to
flush the space cache and inode cache. Those threads also allocate some transaction
handles and may set transaction->aborted if some serious error happens.

So we need more check for ->aborted when committing the transaction. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/transaction.c