> + switch(response->type) { > + case SMBD_TRANSFER_DATA: > + data_transfer = (struct smbd_data_transfer *) response->packet; Maybe add a little helper for the packet data to hide these cast, e.g. static inline void *smbd_payload(struct cifs_rdma_response *resp) { return (void *)response->packet; } > + atomic_dec(&info->receive_credits); > + atomic_set(&info->receive_credit_target, > + le16_to_cpu(data_transfer->credits_requested)); > + atomic_add(le16_to_cpu(data_transfer->credits_granted), > + &info->send_credits); That's a lot of atomic ops in the fast path handler. Also remember that atomic_set isn't really atomic vs other callers. -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html