Displaying 3 results from an estimated 3 matches for "alloc_mutex".
Did you mean:
all_q_mutex
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...+have_block_group:
if (unlikely(!block_group->cached)) {
mutex_lock(&block_group->cache_mutex);
ret = cache_block_group(root, block_group);
@@ -2626,152 +2620,87 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
}
mutex_lock(&block_group->alloc_mutex);
- if (unlikely(!block_group_bits(block_group, data)))
- goto new_group;
if (unlikely(block_group->ro))
- goto new_group;
+ goto loop;
free_space = btrfs_find_free_space(block_group, search_start,
total_needed);
- if (free_space) {
- u64 start = block_group->key...
2008 Jun 30
0
[PATCH] Null terminate strings passed in from userspace
...5:37:34 2008 -0700
@@ -301,11 +301,9 @@
ret = -EFAULT;
goto out;
}
+
+ vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0'';
namelen = strlen(vol_args->name);
- if (namelen > BTRFS_VOL_NAME_MAX) {
- ret = -EINVAL;
- goto out;
- }
mutex_lock(&root->fs_info->alloc_mutex);
mutex_lock(&root->fs_info->chunk_mutex);
@@ -405,11 +403,8 @@
goto out;
}
+ vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0'';
namelen = strlen(vol_args->name);
- if (namelen > BTRFS_VOL_NAME_MAX) {
- ret = -EINVAL;
- goto out;
- }
if (strchr(vol_args-...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...struct btrfs_block_group_cache **cache_ret,
- u64 *start_ret, u64 num, int data)
-{
- int ret;
- struct btrfs_block_group_cache *cache = *cache_ret;
- struct btrfs_free_space *info = NULL;
- u64 last;
- u64 search_start = *start_ret;
-
- WARN_ON(!mutex_is_locked(&root->fs_info->alloc_mutex));
- if (!cache)
- goto out;
-
- last = max(search_start, cache->key.objectid);
-
-again:
- ret = cache_block_group(root, cache);
- if (ret)
- goto out;
-
- if (cache->ro || !block_group_bits(cache, data))
- goto new_group;
-
- info = btrfs_find_free_space(cache, last, num);
- if (info) {...