+struct ldlm_lock {
+ /**
+ * Must be first in the structure.
+ */
+ struct portals_handle l_handle;
+ /**
+ * Lock reference count.
+ */
+ cfs_atomic_t l_refc;
+ /**
+ * Internal spinlock protects l_resource. we should hold this lock
+ * first before grabbing res_lock.
+ */
+ cfs_spinlock_t l_lock;
+ /**
+ * ldlm_lock_change_resource() can change this.
+ */
+ struct ldlm_resource *l_resource;
+ /**
+ * Protected by ns_hash_lock. List item for client side lru list.
+ */
+ cfs_list_t l_lru;
+ /**
+ * Protected by lr_lock, linkage to resource's lock queues.
+ */
+ cfs_list_t l_res_link;
+ /**
+ * Tree node for ldlm_extent.
+ */
+ struct ldlm_interval *l_tree_node;
+ /**
+ * Protected by per-bucket exp->exp_lock_hash locks. Per export hash
+ * of locks.
+ */
+ cfs_hlist_node_t l_exp_hash;
+ /**
+ * Protected by lr_lock. Requested mode.
+ */
+ ldlm_mode_t l_req_mode;
+ /**
+ * Granted mode, also protected by lr_lock.
+ */
+ ldlm_mode_t l_granted_mode;
+ /**
+ * Lock enqueue completion handler.
+ */