@@ -279,9 +279,8 @@ struct ldlm_pool {
*/
struct ldlm_valblock_ops {
int (*lvbo_init)(struct ldlm_resource *res);
- int (*lvbo_update)(struct ldlm_resource *res,
- struct ptlrpc_request *r,
- int increase);
+ int (*lvbo_update)(struct ldlm_resource *res, struct ldlm_lock *lock,
+ struct ptlrpc_request *r, int increase);
int (*lvbo_free)(struct ldlm_resource *res);
/* Return size of lvb data appropriate RPC size can be reserved */
int (*lvbo_size)(struct ldlm_lock *lock);
@@ -1094,17 +1093,24 @@ static inline struct ldlm_lock *ldlm_handle2lock(const struct lustre_handle *h)
* Update Lock Value Block Operations (LVBO) on a resource taking into account
* data from request @r
*/
-static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
- struct ptlrpc_request *r, int increase)
+static inline int ldlm_lvbo_update(struct ldlm_resource *res,
+ struct ldlm_lock *lock,
+ struct ptlrpc_request *req, int increase)
{
- if (ldlm_res_to_ns(res)->ns_lvbo &&
- ldlm_res_to_ns(res)->ns_lvbo->lvbo_update) {
- return ldlm_res_to_ns(res)->ns_lvbo->lvbo_update(res, r,
- increase);
- }
+ struct ldlm_namespace *ns = ldlm_res_to_ns(res);
+
+ if (ns->ns_lvbo && ns->ns_lvbo->lvbo_update)
+ return ns->ns_lvbo->lvbo_update(res, lock, req, increase);
+
return 0;
}
+static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
+ struct ptlrpc_request *req, int increase)
+{
+ return ldlm_lvbo_update(res, NULL, req, increase);
+}
+
int ldlm_error2errno(enum ldlm_error error);
#if LUSTRE_TRACKS_LOCK_EXP_REFS