From: Horst Hummel Date: Fri, 6 Jan 2006 08:19:14 +0000 (-0800) Subject: [PATCH] s390: BIODASDPRRD ioctl return code X-Git-Tag: v2.6.16-rc1~936^2~117 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9a7af289660dc749d7c58234191601046a9bf488;p=~shefty%2Frdma-dev.git [PATCH] s390: BIODASDPRRD ioctl return code The IOCTL BIODASDPRRD had no return code for 'profiling is inactive' and therefore tunedasd wrote misleading message for request-counter = 0. Introduce return-code EIO for inactive profiling. Signed-off-by: Horst Hummel Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 789595b3fa0..044b7537199 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.47 $ + * $Revision: 1.50 $ * * i/o controls for the dasd driver. */ @@ -352,6 +352,9 @@ dasd_ioctl_read_profile(struct block_device *bdev, int no, long args) if (device == NULL) return -ENODEV; + if (dasd_profile_level == DASD_PROFILE_OFF) + return -EIO; + if (copy_to_user((long __user *) args, (long *) &device->profile, sizeof (struct dasd_profile_info_t))) return -EFAULT;