- We might unlock head->mutex while it was not locked
- We might leave the function without unlocking delayed_refs->lock
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
struct btrfs_path *path;
struct btrfs_key info_key = { 0 };
struct btrfs_delayed_ref_root *delayed_refs = NULL;
struct btrfs_path *path;
struct btrfs_key info_key = { 0 };
struct btrfs_delayed_ref_root *delayed_refs = NULL;
- struct btrfs_delayed_ref_head *head = NULL;
+ struct btrfs_delayed_ref_head *head;
int info_level = 0;
int ret;
struct list_head prefs_delayed;
int info_level = 0;
int ret;
struct list_head prefs_delayed;
* at a specified point in time
*/
again:
* at a specified point in time
*/
again:
ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
if (ret < 0)
goto out;
ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
if (ret < 0)
goto out;
goto again;
}
ret = __add_delayed_refs(head, seq, &info_key, &prefs_delayed);
goto again;
}
ret = __add_delayed_refs(head, seq, &info_key, &prefs_delayed);
+ if (ret) {
+ spin_unlock(&delayed_refs->lock);
}
spin_unlock(&delayed_refs->lock);
}
spin_unlock(&delayed_refs->lock);