Re: [PATCH 2/3] btrfs: move the chunk_mutex in btrfs_read_chunk_tree

David Sterba
2020-07-22T13:47:52Z

On Fri, Jul 17, 2020 at 03:12:28PM -0400, Josef Bacik wrote:
> An argument could be made that we don't even need the chunk_mutex here
> as it's during mount, and we are protected by various other locks.
> However we already have special rules for ->device_list_mutex, and I'd
> rather not have another special case for ->chunk_mutex.

Yeah, we can keep the lock there, eg. for the case when some helper
asserts the lock is held.