9p: Remove INET dependency
Subsystems (3)
PATCH v2 1/1 9p: Remove INET dependency
9pfs can run over assorted transports, so it doesn't have an INET dependency. Drop it and remove the includes of linux/inet.h.
NET_9P_FD/trans_fd.o builds without INET or UNIX and is unusable over plain file descriptors. However, tcp and unix functionality is still built and would generate runtime failures if used. Add imply INET and UNIX to NET_9P_FD, so functionality is enabled by default but can still be explicitly disabled.
This allows configuring 9pfs over Xen with INET and UNIX disabled.
---
v2
Add imply INET and UNIX
--- fs/9p/Kconfig | 2 +- fs/9p/vfs_addr.c | 1 - fs/9p/vfs_dentry.c | 1 - fs/9p/vfs_dir.c | 1 - fs/9p/vfs_file.c | 1 - fs/9p/vfs_inode.c | 1 - fs/9p/vfs_inode_dotl.c | 1 - fs/9p/vfs_super.c | 1 - net/9p/Kconfig | 2 ++ 9 files changed, 3 insertions(+), 8 deletions(-)
fs/9p/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config 9P_FS tristate "Plan 9 Resource Sharing Support (9P2000)" - depends on INET && NET_9P + depends on NET_9P select NETFS_SUPPORT help If you say Y here, you will get experimental support for
fs/9p/vfs_addr.c +0 -1
@@ -12,7 +12,6 @@#include <linux/file.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/pagemap.h> #include <linux/sched.h> #include <linux/swap.h>
fs/9p/vfs_dentry.c +0 -1
@@ -13,7 +13,6 @@#include <linux/pagemap.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/namei.h> #include <linux/sched.h> #include <linux/slab.h>
fs/9p/vfs_dir.c +0 -1
@@ -13,7 +13,6 @@#include <linux/stat.h> #include <linux/string.h> #include <linux/sched.h> -#include <linux/inet.h> #include <linux/slab.h> #include <linux/uio.h> #include <linux/fscache.h>
fs/9p/vfs_file.c +0 -1
@@ -14,7 +14,6 @@#include <linux/file.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/list.h> #include <linux/pagemap.h> #include <linux/utsname.h>
fs/9p/vfs_inode.c +0 -1
@@ -15,7 +15,6 @@#include <linux/pagemap.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/namei.h> #include <linux/sched.h> #include <linux/slab.h>
fs/9p/vfs_inode_dotl.c +0 -1
@@ -13,7 +13,6 @@#include <linux/pagemap.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/namei.h> #include <linux/sched.h> #include <linux/slab.h>
fs/9p/vfs_super.c +0 -1
@@ -12,7 +12,6 @@#include <linux/file.h> #include <linux/stat.h> #include <linux/string.h> -#include <linux/inet.h> #include <linux/pagemap.h> #include <linux/mount.h> #include <linux/sched.h>
net/9p/Kconfig +2 -0
@@ -17,6 +17,8 @@ if NET_9P config NET_9P_FD default NET_9P + imply INET + imply UNIX tristate "9P FD Transport" help This builds support for transports over TCP, Unix sockets and
Signature · 1 line
2.40.1
Christian Schoenebeck
reviewerQuoted 4 lines · CEST Jason Andryuk
9pfs can run over assorted transports, so it doesn't have an INET dependency. Drop it and remove the includes of
linux/inet.h.
NET_9P_FD/trans_fd.obuilds without INET or UNIX and is unusable over
s/unusable/usable/ ?
Quoted 11 lines
plain file descriptors. However, tcp and unix functionality is still built and would generate runtime failures if used. Add imply INET and UNIX to
NET_9P_FD, so functionality is enabled by default but can still be explicitly disabled.This allows configuring 9pfs over Xen with INET and UNIX disabled.
Signed-off-by Jason Andryuk <[email protected]>---
v2
Add imply INET and UNIX
Quoted 8 lines · Christian Schoenebeck
Quoted 4 lines · CEST Jason Andryuk
9pfs can run over assorted transports, so it doesn't have an INET dependency. Drop it and remove the includes of
linux/inet.h.
NET_9P_FD/trans_fd.obuilds without INET or UNIX and is unusable overs/unusable/usable/ ?
Whoops! Yes, you are correct. Thanks for catching that.
Regards,
Jason
Simon Horman
Reviewed-byQuoted 4 lines · Jason Andryuk
Quoted 2 lines · Christian Schoenebeck
On Wednesday, May 3, 2023 4:11:20 PM CEST Jason Andryuk wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
9pfs can run over assorted transports, so it doesn't have an INET dependency. Drop it and remove the includes of
linux/inet.h.
NET_9P_FD/trans_fd.obuilds without INET or UNIX and is unusable overs/unusable/usable/ ?
Whoops! Yes, you are correct. Thanks for catching that.
That notwithstanding, this looks good to me.