diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:29 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:29 -0500 |
commit | 1f473e9c92ea458e60494561a2065a358b7239bb (patch) | |
tree | dc80484535ac987d49179c45f30f1fabadc8855a /drivers/ide/ide-ioctls.c | |
parent | 3e0e29f7373ec96a1bd972790649524af7353f42 (diff) |
ide: IDE settings don't need an ide_lock held
IDE settings are protected by ide_setting_mtx mutex so there is
no need to hold ide_lock in ide_setting_ioctl(), ide_read_setting()
and ide_proc_unregister_driver().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-ioctls.c')
-rw-r--r-- | drivers/ide/ide-ioctls.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index fcde16bb53a7..f9034765aa18 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -19,7 +19,6 @@ int ide_setting_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
19 | const struct ide_ioctl_devset *s) | 19 | const struct ide_ioctl_devset *s) |
20 | { | 20 | { |
21 | const struct ide_devset *ds; | 21 | const struct ide_devset *ds; |
22 | unsigned long flags; | ||
23 | int err = -EOPNOTSUPP; | 22 | int err = -EOPNOTSUPP; |
24 | 23 | ||
25 | for (; (ds = s->setting); s++) { | 24 | for (; (ds = s->setting); s++) { |
@@ -33,9 +32,7 @@ int ide_setting_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
33 | 32 | ||
34 | read_val: | 33 | read_val: |
35 | mutex_lock(&ide_setting_mtx); | 34 | mutex_lock(&ide_setting_mtx); |
36 | spin_lock_irqsave(&ide_lock, flags); | ||
37 | err = ds->get(drive); | 35 | err = ds->get(drive); |
38 | spin_unlock_irqrestore(&ide_lock, flags); | ||
39 | mutex_unlock(&ide_setting_mtx); | 36 | mutex_unlock(&ide_setting_mtx); |
40 | return err >= 0 ? put_user(err, (long __user *)arg) : err; | 37 | return err >= 0 ? put_user(err, (long __user *)arg) : err; |
41 | 38 | ||