Skip to content

Commit 5cae0aa

Browse files
mauelshaMike Snitzer
authored andcommitted
dm ioctl: have constant on the right side of the test
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent a6ba79c commit 5cae0aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/dm-ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,8 +1835,8 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
18351835
if (copy_from_user(version, user->version, sizeof(version)))
18361836
return -EFAULT;
18371837

1838-
if ((DM_VERSION_MAJOR != version[0]) ||
1839-
(DM_VERSION_MINOR < version[1])) {
1838+
if ((version[0] != DM_VERSION_MAJOR) ||
1839+
(version[1] > DM_VERSION_MINOR)) {
18401840
DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
18411841
DM_VERSION_MAJOR, DM_VERSION_MINOR,
18421842
DM_VERSION_PATCHLEVEL,

0 commit comments

Comments
 (0)