Commit 9a7933f3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

swim: fix a missing FMODE_ -> BLK_OPEN_ conversion in floppy_open

Fix a missing conversion to the new BLK_OPEN constant in swim.

Fixes: 05bdb996 ("block: replace fmode_t with a block-specific type for block open flags")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230620043051.707196-1-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 24516565
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment