mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
zvol_probe should return NULL when the device isn't found.
Previously we returned ERR_PTR(-ENOENT) which the rest of the kernel doesn't expect and as such we can oops. Signed-off-by: Chris Wedgwood <cw@f00f.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #949 Closes #931 Closes #789 Closes #743 Closes #730
This commit is contained in:
parent
37abac6d55
commit
23a61ccc1b
@ -1065,7 +1065,7 @@ zvol_probe(dev_t dev, int *part, void *arg)
|
||||
|
||||
mutex_enter(&zvol_state_lock);
|
||||
zv = zvol_find_by_dev(dev);
|
||||
kobj = zv ? get_disk(zv->zv_disk) : ERR_PTR(-ENOENT);
|
||||
kobj = zv ? get_disk(zv->zv_disk) : NULL;
|
||||
mutex_exit(&zvol_state_lock);
|
||||
|
||||
return kobj;
|
||||
|
Loading…
Reference in New Issue
Block a user