Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (138 commits) [SCSI] libata: implement minimal transport template for ->eh_timed_out [SCSI] eliminate rphy allocation in favour of expander/end device allocation [SCSI] convert mptsas over to end_device/expander allocations [SCSI] allow displaying and setting of cache type via sysfs [SCSI] add scsi_mode_select to scsi_lib.c [SCSI] 3ware 9000 add big endian support [SCSI] qla2xxx: update MAINTAINERS [SCSI] scsi: move target_destroy call [SCSI] fusion - bump version [SCSI] fusion - expander hotplug suport in mptsas module [SCSI] fusion - exposing raid components in mptsas [SCSI] fusion - memory leak, and initializing fields [SCSI] fusion - exclosure misspelled [SCSI] fusion - cleanup mptsas event handling functions [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure [SCSI] fusion - static fix's [SCSI] fusion - move some debug firmware event debug msgs to verbose level [SCSI] fusion - loginfo header update [SCSI] add scsi_reprobe_device [SCSI] megaraid_sas: fix extended timeout handling ...
This commit is contained in:
commit
2152f85366
132 changed files with 35523 additions and 42706 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <linux/cpu.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
/*
|
||||
* The per-CPU workqueue (if single thread, we always use the first
|
||||
|
@ -476,6 +477,34 @@ void cancel_rearming_delayed_work(struct work_struct *work)
|
|||
}
|
||||
EXPORT_SYMBOL(cancel_rearming_delayed_work);
|
||||
|
||||
/**
|
||||
* execute_in_process_context - reliably execute the routine with user context
|
||||
* @fn: the function to execute
|
||||
* @data: data to pass to the function
|
||||
* @ew: guaranteed storage for the execute work structure (must
|
||||
* be available when the work executes)
|
||||
*
|
||||
* Executes the function immediately if process context is available,
|
||||
* otherwise schedules the function for delayed execution.
|
||||
*
|
||||
* Returns: 0 - function was executed
|
||||
* 1 - function was scheduled for execution
|
||||
*/
|
||||
int execute_in_process_context(void (*fn)(void *data), void *data,
|
||||
struct execute_work *ew)
|
||||
{
|
||||
if (!in_interrupt()) {
|
||||
fn(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INIT_WORK(&ew->work, fn, data);
|
||||
schedule_work(&ew->work);
|
||||
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(execute_in_process_context);
|
||||
|
||||
int keventd_up(void)
|
||||
{
|
||||
return keventd_wq != NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue