don't include net.h in fs.h
Subsystems (6)
PATCH 1/1 don't include net.h in fs.h
fs.h is pulling so much crap in.. No need to include net.h in fs.h if we move struct sock_alloc to net.h (which already includes fs.h through skbuf.h and mm.h..). Fixup the few files in net/ that relied on this, and the readv/writev implementations that got uio.h through net.h.
fs/block_dev.c +2 -1
@@ -21,8 +21,9 @@#include <linux/buffer_head.h> #include <linux/mpage.h> #include <linux/mount.h> - +#include <linux/uio.h> #include <asm/uaccess.h> +static sector_t max_block (struct block_device *bdev) {
===== fs/direct-io.c 1.20 vs edited =====
fs/direct-io.c +1 -0
@@ -21,6 +21,7 @@#include <linux/blkdev.h> #include <linux/buffer_head.h> #include <linux/rwsem.h> +#include <linux/uio.h> #include <asm/atomic.h> /*
===== fs/ext3/inode.c 1.48 vs edited =====
fs/ext3/inode.c +1 -0
@@ -34,6 +34,7 @@#include <linux/string.h> #include <linux/buffer_head.h> #include <linux/mpage.h> +#include <linux/uio.h> #include "xattr.h" #include "acl.h"
===== include/linux/fs.h 1.191 vs edited =====
include/linux/fs.h +2 -16
@@ -12,7 +12,6 @@#include <linux/wait.h> #include <linux/types.h> #include <linux/vfs.h> -#include <linux/net.h> #include <linux/kdev_t.h> #include <linux/ioctl.h> #include <linux/list.h>
@@ -27,7 +27,9 @@#include <asm/atomic.h> struct poll_table_struct ; +struct iovec ;struct nameidata ; +struct vm_area_struct ;struct vfsmount ;/*
@@ -412,21 +414,6 @@ } u; }; -struct socket_alloc { -struct socket socket; -struct inode vfs_inode; -}; - -static inline struct socket *SOCKET_I (struct inode *inode) -{ - return &container_of(inode, struct socket_alloc, vfs_inode)->socket; -} - -static inline struct inode *SOCK_INODE (struct socket *socket) -{ - return &container_of(socket, struct socket_alloc, socket)->vfs_inode; -} -/* will die */ #include <linux/coda_fs_i.h> #include <linux/ext3_fs_i.h>
===== include/net/sock.h 1.28 vs edited =====
include/net/sock.h +15 -0
@@ -321,6 +321,21 @@ return container_of((void *)si, struct kiocb, private); } +struct socket_alloc { +struct socket socket; +struct inode vfs_inode; +}; + +static inline struct socket *SOCKET_I (struct inode *inode) +{ + return &container_of(inode, struct socket_alloc, vfs_inode)->socket; +} + +static inline struct inode *SOCK_INODE (struct socket *socket) +{ + return &container_of(socket, struct socket_alloc, socket)->vfs_inode; +} +/* Used by processes to "lock" a socket state, so that * interrupts and bottom half handlers won't change it * from under us. It essentially blocks any incoming
===== net/ipv4/arp.c 1.15 vs edited =====
net/ipv4/arp.c +1 -0
@@ -90,6 +90,7 @@#include <linux/seq_file.h> #include <linux/stat.h> #include <linux/init.h> +#include <linux/net.h> #ifdef CONFIG_SYSCTL #include <linux/sysctl.h> #endif
===== net/ipv4/inetpeer.c 1.5 vs edited =====
net/ipv4/inetpeer.c +1 -0
@@ -18,6 +18,7 @@#include <linux/time.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/net.h> #include <net/inetpeer.h> /*
===== net/ipv4/raw.c 1.24 vs edited =====
net/ipv4/raw.c +1 -0
@@ -64,6 +64,7 @@#include <net/sock.h> #include <linux/gfp.h> #include <linux/ip.h> +#include <linux/net.h> #include <net/ip.h> #include <net/icmp.h> #include <net/udp.h>
===== net/sunrpc/cache.c 1.6 vs edited =====
net/sunrpc/cache.c +1 -0
@@ -23,6 +23,7 @@#include <asm/uaccess.h> #include <linux/poll.h> #include <linux/proc_fs.h> +#include <linux/net.h> #include <asm/ioctls.h> #include <linux/sunrpc/types.h> #include <linux/sunrpc/cache.h>