diff --git a/lustre/mdd/mdd_internal.h b/lustre/mdd/mdd_internal.h index d72d48c66e8e66c3fff72d06fcb5f0ec004bf868..205cce1d249af70df7561cb3b59763d2ba96ed83 100644 --- a/lustre/mdd/mdd_internal.h +++ b/lustre/mdd/mdd_internal.h @@ -115,7 +115,8 @@ struct mdd_object { unsigned long mod_flags; struct dynlock mod_pdlock; #ifdef CONFIG_LOCKDEP - struct lockdep_map mod_dep_map_pdlock; + /* "dep_map" name is assumed by lockdep.h macros. */ + struct lockdep_map dep_map; #endif }; @@ -553,7 +554,7 @@ static inline int mdo_xattr_get(const struct lu_env *env,struct mdd_object *obj, static inline int mdo_xattr_set(const struct lu_env *env,struct mdd_object *obj, const struct lu_buf *buf, const char *name, - int fl, struct thandle *handle, + int fl, struct thandle *handle, struct lustre_capa *capa) { struct dt_object *next = mdd_object_child(obj); @@ -571,7 +572,7 @@ static inline int mdo_xattr_del(const struct lu_env *env,struct mdd_object *obj, return next->do_ops->do_xattr_del(env, next, name, handle, capa); } -static inline +static inline int mdo_xattr_list(const struct lu_env *env, struct mdd_object *obj, struct lu_buf *buf, struct lustre_capa *capa) { @@ -580,7 +581,7 @@ int mdo_xattr_list(const struct lu_env *env, struct mdd_object *obj, return next->do_ops->do_xattr_list(env, next, buf, capa); } -static inline +static inline int mdo_index_try(const struct lu_env *env, struct mdd_object *obj, const struct dt_index_features *feat) { @@ -604,8 +605,8 @@ static inline void mdo_ref_del(const struct lu_env *env, struct mdd_object *obj, return next->do_ops->do_ref_del(env, next, handle); } -static inline -int mdo_create_obj(const struct lu_env *env, struct mdd_object *o, +static inline +int mdo_create_obj(const struct lu_env *env, struct mdd_object *o, struct lu_attr *attr, struct dt_allocation_hint *hint, struct thandle *handle) @@ -615,7 +616,7 @@ int mdo_create_obj(const struct lu_env *env, struct mdd_object *o, } static inline struct obd_capa *mdo_capa_get(const struct lu_env *env, - struct mdd_object *obj, + struct mdd_object *obj, struct lustre_capa *old, __u64 opc) { diff --git a/lustre/mdd/mdd_lock.c b/lustre/mdd/mdd_lock.c index e90ae04d60650269e03457d42b146724c60d1e0e..b84d4c26363691994fd045784abcfd654f9cdeeb 100644 --- a/lustre/mdd/mdd_lock.c +++ b/lustre/mdd/mdd_lock.c @@ -57,18 +57,18 @@ static struct lock_class_key mdd_pdirop_key; static void mdd_lockdep_init(struct mdd_object *obj) { - lockdep_init_map(&obj->mod_dep_map_pdlock, "pdir", &mdd_pdirop_key); + lockdep_set_class_and_name(obj, &mdd_pdirop_key, "pdir"); } static void mdd_lockdep_pd_acquire(struct mdd_object *obj, enum mdd_object_role role) { - lock_acquire(&obj->mod_dep_map_pdlock, role, 0, 1, 2, RETIP); + lock_acquire(&obj->dep_map, role, 0, 1, 2, RETIP); } static void mdd_lockdep_pd_release(struct mdd_object *obj) { - lock_release(&obj->mod_dep_map_pdlock, 0, RETIP); + lock_release(&obj->dep_map, 0, RETIP); } #else /* !CONFIG_LOCKDEP */