|
@@ -329,14 +329,12 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
|
|
|
|
|
|
static int nvram_open(struct inode *inode, struct file *file)
|
|
|
{
|
|
|
- lock_kernel();
|
|
|
spin_lock(&nvram_state_lock);
|
|
|
|
|
|
if ((nvram_open_cnt && (file->f_flags & O_EXCL)) ||
|
|
|
(nvram_open_mode & NVRAM_EXCL) ||
|
|
|
((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) {
|
|
|
spin_unlock(&nvram_state_lock);
|
|
|
- unlock_kernel();
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
|
|
@@ -347,7 +345,6 @@ static int nvram_open(struct inode *inode, struct file *file)
|
|
|
nvram_open_cnt++;
|
|
|
|
|
|
spin_unlock(&nvram_state_lock);
|
|
|
- unlock_kernel();
|
|
|
|
|
|
return 0;
|
|
|
}
|