Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

block: remove unused fmode_t arguments from ioctl handlers

A few ioctl handlers have fmode_t arguments that are entirely unused,
remove them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20230608110258.189493-27-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
5e4ea834 cfb42576

+12 -12
+2 -2
block/blk-zoned.c
··· 323 323 * BLKREPORTZONE ioctl processing. 324 324 * Called from blkdev_ioctl. 325 325 */ 326 - int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode, 327 - unsigned int cmd, unsigned long arg) 326 + int blkdev_report_zones_ioctl(struct block_device *bdev, unsigned int cmd, 327 + unsigned long arg) 328 328 { 329 329 void __user *argp = (void __user *)arg; 330 330 struct zone_report_args args;
+3 -3
block/blk.h
··· 394 394 #ifdef CONFIG_BLK_DEV_ZONED 395 395 void disk_free_zone_bitmaps(struct gendisk *disk); 396 396 void disk_clear_zone_settings(struct gendisk *disk); 397 - int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode, 398 - unsigned int cmd, unsigned long arg); 397 + int blkdev_report_zones_ioctl(struct block_device *bdev, unsigned int cmd, 398 + unsigned long arg); 399 399 int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, 400 400 unsigned int cmd, unsigned long arg); 401 401 #else /* CONFIG_BLK_DEV_ZONED */ 402 402 static inline void disk_free_zone_bitmaps(struct gendisk *disk) {} 403 403 static inline void disk_clear_zone_settings(struct gendisk *disk) {} 404 404 static inline int blkdev_report_zones_ioctl(struct block_device *bdev, 405 - fmode_t mode, unsigned int cmd, unsigned long arg) 405 + unsigned int cmd, unsigned long arg) 406 406 { 407 407 return -ENOTTY; 408 408 }
+7 -7
block/ioctl.c
··· 344 344 return ops->pr_clear(bdev, c.key); 345 345 } 346 346 347 - static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode, 348 - unsigned cmd, unsigned long arg) 347 + static int blkdev_flushbuf(struct block_device *bdev, unsigned cmd, 348 + unsigned long arg) 349 349 { 350 350 if (!capable(CAP_SYS_ADMIN)) 351 351 return -EACCES; ··· 354 354 return 0; 355 355 } 356 356 357 - static int blkdev_roset(struct block_device *bdev, fmode_t mode, 358 - unsigned cmd, unsigned long arg) 357 + static int blkdev_roset(struct block_device *bdev, unsigned cmd, 358 + unsigned long arg) 359 359 { 360 360 int ret, n; 361 361 ··· 475 475 476 476 switch (cmd) { 477 477 case BLKFLSBUF: 478 - return blkdev_flushbuf(bdev, mode, cmd, arg); 478 + return blkdev_flushbuf(bdev, cmd, arg); 479 479 case BLKROSET: 480 - return blkdev_roset(bdev, mode, cmd, arg); 480 + return blkdev_roset(bdev, cmd, arg); 481 481 case BLKDISCARD: 482 482 return blk_ioctl_discard(bdev, mode, arg); 483 483 case BLKSECDISCARD: ··· 487 487 case BLKGETDISKSEQ: 488 488 return put_u64(argp, bdev->bd_disk->diskseq); 489 489 case BLKREPORTZONE: 490 - return blkdev_report_zones_ioctl(bdev, mode, cmd, arg); 490 + return blkdev_report_zones_ioctl(bdev, cmd, arg); 491 491 case BLKRESETZONE: 492 492 case BLKOPENZONE: 493 493 case BLKCLOSEZONE: