From: Justin Maggard <jmaggard10@xxxxxxxxx> Both btrfs_add_delayed_tree_ref() and btrfs_add_delayed_data_ref() have inverted logic when setting the no_quota value for delayed refs. This is eventually double-checked in __btrfs_inc_extent_ref() and __btrfs_free_extent(), but not alloc_reserved_tree_block(), so it can throw off qgroup accounting. Signed-off-by: Justin Maggard <jmaggard10@xxxxxxxxx> --- fs/btrfs/delayed-ref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 8f8ed7d..b0ff795 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -792,7 +792,7 @@ int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info, struct btrfs_delayed_ref_root *delayed_refs; if (!is_fstree(ref_root) || !fs_info->quota_enabled) - no_quota = 0; + no_quota = 1; BUG_ON(extent_op && extent_op->is_data); ref = kmem_cache_alloc(btrfs_delayed_tree_ref_cachep, GFP_NOFS); @@ -841,7 +841,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info, struct btrfs_delayed_ref_root *delayed_refs; if (!is_fstree(ref_root) || !fs_info->quota_enabled) - no_quota = 0; + no_quota = 1; BUG_ON(extent_op && !extent_op->is_data); ref = kmem_cache_alloc(btrfs_delayed_data_ref_cachep, GFP_NOFS); -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
