Skip to content
Commit eb6b88d9 authored by Jan Schmidt's avatar Jan Schmidt Committed by Chris Mason
Browse files

Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata



When btrfs_qgroup_reserve returned a failure, we were missing a counter
operation for BTRFS_I(inode)->outstanding_extents++, leading to warning
messages about outstanding extents and space_info->bytes_may_use != 0.
Additionally, the error handling code didn't take into account that we
dropped the inode lock which might require more cleanup.

Luckily, all the cleanup code we need is already there and can be shared
with reserve_metadata_bytes, which is exactly what this patch does.

Reported-by: default avatarLev Vainblat <lev@zadarastorage.com>
Signed-off-by: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 24f8ebe9
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