btrfs: add_missing_dev() should return the actual error
authorAnand Jain <anand.jain@oracle.com>
Wed, 11 Oct 2017 04:46:18 +0000 (12:46 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:59 +0000 (12:27 +0100)
commitadfb69af7d8cb6a3958f75aad1ef4bc96891d116
tree43d0b60d34781e5116df4ca94ebd5f2b059cf1cb
parent9e882d6d059ae79afb7b8748cb5ffd83acd058e2
btrfs: add_missing_dev() should return the actual error

add_missing_dev() can return device pointer so that IS_ERR/PTR_ERR can
be used to check for the actual error that occurred in the function.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
[ minor error message adjustment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c