History

scsi: scsi_ioctl: Simplify SCSI passthrough permission checking

Remove the separate command filter structure and just use a switch statement (which also cought two duplicate commands), return a bool and give the function a sensible name.

Christoph Hellwig committed 5 years ago

Commit 7353dc01 parent b69367d4 files · +104 −124Browse files

Showing the changes to include/linux/blkdev.h (1 of 4 files). Show all

Unified · Split

include/linux/blkdev.h+1−1
@@ -1343,7 +1343,7 @@ static inline int sb_issue_zeroout(struct super_block *sb, sector_t block, · 1342 unmodified lines
1343 gfp_mask, 0);1343 gfp_mask, 0);
1344}1344}
1345 1345
1346extern int blk_verify_command(unsigned char *cmd, fmode_t mode);1346bool scsi_cmd_allowed(unsigned char *cmd, fmode_t mode);
1347 1347
1348static inline bool bdev_is_partition(struct block_device *bdev)1348static inline bool bdev_is_partition(struct block_device *bdev)
1349{1349{