Commit d1777aa9 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Get rid of ldlm_error_t typedef

Replace it with enum ldlm_error
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 52c902fc
......@@ -69,7 +69,7 @@ struct obd_device;
/**
* LDLM non-error return states
*/
typedef enum {
enum ldlm_error {
ELDLM_OK = 0,
ELDLM_LOCK_CHANGED = 300,
......@@ -80,7 +80,7 @@ typedef enum {
ELDLM_NAMESPACE_EXISTS = 400,
ELDLM_BAD_NAMESPACE = 401
} ldlm_error_t;
};
/**
* LDLM namespace type.
......@@ -1019,7 +1019,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
} while (0)
typedef int (*ldlm_processing_policy)(struct ldlm_lock *lock, __u64 *flags,
int first_enq, ldlm_error_t *err,
int first_enq, enum ldlm_error *err,
struct list_head *work_list);
/**
......@@ -1105,7 +1105,7 @@ static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
return 0;
}
int ldlm_error2errno(ldlm_error_t error);
int ldlm_error2errno(enum ldlm_error error);
#if LUSTRE_TRACKS_LOCK_EXP_REFS
void ldlm_dump_export_locks(struct obd_export *exp);
......
......@@ -133,7 +133,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
* would be collected and ASTs sent.
*/
static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
int first_enq, ldlm_error_t *err,
int first_enq, enum ldlm_error *err,
struct list_head *work_list)
{
struct ldlm_resource *res = req->l_resource;
......@@ -449,7 +449,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
struct obd_import *imp = NULL;
struct ldlm_flock_wait_data fwd;
struct l_wait_info lwi;
ldlm_error_t err;
enum ldlm_error err;
int rc = 0;
CDEBUG(D_DLMTRACE, "flags: 0x%llx data: %p getlk: %p\n",
......
......@@ -136,7 +136,7 @@ ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *,
enum ldlm_type type, enum ldlm_mode mode,
const struct ldlm_callback_suite *cbs,
void *data, __u32 lvb_len, enum lvb_type lvb_type);
ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
void *cookie, __u64 *flags);
void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode);
......
......@@ -733,7 +733,7 @@ enum ldlm_mode lck_compat_array[] = {
* Rather arbitrary mapping from LDLM error codes to errno values. This should
* not escape to the user level.
*/
int ldlm_error2errno(ldlm_error_t error)
int ldlm_error2errno(enum ldlm_error error)
{
int result;
......@@ -761,7 +761,7 @@ int ldlm_error2errno(ldlm_error_t error)
break;
default:
if (((int)error) < 0) /* cast to signed type */
result = error; /* as ldlm_error_t can be unsigned */
result = error; /* as enum ldlm_error can be unsigned */
else {
CERROR("Invalid DLM result code: %d\n", error);
result = -EPROTO;
......
......@@ -1512,7 +1512,7 @@ struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
* Does not block. As a result of enqueue the lock would be put
* into granted or waiting list.
*/
ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *ns,
struct ldlm_lock **lockp,
void *cookie, __u64 *flags)
{
......
Markdown is supported
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