Unverified Commit 36a8abcd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2342 linux-4.19.y inclusion

Merge Pull Request from: @LiuYongQiang0816 
 
12 patches from linux-4.19.y 
 
Link:https://gitee.com/openeuler/kernel/pulls/2342

 

Reviewed-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 512ccf42 ba30ff01
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2163,7 +2163,9 @@ static void team_setup(struct net_device *dev)

	dev->hw_features = TEAM_VLAN_FEATURES |
			   NETIF_F_HW_VLAN_CTAG_RX |
			   NETIF_F_HW_VLAN_CTAG_FILTER;
			   NETIF_F_HW_VLAN_CTAG_FILTER |
			   NETIF_F_HW_VLAN_STAG_RX |
			   NETIF_F_HW_VLAN_STAG_FILTER;

	dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
	dev->features |= dev->hw_features;
+1 −0
Original line number Diff line number Diff line
@@ -3207,6 +3207,7 @@ void serial8250_init_port(struct uart_8250_port *up)
	struct uart_port *port = &up->port;

	spin_lock_init(&port->lock);
	port->pm = NULL;
	port->ops = &serial8250_pops;

	up->cur_iotype = 0xFF;
+2 −1
Original line number Diff line number Diff line
@@ -2405,7 +2405,8 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,

	error = add_dquot_ref(sb, type);
	if (error)
		dquot_disable(sb, type, flags);
		dquot_disable(sb, type,
			      DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	return error;
out_file_init:
+9 −2
Original line number Diff line number Diff line
@@ -1187,6 +1187,7 @@ struct proto {
	/*
	 * Pressure flag: try to collapse.
	 * Technical note: it is used by multiple contexts non atomically.
	 * Make sure to use READ_ONCE()/WRITE_ONCE() for all reads/writes.
	 * All the __sk_mem_schedule() is of this nature: accounting
	 * is strict, actions are advisory and have some latency.
	 */
@@ -1307,6 +1308,12 @@ static inline bool sk_has_memory_pressure(const struct sock *sk)
	return sk->sk_prot->memory_pressure != NULL;
}

static inline bool sk_under_global_memory_pressure(const struct sock *sk)
{
	return sk->sk_prot->memory_pressure &&
		!!READ_ONCE(*sk->sk_prot->memory_pressure);
}

static inline bool sk_under_memory_pressure(const struct sock *sk)
{
	if (!sk->sk_prot->memory_pressure)
@@ -1316,7 +1323,7 @@ static inline bool sk_under_memory_pressure(const struct sock *sk)
	    mem_cgroup_under_socket_pressure(sk->sk_memcg))
		return true;

	return !!*sk->sk_prot->memory_pressure;
	return !!READ_ONCE(*sk->sk_prot->memory_pressure);
}

static inline long
@@ -1370,7 +1377,7 @@ proto_memory_pressure(struct proto *prot)
{
	if (!prot->memory_pressure)
		return false;
	return !!*prot->memory_pressure;
	return !!READ_ONCE(*prot->memory_pressure);
}


+4 −1
Original line number Diff line number Diff line
@@ -2702,7 +2702,10 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh,
	ifm = nlmsg_data(nlh);
	if (ifm->ifi_index > 0)
		dev = __dev_get_by_index(net, ifm->ifi_index);
	else if (tb[IFLA_IFNAME])
	else if (ifm->ifi_index < 0) {
		NL_SET_ERR_MSG(extack, "ifindex can't be negative");
		return -EINVAL;
	} else if (tb[IFLA_IFNAME])
		dev = __dev_get_by_name(net, ifname);
	else
		goto errout;
Loading