Lines Matching refs:lksb
2727 static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags, in set_lock_args() argument
2734 static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags, in set_lock_args()
2775 if (!ast || !lksb) in set_lock_args()
2778 if (flags & DLM_LKF_VALBLK && !lksb->sb_lvbptr) in set_lock_args()
2781 if (flags & DLM_LKF_CONVERT && !lksb->sb_lkid) in set_lock_args()
2796 args->lksb = lksb; in set_lock_args()
2847 lkb->lkb_lksb = args->lksb; in validate_lock_args()
2848 lkb->lkb_lvbptr = args->lksb->sb_lvbptr; in validate_lock_args()
3374 struct dlm_lksb *lksb, in dlm_lock() argument
3395 error = find_lkb(ls, lksb->sb_lkid, &lkb); in dlm_lock()
3405 error = set_lock_args(mode, lksb, flags, namelen, 0, ast, in dlm_lock()
3408 error = set_lock_args(mode, lksb, flags, namelen, ast, astarg, bast, in dlm_lock()
3437 struct dlm_lksb *lksb, in dlm_unlock() argument
5736 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS); in dlm_user_request()
5737 if (!ua->lksb.sb_lvbptr) { in dlm_user_request()
5744 error = set_lock_args(mode, &ua->lksb, flags, namelen, timeout_cs, in dlm_user_request()
5747 error = set_lock_args(mode, &ua->lksb, flags, namelen, fake_astfn, ua, in dlm_user_request()
5751 kfree(ua->lksb.sb_lvbptr); in dlm_user_request()
5752 ua->lksb.sb_lvbptr = NULL; in dlm_user_request()
5818 if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) { in dlm_user_convert()
5819 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS); in dlm_user_convert()
5820 if (!ua->lksb.sb_lvbptr) { in dlm_user_convert()
5825 if (lvb_in && ua->lksb.sb_lvbptr) in dlm_user_convert()
5826 memcpy(ua->lksb.sb_lvbptr, lvb_in, DLM_USER_LVB_LEN); in dlm_user_convert()
5836 error = set_lock_args(mode, &ua->lksb, flags, 0, timeout_cs, in dlm_user_convert()
5839 error = set_lock_args(mode, &ua->lksb, flags, 0, fake_astfn, ua, in dlm_user_convert()
5947 if (lvb_in && ua->lksb.sb_lvbptr) in dlm_user_unlock()
5948 memcpy(ua->lksb.sb_lvbptr, lvb_in, DLM_USER_LVB_LEN); in dlm_user_unlock()
6284 struct dlm_lksb *lksb; in dlm_debug_add_lkb() local
6293 lksb = kzalloc(sizeof(*lksb), GFP_NOFS); in dlm_debug_add_lkb()
6294 if (!lksb) in dlm_debug_add_lkb()
6299 kfree(lksb); in dlm_debug_add_lkb()
6305 lkb->lkb_lksb = lksb; in dlm_debug_add_lkb()
6312 kfree(lksb); in dlm_debug_add_lkb()