On Mon, 16 Sept 2024 at 15:50, David Howells <dhowells@xxxxxxxxxx> wrote: > > Fix this so that it is "false". The callback to netfslib in both SMB1 and > SMB2/3 now gets offloaded from the network message thread to a separate > worker thread and thus it's fine to do the slow work in this thread. Note that with this fixed, now *every* direct call of netfs_read_subreq_terminated() has that 'was_aync' as false. The exception ends up being the netfs_read_cache_to_pagecache() thing, which does that 'cres->ops->read()' with netfs_read_subreq_terminated() as a callback function. And that callback ends up being done with ki->was_async, which is actually set unconditionally to 'true' (except for the immediate failure case which then sets it to false after all). Could we please just remove that whole 'was_async' case entirely, and just make the cres->ops->read() path just do a workqueue (which seems to be what the true case does anyway)? So then the netfs_read_subreq_terminated() wouldn't need to take that pointless argument, with the only case of async use just fixing itself? Wouldn't that be cleaner? Linus