Searched refs:credit_charge (Results 1 – 2 of 2) sorted by relevance
/Linux-v6.1/fs/ksmbd/ |
D | smb2misc.c | 288 unsigned short credit_charge = le16_to_cpu(hdr->CreditCharge); in smb2_validate_credit_charge() local 319 credit_charge = max_t(unsigned short, credit_charge, 1); in smb2_validate_credit_charge() 323 if (credit_charge < calc_credit_num) { in smb2_validate_credit_charge() 325 credit_charge, calc_credit_num); in smb2_validate_credit_charge() 327 } else if (credit_charge > conn->vals->max_credits) { in smb2_validate_credit_charge() 328 ksmbd_debug(SMB, "Too large credit charge: %d\n", credit_charge); in smb2_validate_credit_charge() 333 if (credit_charge > conn->total_credits) { in smb2_validate_credit_charge() 335 credit_charge, conn->total_credits); in smb2_validate_credit_charge() 339 if ((u64)conn->outstanding_credits + credit_charge > conn->total_credits) { in smb2_validate_credit_charge() 341 credit_charge, conn->outstanding_credits); in smb2_validate_credit_charge() [all …]
|
D | smb2pdu.c | 304 unsigned short credit_charge, credits_granted = 0; in smb2_set_rsp_credits() local 317 credit_charge = max_t(unsigned short, in smb2_set_rsp_credits() 319 if (credit_charge > conn->total_credits) { in smb2_set_rsp_credits() 321 credit_charge, conn->total_credits); in smb2_set_rsp_credits() 325 conn->total_credits -= credit_charge; in smb2_set_rsp_credits() 326 conn->outstanding_credits -= credit_charge; in smb2_set_rsp_credits() 339 aux_max = conn->vals->max_credits - credit_charge; in smb2_set_rsp_credits()
|