Re: [PATCH -next] net/ipv4/tcp.c: remove superfluous header file in tcp.c

From: Eric Dumazet
Date: Wed Aug 11 2021 - 10:19:29 EST




On 8/11/21 3:33 PM, Mianhan Liu wrote:
> nr_free_buffer_pages could be exposed through mm.h instead of swap.h,
> and then tcp.c wouldn't need swap.h. Moreover, after preprocessing
> all the files that use nr_free_buffer_pages, it turns out that those files
> have already included mm.h.
> Thus, we can move nr_free_buffer_pages from swap.h to mm.h safely
> so as to reduce the obsolete includes.
>
> Signed-off-by: MianHan Liu <liumh1@xxxxxxxxxxxxxxxxxxx>

Not sure why tcp gets a special treatment.
Patch title does not match changelog at all.

You should submit a pure mm patch, then eventually one networking follow up.

# git grep -n linux/swap.h -- net
net/9p/trans_virtio.c:34:#include <linux/swap.h>
net/ipv4/sysctl_net_ipv4.c:18:#include <linux/swap.h>
net/ipv4/tcp.c:263:#include <linux/swap.h>
net/ipv4/udp.c:81:#include <linux/swap.h>
net/netfilter/ipvs/ip_vs_ctl.c:27:#include <linux/swap.h>
net/openvswitch/meter.c:15:#include <linux/swap.h>
net/sctp/protocol.c:36:#include <linux/swap.h>