Skip to content
Commit e980b50c authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: fix fallocate deadlock on inode extent lock



The btrfs fallocate call takes an extent lock on the entire range
being fallocated, and then runs through insert_reserved_extent on each
extent as they are allocated.

The problem with this is that btrfs_drop_extents may decide to try
and take the same extent lock fallocate was already holding.  The solution
used here is to push down knowledge of the range that is already locked
going into btrfs_drop_extents.

It turns out that at least one other caller had the same bug.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 9601e3f6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment