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.
Showing the changes to include/linux/blkdev.h (1 of 4 files). Show all
Unified · Split
| @@ -1343,7 +1343,7 @@ static inline int sb_issue_zeroout(struct super_block *sb, sector_t block, · 1342 unmodified lines | ||
| 1343 | 1343 | gfp_mask, 0); |
| 1344 | 1344 | } |
| 1345 | 1345 | |
| 1346 | −extern int blk_verify_command(unsigned char *cmd, fmode_t mode); | |
| 1346 | +bool scsi_cmd_allowed(unsigned char *cmd, fmode_t mode); | |
| 1347 | 1347 | |
| 1348 | 1348 | static inline bool bdev_is_partition(struct block_device *bdev) |
| 1349 | 1349 | { |