]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/char_dev.c
vhost: scsi: add weight support
[mirror_ubuntu-bionic-kernel.git] / fs / char_dev.c
index a65e4a56318ca79d17c91e36c69c6aa3371728e4..20ce45c7c57c7d2ca6e6bcb2ba1c0a1806e3f728 100644 (file)
@@ -159,6 +159,12 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
                        ret = -EBUSY;
                        goto out;
                }
+
+               if (new_min < old_min && new_max > old_max) {
+                       ret = -EBUSY;
+                       goto out;
+               }
+
        }
 
        cd->next = *cp;