On 10/12/20 6:04 PM, Brian Foster wrote: > ... >> @@ -2863,8 +2875,20 @@ xfs_btree_split( >> args.done = &done; >> args.kswapd = current_is_kswapd(); >> INIT_WORK_ONSTACK(&args.work, xfs_btree_split_worker); >> + /* >> + * Update lockdep's ownership information to reflect that we >> + * will be transferring the ilock from this thread to the >> + * worker. >> + */ > > Can we update this comment to explain why we need to do this? E.g., I'm > assuming there's a lockdep splat somewhere down in the split worker > without it, but it's not immediately clear where and so it might not be > obvious if we're ever able to remove this. Hi, would something like this work for you? /* + * Update lockdep's ownership information to reflect that we + * will be transferring the ilock from this thread to the + * worker (xfs_btree_split_worker() run via queue_work()). + * If the ownership transfer would not happen lockdep would + * assert in the worker thread because the ilock would be owned + * by the original thread. + */