Skip to content

Commit 9a7933f

Browse files
Christoph Hellwigaxboe
authored andcommitted
swim: fix a missing FMODE_ -> BLK_OPEN_ conversion in floppy_open
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 <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 2451656 commit 9a7933f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/swim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
640640
if (mode & (BLK_OPEN_READ | BLK_OPEN_WRITE)) {
641641
if (disk_check_media_change(disk) && fs->disk_in)
642642
fs->ejected = 0;
643-
if ((mode & FMODE_WRITE) && fs->write_protected) {
643+
if ((mode & BLK_OPEN_WRITE) && fs->write_protected) {
644644
err = -EROFS;
645645
goto out;
646646
}

0 commit comments

Comments
 (0)