block: remove dead code in scsi_ioctl:blk_verify_command
authorDave Jones <davej@redhat.com>
Thu, 29 May 2014 19:11:30 +0000 (15:11 -0400)
committerJens Axboe <axboe@fb.com>
Thu, 29 May 2014 19:38:50 +0000 (13:38 -0600)
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>
block/scsi_ioctl.c

index 26487972ac549ba899a723201125e5b3c59934ff..9c28a5b38042bbd7e9904d00e2495afb6ee4517b 100644 (file)
@@ -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;