Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 301c6b0c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge android11-5.4.259+ (70db018a) into msm-5.4"

parents 995eaab1 079b43b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
LTS_5.4.259_81334f26ac70
LTS_5.4.259_70db018a109
+26 −24
Original line number Diff line number Diff line
@@ -321,6 +321,15 @@ static void nvmet_tcp_fatal_error(struct nvmet_tcp_queue *queue)
		kernel_sock_shutdown(queue->sock, SHUT_RDWR);
}

static void nvmet_tcp_socket_error(struct nvmet_tcp_queue *queue, int status)
{
	queue->rcv_state = NVMET_TCP_RECV_ERR;
	if (status == -EPIPE || status == -ECONNRESET)
		kernel_sock_shutdown(queue->sock, SHUT_RDWR);
	else
		nvmet_tcp_fatal_error(queue);
}

static int nvmet_tcp_map_data(struct nvmet_tcp_cmd *cmd)
{
	struct nvme_sgl_desc *sgl = &cmd->req.cmd->common.dptr.sgl;
@@ -714,11 +723,15 @@ static int nvmet_tcp_try_send(struct nvmet_tcp_queue *queue,

	for (i = 0; i < budget; i++) {
		ret = nvmet_tcp_try_send_one(queue, i == budget - 1);
		if (ret <= 0)
		if (unlikely(ret < 0)) {
			nvmet_tcp_socket_error(queue, ret);
			goto done;
		} else if (ret == 0) {
			break;
		}
		(*sends)++;
	}

done:
	return ret;
}

@@ -816,15 +829,11 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue)
	iov.iov_len = sizeof(*icresp);
	ret = kernel_sendmsg(queue->sock, &msg, &iov, 1, iov.iov_len);
	if (ret < 0)
		goto free_crypto;
		return ret; /* queue removal will cleanup */

	queue->state = NVMET_TCP_Q_LIVE;
	nvmet_prepare_receive_pdu(queue);
	return 0;
free_crypto:
	if (queue->hdr_digest || queue->data_digest)
		nvmet_tcp_free_crypto(queue);
	return ret;
}

static void nvmet_tcp_handle_req_failure(struct nvmet_tcp_queue *queue,
@@ -1167,11 +1176,15 @@ static int nvmet_tcp_try_recv(struct nvmet_tcp_queue *queue,

	for (i = 0; i < budget; i++) {
		ret = nvmet_tcp_try_recv_one(queue);
		if (ret <= 0)
		if (unlikely(ret < 0)) {
			nvmet_tcp_socket_error(queue, ret);
			goto done;
		} else if (ret == 0) {
			break;
		}
		(*recvs)++;
	}

done:
	return ret;
}

@@ -1196,27 +1209,16 @@ static void nvmet_tcp_io_work(struct work_struct *w)
		pending = false;

		ret = nvmet_tcp_try_recv(queue, NVMET_TCP_RECV_BUDGET, &ops);
		if (ret > 0) {
		if (ret > 0)
			pending = true;
		} else if (ret < 0) {
			if (ret == -EPIPE || ret == -ECONNRESET)
				kernel_sock_shutdown(queue->sock, SHUT_RDWR);
			else
				nvmet_tcp_fatal_error(queue);
		else if (ret < 0)
			return;
		}

		ret = nvmet_tcp_try_send(queue, NVMET_TCP_SEND_BUDGET, &ops);
		if (ret > 0) {
			/* transmitted message/data */
		if (ret > 0)
			pending = true;
		} else if (ret < 0) {
			if (ret == -EPIPE || ret == -ECONNRESET)
				kernel_sock_shutdown(queue->sock, SHUT_RDWR);
			else
				nvmet_tcp_fatal_error(queue);
		else if (ret < 0)
			return;
		}

	} while (pending && ops < NVMET_TCP_IO_WORK_BUDGET);

+4 −2
Original line number Diff line number Diff line
@@ -218,8 +218,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)
	int tv = prandom_u32() % max_delay;

	im->tm_running = 1;
	if (!mod_timer(&im->timer, jiffies+tv+2))
		refcount_inc(&im->refcnt);
	if (refcount_inc_not_zero(&im->refcnt)) {
		if (mod_timer(&im->timer, jiffies + tv + 2))
			ip_ma_put(im);
	}
}

static void igmp_gq_start_timer(struct in_device *in_dev)
+1119 −310

File changed.

Preview size limit exceeded, changes collapsed.