File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1927,18 +1927,19 @@ int btrfs_zone_finish(struct btrfs_block_group *block_group)
1927
1927
1928
1928
bool btrfs_can_activate_zone (struct btrfs_fs_devices * fs_devices , u64 flags )
1929
1929
{
1930
+ struct btrfs_fs_info * fs_info = fs_devices -> fs_info ;
1930
1931
struct btrfs_device * device ;
1931
1932
bool ret = false;
1932
1933
1933
- if (!btrfs_is_zoned (fs_devices -> fs_info ))
1934
+ if (!btrfs_is_zoned (fs_info ))
1934
1935
return true;
1935
1936
1936
1937
/* Non-single profiles are not supported yet */
1937
1938
ASSERT ((flags & BTRFS_BLOCK_GROUP_PROFILE_MASK ) == 0 );
1938
1939
1939
1940
/* Check if there is a device with active zones left */
1940
- mutex_lock (& fs_devices -> device_list_mutex );
1941
- list_for_each_entry (device , & fs_devices -> devices , dev_list ) {
1941
+ mutex_lock (& fs_info -> chunk_mutex );
1942
+ list_for_each_entry (device , & fs_devices -> alloc_list , dev_alloc_list ) {
1942
1943
struct btrfs_zoned_device_info * zinfo = device -> zone_info ;
1943
1944
1944
1945
if (!device -> bdev )
@@ -1950,7 +1951,7 @@ bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices, u64 flags)
1950
1951
break ;
1951
1952
}
1952
1953
}
1953
- mutex_unlock (& fs_devices -> device_list_mutex );
1954
+ mutex_unlock (& fs_info -> chunk_mutex );
1954
1955
1955
1956
return ret ;
1956
1957
}
You can’t perform that action at this time.
0 commit comments