Centos-kernel-stream-9/drivers/scsi/libfc
Ewan D. Milne 4aeccc3209 scsi: Expand all create*_workqueue() invocations
JIRA: https://issues.redhat.com/browse/RHEL-62151
Upstream Status: From upstream linux mainline

The workqueue maintainer wants to remove the create*_workqueue() macros
because these macros always set the WQ_MEM_RECLAIM flag and because these
only support literal workqueue names. Hence this patch that replaces the
create*_workqueue() invocations with the definition of this macro. The
WQ_MEM_RECLAIM flag has been retained because I think that flag is necessary
for workqueues created by storage drivers. This patch has been generated by
running spatch and git clang-format. spatch has been invoked as follows:

spatch --in-place --sp-file expand-create-workqueue.spatch $(git grep -lEw 'create_(freezable_|singlethread_|)workqueue' */scsi */ufs)

The contents of the expand-create-workqueue.spatch file is as follows:

@@
expression name;
@@
-create_workqueue(name)
+alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, name)
@@
expression name;
@@
-create_freezable_workqueue(name)
+alloc_workqueue("%s", WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1, name)
@@
expression name;
@@
-create_singlethread_workqueue(name)
+alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, name)

Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240822195944.654691-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b97c0741c7dccedec60524b596c4fa9d6a136523)
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
2024-11-15 17:58:03 -05:00
..
Makefile
fc_disc.c
fc_elsct.c
fc_encode.h scsi: libfc: Add FDMI-2 attributes 2021-06-10 00:03:56 -04:00
fc_exch.c scsi: Expand all create*_workqueue() invocations 2024-11-15 17:58:03 -05:00
fc_fcp.c
fc_frame.c
fc_libfc.c
fc_libfc.h
fc_lport.c scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup() 2024-06-13 10:28:45 -04:00
fc_npiv.c
fc_rport.c scsi: Expand all create*_workqueue() invocations 2024-11-15 17:58:03 -05:00