summaryrefslogtreecommitdiffstats
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2014-05-29 15:11:30 -0400
committerJens Axboe <axboe@fb.com>2014-05-29 13:38:50 -0600
commitda52f22fa924b4a21d8e11fbfd3eeebd7a90a366 (patch)
tree0475d64bf3792c4427f16844f1b914a3e8f0dc83 /block/scsi_ioctl.c
parent4b570521be54666e6ad7e5f47af92fd609fbd8b5 (diff)
downloadlinux-stable-da52f22fa924b4a21d8e11fbfd3eeebd7a90a366.tar.gz
linux-stable-da52f22fa924b4a21d8e11fbfd3eeebd7a90a366.tar.bz2
linux-stable-da52f22fa924b4a21d8e11fbfd3eeebd7a90a366.zip
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>
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 26487972ac54..9c28a5b38042 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -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;