aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorGravatar Heinz Mauelshagen <heinzm@redhat.com> 2023-02-07 21:47:45 +0100
committerGravatar Mike Snitzer <snitzer@kernel.org> 2023-02-14 14:23:07 -0500
commit5cae0aa77397015f530aeb34f3ced32db6ac2875 (patch)
tree2e5749c8d70e9acd286382a03d6653a4a536610a /drivers/md
parentdm: don't indent labels (diff)
downloadlinux-5cae0aa77397015f530aeb34f3ced32db6ac2875.tar.gz
linux-5cae0aa77397015f530aeb34f3ced32db6ac2875.tar.bz2
linux-5cae0aa77397015f530aeb34f3ced32db6ac2875.zip
dm ioctl: have constant on the right side of the test
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 7a90dadc20f6..9a19bcd8fcfe 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1835,8 +1835,8 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
if (copy_from_user(version, user->version, sizeof(version)))
return -EFAULT;
- if ((DM_VERSION_MAJOR != version[0]) ||
- (DM_VERSION_MINOR < version[1])) {
+ if ((version[0] != DM_VERSION_MAJOR) ||
+ (version[1] > DM_VERSION_MINOR)) {
DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
DM_VERSION_MAJOR, DM_VERSION_MINOR,
DM_VERSION_PATCHLEVEL,