[Linux-cluster] Is this intentional: specifying a new completion ast routine on a convert
Jeff
jeff at intersystems.com
Wed Jul 28 16:54:45 UTC 2004
Wednesday, July 28, 2004, 12:49:48 PM, Jeff wrote:
> This is from device.c. The intent seems to
> be that if an argument is specified, then it overrides
> an existing value. However, a new completion ast address
> is only loaded if a new blocking ast address is specified.
> if (kparams->flags & DLM_LKF_CONVERT) {
> struct dlm_lkb *lkb =
> dlm_get_lkb(fi->fi_ls->ls_lockspace, kparams->lkid);
> if (!lkb) {
> return -EINVAL;
> }
> li = (struct lock_info *)lkb->lkb_astparam;
> /* Only override these if they are provided */
> if (li->li_user_lksb)
> li->li_user_lksb = kparams->lksb;
> if (li->li_astparam)
> li->li_astparam = kparams->astparam;
> if (li->li_bastaddr)
> li->li_bastaddr = kparams->bastaddr;
--->> if (li->li_bastaddr)
--->> li->li_astaddr = kparams->astaddr;
> li->li_flags = 0;
> }
Looking at this again, shouldn't it be testing kparams-> in
the if() rather than li->*? The current code seems to write new
values if there were old ones as opposed to if new values
are specified.
More information about the Linux-cluster
mailing list