Skip to content

Commit da52f22

Browse files
Dave Jonesaxboe
authored andcommitted
block: remove dead code in scsi_ioctl:blk_verify_command
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 <davej@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 4b57052 commit da52f22

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎block/scsi_ioctl.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm)
205205
if (capable(CAP_SYS_RAWIO))
206206
return 0;
207207

208-
/* if there's no filter set, assume we're filtering everything out */
209-
if (!filter)
210-
return -EPERM;
211-
212208
/* Anybody who can open the device can do a read-safe command */
213209
if (test_bit(cmd[0], filter->read_ok))
214210
return 0;

0 commit comments

Comments
 (0)