mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
block: replace fmode_t with a block-specific type for block open flags
The only overlap between the block open flags mapped into the fmode_t and
other uses of fmode_t are FMODE_READ and FMODE_WRITE. Define a new
blk_mode_t instead for use in blkdev_get_by_{dev,path}, ->open and
->ioctl and stop abusing fmode_t.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jack Wang <jinpu.wang@ionos.com> [rnbd]
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230608110258.189493-28-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
5e4ea83467
commit
05bdb99653
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <linux/fs.h> /* not really needed, later.. */
|
||||
#include <linux/list.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <scsi/scsi_common.h>
|
||||
#include <uapi/linux/cdrom.h>
|
||||
|
||||
@@ -101,7 +102,7 @@ int cdrom_read_tocentry(struct cdrom_device_info *cdi,
|
||||
struct cdrom_tocentry *entry);
|
||||
|
||||
/* the general block_device operations structure: */
|
||||
int cdrom_open(struct cdrom_device_info *cdi, fmode_t mode);
|
||||
int cdrom_open(struct cdrom_device_info *cdi, blk_mode_t mode);
|
||||
void cdrom_release(struct cdrom_device_info *cdi);
|
||||
int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
|
||||
Reference in New Issue
Block a user