Skip to content
Commit 7fd1a3f7 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: hold a ref on the inode during writepages



We can race with unlink and not actually be able to do our igrab in
btrfs_add_ordered_extent.  This will result in all sorts of problems.
Instead of doing the complicated work to try and handle returning an error
properly from btrfs_add_ordered_extent, just hold a ref to the inode during
writepages.  If we cannot grab a ref we know we're freeing this inode anyway
and can just drop the dirty pages on the floor, because screw them we're
going to invalidate them anyway.  Thanks,

Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent bdb7d303
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