Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 468c298a authored by Jens Axboe's avatar Jens Axboe
Browse files

Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

This reverts commit ff06db1e.
parent 5bb53c0f
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -3663,6 +3663,11 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)

	opened_bdev[drive] = bdev;

	if (!(mode & (FMODE_READ|FMODE_WRITE))) {
		res = -EINVAL;
		goto out;
	}

	res = -ENXIO;

	if (!floppy_track_buffer) {
@@ -3706,7 +3711,6 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
	if (UFDCS->rawcmd == 1)
		UFDCS->rawcmd = 2;

	if (mode & (FMODE_READ|FMODE_WRITE)) {
	UDRS->last_checked = 0;
	clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
	check_disk_change(bdev);
@@ -3714,7 +3718,6 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
		goto out;
	if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
		goto out;
	}

	res = -EROFS;