On Wed, Jan 13, 2021 at 01:41:09PM +0200, Nikolay Borisov wrote: > > > On 13.01.21 ??. 13:27 ??., Christoph Hellwig wrote: > > Pavel has looked into this before and got stuck on the allocator > > workqueue offloads: > > > > [PATCH v13 0/4] xfs: Remove wrappers for some semaphores > > I haven't looked into his series but I fail to see how lifting > rwsemaphore out of the nested structure can change the behavior ? It > just removes a level of indirection. My patches are semantically > identical to the original code. mrlocks have the mr_writer field that annotate that the is a writer locking the lock. The XFS asserts use it to assert that the lock that the current thread holds it for exclusive protection, which isn't actually what the field says, and this breaks when XFS uses synchronous execution of work_struct as basically an extension of the kernel stack.