diff options
author | Chris Wedgwood <[email protected]> | 2012-09-24 10:30:18 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-10-03 10:39:12 -0700 |
commit | 23a61ccc1b89fa5b89b5d8383d57cf5152406cfc (patch) | |
tree | 973b416e485b671daeea3db246f1fee1735787f1 /module | |
parent | 37abac6d559a1da8ab8e5379442f491b73998f6a (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #949
Closes #931
Closes #789
Closes #743
Closes #730
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zvol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 22f14a006..a182f79d3 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -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; |