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

Commit 6b79d14e authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

s390/dasd: fix ioctl return value



For unimplemented ioctls the dasd driver should return -ENOTTY.

Reported-by: default avatarWanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: default avatarStefan Weinhuber <wein@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent cbe05685
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3804,7 +3804,7 @@ dasd_eckd_ioctl(struct dasd_block *block, unsigned int cmd, void __user *argp)
	case BIODASDSYMMIO:
		return dasd_symm_io(device, argp);
	default:
		return -ENOIOCTLCMD;
		return -ENOTTY;
	}
}

+2 −5
Original line number Diff line number Diff line
@@ -498,12 +498,9 @@ int dasd_ioctl(struct block_device *bdev, fmode_t mode,
		break;
	default:
		/* if the discipline has an ioctl method try it. */
		if (base->discipline->ioctl) {
		rc = -ENOTTY;
		if (base->discipline->ioctl)
			rc = base->discipline->ioctl(block, cmd, argp);
			if (rc == -ENOIOCTLCMD)
				rc = -EINVAL;
		} else
			rc = -EINVAL;
	}
	dasd_put_device(base);
	return rc;