From: alex Date: Fri, 24 Apr 2009 18:04:24 +0000 (+0000) Subject: - check for methods in osd instance X-Git-Tag: GIT_EPOCH_B_HD_KDMU~2^4~108 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=71279dbc3e114f76020f7568c512363a7c809740;p=fs%2Flustre-release.git - check for methods in osd instance --- diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 0bbd792..d5fef26 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -809,6 +809,9 @@ static inline int dt_declare_punch(const struct lu_env *env, struct dt_object *dt, __u64 start, __u64 end, struct thandle *th) { + LASSERT(dt); + LASSERT(dt->do_ops); + LASSERT(dt->do_ops->do_declare_punch); return dt->do_ops->do_declare_punch(env, dt, start, end, th); } @@ -816,6 +819,9 @@ static inline int dt_punch(const struct lu_env *env, struct dt_object *dt, __u64 start, __u64 end, struct thandle *th, struct lustre_capa *capa) { + LASSERT(dt); + LASSERT(dt->do_ops); + LASSERT(dt->do_ops->do_punch); return dt->do_ops->do_punch(env, dt, start, end, th, capa); }