Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04f4ac9d authored by Jonathan Corbet's avatar Jonathan Corbet
Browse files

ide-tape: cdev lock_kernel() pushdown



->release() already has explicit lock_kernel() calls...

Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 16750c2f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2421,9 +2421,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
	if (i >= MAX_HWIFS * MAX_DRIVES)
		return -ENXIO;

	lock_kernel();
	tape = ide_tape_chrdev_get(i);
	if (!tape)
	if (!tape) {
		unlock_kernel();
		return -ENXIO;
	}

	debug_log(DBG_CHRDEV, "Enter %s\n", __func__);

@@ -2482,10 +2485,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
			}
		}
	}
	unlock_kernel();
	return 0;

out_put_tape:
	ide_tape_put(tape);
	unlock_kernel();
	return retval;
}