staging/lustre/ldlm: Remove ldlm_errno2error()
authorOleg Drokin <green@linuxhacker.ru>
Thu, 1 Oct 2015 04:12:25 +0000 (00:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:17:19 +0000 (11:17 +0200)
This particular incarnation is only used on the server.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c

index 72c52eff89add02bfd1fb044d8c0a2e7a863e3db..432222b920386ed77f158f7a3957cec245ac7f75 100644 (file)
@@ -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
index 584c4e67d90e0ec9a18f42ebe6b5854d241305d3..b8402005b5607b6584e78c38848556109ca2404e 100644 (file)
@@ -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)
 {