Home
last modified time | relevance | path

Searched refs:credit_charge (Results 1 – 2 of 2) sorted by relevance

/linux-6.12.1/fs/smb/server/
Dsmb2misc.c305 unsigned short credit_charge = le16_to_cpu(hdr->CreditCharge); in smb2_validate_credit_charge() local
336 credit_charge = max_t(unsigned short, credit_charge, 1); in smb2_validate_credit_charge()
340 if (credit_charge < calc_credit_num) { in smb2_validate_credit_charge()
342 credit_charge, calc_credit_num); in smb2_validate_credit_charge()
344 } else if (credit_charge > conn->vals->max_credits) { in smb2_validate_credit_charge()
345 ksmbd_debug(SMB, "Too large credit charge: %d\n", credit_charge); in smb2_validate_credit_charge()
350 if (credit_charge > conn->total_credits) { in smb2_validate_credit_charge()
352 credit_charge, conn->total_credits); in smb2_validate_credit_charge()
356 if ((u64)conn->outstanding_credits + credit_charge > conn->total_credits) { in smb2_validate_credit_charge()
358 credit_charge, conn->outstanding_credits); in smb2_validate_credit_charge()
[all …]
Dsmb2pdu.c317 unsigned short credit_charge, credits_granted = 0; in smb2_set_rsp_credits() local
330 credit_charge = max_t(unsigned short, in smb2_set_rsp_credits()
332 if (credit_charge > conn->total_credits) { in smb2_set_rsp_credits()
334 credit_charge, conn->total_credits); in smb2_set_rsp_credits()
338 conn->total_credits -= credit_charge; in smb2_set_rsp_credits()
339 conn->outstanding_credits -= credit_charge; in smb2_set_rsp_credits()