Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86410
b: refs/heads/master
c: dbecebc
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 26, 2008
1 parent ad2e84f commit f59b5d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bcd88ac3b2ff2eae3d0fa57a6b02d4fce5392f32
refs/heads/master: dbecebca1914f414008553b57aefde95b70f9142
13 changes: 5 additions & 8 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -1031,10 +1031,9 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
drive->nice1 = (arg >> IDE_NICE_1) & 1;
return 0;
case HDIO_DRIVE_RESET:
{
unsigned long flags;
if (!capable(CAP_SYS_ADMIN)) return -EACCES;

if (!capable(CAP_SYS_ADMIN))
return -EACCES;

/*
* Abort the current command on the
* group if there is one, taking
Expand All @@ -1053,17 +1052,15 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
ide_abort(drive, "drive reset");

BUG_ON(HWGROUP(drive)->handler);

/* Ensure nothing gets queued after we
drop the lock. Reset will clear the busy */

HWGROUP(drive)->busy = 1;
spin_unlock_irqrestore(&ide_lock, flags);
(void) ide_do_reset(drive);

return 0;
}

case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
Expand Down

0 comments on commit f59b5d6

Please sign in to comment.