]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: handle errors in compression submission path
authorJosef Bacik <jbacik@fusionio.com>
Wed, 6 Feb 2013 21:49:15 +0000 (16:49 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:33 +0000 (12:59 -0500)
commit6c469facdfd9a12731fbd469e04186970cc57107
tree9a7aab9c6a1f99be02d155edf36a42e5ba89d3d7
parenta7e5054c7d622f2183c8eb05f7c53f5f6dc26465
Btrfs: handle errors in compression submission path

I noticed we would deadlock if we aborted a transaction while doing
compressed io.  This is because we don't unlock our pages if something goes
horribly wrong.  To fix this we need to make sure that we call
extent_clear_unlock_delalloc in order to unlock all the pages.  If we have
to cow in the async submission thread we need to make sure to unlock our
locked_page as the cow error path will not unlock the locked page as it
depends on the caller to unlock that page.  With this patch we no longer
deadlock on the page lock when we have an aborted transaction.  Thanks,

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