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
13431343 gfp_mask, 0);
13441344 }
13451345
1346−extern int blk_verify_command(unsigned char *cmd, fmode_t mode);
1346+bool scsi_cmd_allowed(unsigned char *cmd, fmode_t mode);
13471347
13481348 static inline bool bdev_is_partition(struct block_device *bdev)
13491349 {