From: Oleg Drokin Date: Thu, 1 Oct 2015 04:12:25 +0000 (-0400) Subject: staging/lustre/ldlm: Remove ldlm_errno2error() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38c3f17fcac1c5de10db7306e585b62577e55bcb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/ldlm: Remove ldlm_errno2error() This particular incarnation is only used on the server. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 72c52eff89ad..432222b92038 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1161,8 +1161,7 @@ static inline int ldlm_res_lvbo_update(struct ldlm_resource *res, } int ldlm_error2errno(ldlm_error_t error); -ldlm_error_t ldlm_errno2error(int err_no); /* don't call it `errno': this - * confuses user-space. */ + #if LUSTRE_TRACKS_LOCK_EXP_REFS void ldlm_dump_export_locks(struct obd_export *exp); #endif diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 584c4e67d90e..b8402005b560 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -814,42 +814,6 @@ int ldlm_error2errno(ldlm_error_t error) } EXPORT_SYMBOL(ldlm_error2errno); -/** - * Dual to ldlm_error2errno(): maps errno values back to ldlm_error_t. - */ -ldlm_error_t ldlm_errno2error(int err_no) -{ - int error; - - switch (err_no) { - case 0: - error = ELDLM_OK; - break; - case -ESTALE: - error = ELDLM_LOCK_CHANGED; - break; - case -ENAVAIL: - error = ELDLM_LOCK_ABORTED; - break; - case -ESRCH: - error = ELDLM_LOCK_REPLACED; - break; - case -ENOENT: - error = ELDLM_NO_LOCK_DATA; - break; - case -EEXIST: - error = ELDLM_NAMESPACE_EXISTS; - break; - case -EBADF: - error = ELDLM_BAD_NAMESPACE; - break; - default: - error = err_no; - } - return error; -} -EXPORT_SYMBOL(ldlm_errno2error); - #if LUSTRE_TRACKS_LOCK_EXP_REFS void ldlm_dump_export_locks(struct obd_export *exp) {