diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sg.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 1e405184ed76..82312df9b0bf 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1312,8 +1312,10 @@ static void sg_rq_end_io(struct request *rq, int uptodate) | |||
1312 | wake_up_interruptible(&sfp->read_wait); | 1312 | wake_up_interruptible(&sfp->read_wait); |
1313 | kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN); | 1313 | kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN); |
1314 | kref_put(&sfp->f_ref, sg_remove_sfp); | 1314 | kref_put(&sfp->f_ref, sg_remove_sfp); |
1315 | } else | 1315 | } else { |
1316 | execute_in_process_context(sg_rq_end_io_usercontext, &srp->ew); | 1316 | INIT_WORK(&srp->ew.work, sg_rq_end_io_usercontext); |
1317 | schedule_work(&srp->ew.work); | ||
1318 | } | ||
1317 | } | 1319 | } |
1318 | 1320 | ||
1319 | static struct file_operations sg_fops = { | 1321 | static struct file_operations sg_fops = { |
@@ -2099,7 +2101,8 @@ static void sg_remove_sfp(struct kref *kref) | |||
2099 | write_unlock_irqrestore(&sg_index_lock, iflags); | 2101 | write_unlock_irqrestore(&sg_index_lock, iflags); |
2100 | wake_up_interruptible(&sdp->o_excl_wait); | 2102 | wake_up_interruptible(&sdp->o_excl_wait); |
2101 | 2103 | ||
2102 | execute_in_process_context(sg_remove_sfp_usercontext, &sfp->ew); | 2104 | INIT_WORK(&sfp->ew.work, sg_remove_sfp_usercontext); |
2105 | schedule_work(&sfp->ew.work); | ||
2103 | } | 2106 | } |
2104 | 2107 | ||
2105 | static int | 2108 | static int |