Skip to content
Commit e80d1c80 authored by Vivek Goyal's avatar Vivek Goyal Committed by Mike Snitzer
Browse files

dm: do not override error code returned from dm_get_device()



Some of the device mapper targets override the error code returned by
dm_get_device() and return either -EINVAL or -ENXIO.  There is nothing
gained by this override.  It is better to propagate the returned error
code unchanged to caller.

This work was motivated by hitting an issue where the underlying device
was busy but -EINVAL was being returned.  After this change we get
-EBUSY instead and it is easier to figure out the problem.

Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent ab37844d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment