>> spin_unlock(&cluster->lock); >> >> + if (!ret) >> + return 0; >> + >> + spin_lock(&block_group->tree_lock); >> + >> + block_group->free_space -= bytes; >> + if (entry->bytes == 0) { >> + block_group->free_extents--; >> + kfree(entry); >> + } >> + >> + spin_unlock(&block_group->tree_lock); >> + > > Move this part up so we don't drop the spinlock and then re-grab it. Thanks, >
But they are 2 different locks. ;) And we can't grab block_group->tree_lock when holding cluster->lock. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html