]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Mon, 28 Jan 2013 06:26:00 +0000 (23:26 -0700)
committerChris Mason <chris.mason@fusionio.com>
Wed, 6 Feb 2013 14:24:40 +0000 (09:24 -0500)
commit9b626e46f5d394add4cc8870929a095fc23b9260
treedef0ed5a9e31acce04fbe9690a2c8adfab80d6eb
parentb063ced4a70cb094f2e10436a39ce89799caa3b4
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: Lev Vainblat <lev@zadarastorage.com>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/extent-tree.c