Chris Mason 546888da82 Btrfs: fix btrfs fallocate oops and deadlock
Btrfs fallocate was incorrectly starting a transaction with a lock held
on the extent_io tree for the file, which could deadlock.  Strictly
speaking it was using join_transaction which would be safe, but it is better
to move the transaction outside of the lock.

When preallocated extents are overwritten, btrfs_mark_buffer_dirty was
being called on an unlocked buffer.  This was triggering an assertion and
oops because the lock is supposed to be held.

The bug was calling btrfs_mark_buffer_dirty on a leaf after btrfs_del_item had
been run.  btrfs_del_item takes care of dirtying things, so the solution is a
to skip the btrfs_mark_buffer_dirty call in this case.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-04-21 12:45:12 -04:00
..
2009-03-31 23:00:26 -04:00
2009-01-05 21:25:51 -05:00
2008-09-25 11:04:06 -04:00
2009-04-02 16:46:06 -04:00
2008-09-25 11:04:06 -04:00
2009-02-12 14:11:25 -05:00
2009-03-31 23:00:26 -04:00
2009-02-04 09:28:28 -05:00
2009-04-02 16:46:06 -04:00
2009-01-05 21:25:51 -05:00
2009-01-05 21:25:51 -05:00
2009-04-02 16:59:01 -04:00
2009-01-05 21:25:51 -05:00
2009-04-02 17:05:11 -04:00
2009-02-04 09:29:13 -05:00
2009-02-04 09:29:13 -05:00
2009-01-05 21:25:51 -05:00