Skip to content

Commit

Permalink
block: remove dead code in scsi_ioctl:blk_verify_command
Browse files Browse the repository at this point in the history
filter gets assigned the address of blk_default_cmd_filter on
entry to this function, so the !filter condition can never be true.

Signed-off-by: Dave Jones <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Dave Jones authored and axboe committed May 29, 2014
1 parent 4b57052 commit da52f22
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,6 @@ int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm)
if (capable(CAP_SYS_RAWIO))
return 0;

/* if there's no filter set, assume we're filtering everything out */
if (!filter)
return -EPERM;

/* Anybody who can open the device can do a read-safe command */
if (test_bit(cmd[0], filter->read_ok))
return 0;
Expand Down

0 comments on commit da52f22

Please sign in to comment.