Skip to content

Commit

Permalink
swim: fix a missing FMODE_ -> BLK_OPEN_ conversion in floppy_open
Browse files Browse the repository at this point in the history
Fix a missing conversion to the new BLK_OPEN constant in swim.

Fixes: 05bdb99 ("block: replace fmode_t with a block-specific type for block open flags")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230620043051.707196-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jun 20, 2023
1 parent 2451656 commit 9a7933f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
if (mode & (BLK_OPEN_READ | BLK_OPEN_WRITE)) {
if (disk_check_media_change(disk) && fs->disk_in)
fs->ejected = 0;
if ((mode & FMODE_WRITE) && fs->write_protected) {
if ((mode & BLK_OPEN_WRITE) && fs->write_protected) {
err = -EROFS;
goto out;
}
Expand Down

0 comments on commit 9a7933f

Please sign in to comment.