X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fofd%2Fofd_lvb.c;h=a48b4d5504f1cf85b31597e3927adb683a9588ea;hp=aecd1b6bfc60cde1d8ff2554155d022e15682830;hb=e5abcf83c0575b8a79594c1eb9ea727739d91522;hpb=bd596fbe449f4fbab18ed184ccce1e141928b116 diff --git a/lustre/ofd/ofd_lvb.c b/lustre/ofd/ofd_lvb.c index aecd1b6..a48b4d5 100644 --- a/lustre/ofd/ofd_lvb.c +++ b/lustre/ofd/ofd_lvb.c @@ -345,6 +345,7 @@ static int ofd_lvbo_size(struct ldlm_lock *lock) * * This function is called to fill the given RPC buffer \a buf with LVB data * + * \param[in] env execution environment * \param[in] lock LDLM lock * \param[in] buf RPC buffer to fill * \param[in] buflen buffer length @@ -352,7 +353,7 @@ static int ofd_lvbo_size(struct ldlm_lock *lock) * \retval size of LVB data written into \a buf buffer */ static int ofd_lvbo_fill(const struct lu_env *env, struct ldlm_lock *lock, - void *buf, int buflen) + void *buf, int *buflen) { struct ldlm_resource *res = lock->l_resource; int lvb_len; @@ -364,8 +365,8 @@ static int ofd_lvbo_fill(const struct lu_env *env, struct ldlm_lock *lock, lvb_len = ofd_lvbo_size(lock); LASSERT(lvb_len <= res->lr_lvb_len); - if (lvb_len > buflen) - lvb_len = buflen; + if (lvb_len > *buflen) + lvb_len = *buflen; lock_res(res); memcpy(buf, res->lr_lvb_data, lvb_len);