From d8ce80eebb742988d7ebd8607b04b15cc382efaf Mon Sep 17 00:00:00 2001 From: Tom Seewald Date: Thu, 11 Jun 2020 17:34:51 -0700 Subject: [PATCH] ocfs2: fix build failure when TCP/IP is disabled After commit ffe3774dd910 ("tcp: add tcp_sock_set_nodelay") and commit e2f7f8046c9e ("tcp: add tcp_sock_set_user_timeout"), building the kernel with OCFS2_FS=y but without INET=y causes it to fail with: ld: fs/ocfs2/cluster/tcp.o: in function `o2net_accept_many': tcp.c:(.text+0x21b1): undefined reference to `tcp_sock_set_nodelay' ld: tcp.c:(.text+0x21c1): undefined reference to `tcp_sock_set_user_timeout' ld: fs/ocfs2/cluster/tcp.o: in function `o2net_start_connect': tcp.c:(.text+0x2633): undefined reference to `tcp_sock_set_nodelay' ld: tcp.c:(.text+0x2643): undefined reference to `tcp_sock_set_user_timeout' This is due to tcp_sock_set_nodelay() and tcp_sock_set_user_timeout() being declared in linux/tcp.h and defined in net/ipv4/tcp.c, which depend on TCP/IP being enabled. To fix this, make OCFS2_FS depend on INET=y which already requires NET=y. Fixes: ffe3774dd910 ("tcp: add tcp_sock_set_nodelay") Fixes: e2f7f8046c9e ("tcp: add tcp_sock_set_user_timeout") Signed-off-by: Tom Seewald Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Acked-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Jason Gunthorpe Cc: David S. Miller Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Link: http://lkml.kernel.org/r/20200606190827.23954-1-tseewald@gmail.com Signed-off-by: Linus Torvalds --- fs/ocfs2/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/Kconfig b/fs/ocfs2/Kconfig index 1177c33df8953..aca16624b3702 100644 --- a/fs/ocfs2/Kconfig +++ b/fs/ocfs2/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config OCFS2_FS tristate "OCFS2 file system support" - depends on NET && SYSFS && CONFIGFS_FS + depends on INET && SYSFS && CONFIGFS_FS select JBD2 select CRC32 select QUOTA -- 2.39.5