]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't force pages under writeback to finish when aborting
authorJosef Bacik <jbacik@fusionio.com>
Wed, 17 Apr 2013 14:17:05 +0000 (10:17 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:57 +0000 (15:54 -0400)
commitbce8c6ac930dee1c7d84d6e674a0f4ec6310dfa8
tree13474b2dd380cfe289a6e28c546d9a058138053a
parent4b46d6ebc6ae23f26bd0422e26f0c0f04415b392
Btrfs: don't force pages under writeback to finish when aborting

Dave reported a BUG_ON() that happened in end_page_writeback() after an abort.
This happened because we unconditionally call end_page_writeback() in the endio
case, which is right.  However when we abort the transaction we will call
end_page_writeback() on any writeback pages we find, which is wrong.  We need to
lock the page and wait on page writeback to complete if it is.  There is nothing
unsafe about this since we are discarding the transaction anyway.  Thanks,

Reported-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c