LU-14178 ldlm: return error from ldlm_namespace_new()
Return the underlying error in ldlm_namespace_new() from
ldlm_namespace_sysfs_register() to the caller instead of NULL.
Otherwise, the callers convert the NULL to -ENOMEM and this
is incorrectly reported as an allocation error to the user.
sysfs: cannot create duplicate filename
'/fs/lustre/ldlm/namespaces/lustre-OST0002-osc-
ffff89f33be70000'
mount.lustre: mount mgs:/lfs at /lfs failed: Cannot allocate memory
Change ldlm_namespace_new() to return errors via PTR_ERR() and
change the callers to use IS_ERR().
Fix associated CERROR() messages to follow proper code style.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7d590c7242399549b32b1c4189e46ff8748c8096
Reviewed-on: https://review.whamcloud.com/40851
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>