On Mon, Jul 07, 2025 at 02:46:03PM -0400, Benjamin Coddington wrote: > Introduce a new helper current_workqueue() which returns the current task's > workqueue pointer or NULL if not a workqueue worker. > > This will allow the NFS client to recognize the case where writeback occurs > within the nfsiod workqueue or is being submitted directly. NFS would like > to change the GFP_ flags for memory allocation to avoid stalls or cycles in > memory pools based on which context writeback is occurring. In a following > patch, this helper detects the case rather than checking the PF_WQ_WORKER > flag which can be passed along from another workqueue worker. There's already current_work(). Wouldn't that be enough for identifying whether the current work item? Thanks. -- tejun