Skip to content

Commit

Permalink
gdth: cdev lock_kernel() pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent b3369c6 commit 46787b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/gdth.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#include <linux/timer.h>
#include <linux/dma-mapping.h>
#include <linux/list.h>
#include <linux/smp_lock.h>

#ifdef GDTH_RTC
#include <linux/mc146818rtc.h>
Expand Down Expand Up @@ -4019,10 +4020,12 @@ static int gdth_open(struct inode *inode, struct file *filep)
{
gdth_ha_str *ha;

lock_kernel();
list_for_each_entry(ha, &gdth_instances, list) {
if (!ha->sdev)
ha->sdev = scsi_get_host_dev(ha->shost);
}
unlock_kernel();

TRACE(("gdth_open()\n"));
return 0;
Expand Down

0 comments on commit 46787b4

Please sign in to comment.