Commit 3a262a17 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] 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.
parent 827ff063
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/mpage.h> #include <linux/mpage.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/uio.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
static sector_t max_block(struct block_device *bdev) static sector_t max_block(struct block_device *bdev)
{ {
sector_t retval = ~((sector_t)0); sector_t retval = ~((sector_t)0);
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <linux/uio.h>
#include <asm/atomic.h> #include <asm/atomic.h>
/* /*
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/mpage.h> #include <linux/mpage.h>
#include <linux/uio.h>
#include "xattr.h" #include "xattr.h"
#include "acl.h" #include "acl.h"
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/vfs.h> #include <linux/vfs.h>
#include <linux/net.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -27,7 +26,9 @@ ...@@ -27,7 +26,9 @@
#include <asm/atomic.h> #include <asm/atomic.h>
struct poll_table_struct; struct poll_table_struct;
struct iovec;
struct nameidata; struct nameidata;
struct vm_area_struct;
struct vfsmount; struct vfsmount;
/* /*
...@@ -412,21 +413,6 @@ struct inode { ...@@ -412,21 +413,6 @@ struct inode {
} u; } 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 */ /* will die */
#include <linux/coda_fs_i.h> #include <linux/coda_fs_i.h>
#include <linux/ext3_fs_i.h> #include <linux/ext3_fs_i.h>
......
...@@ -321,6 +321,21 @@ static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si) ...@@ -321,6 +321,21 @@ static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
return container_of((void *)si, struct kiocb, private); 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 /* Used by processes to "lock" a socket state, so that
* interrupts and bottom half handlers won't change it * interrupts and bottom half handlers won't change it
* from under us. It essentially blocks any incoming * from under us. It essentially blocks any incoming
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/net.h>
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
#include <linux/sysctl.h> #include <linux/sysctl.h>
#endif #endif
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/net.h>
#include <net/inetpeer.h> #include <net/inetpeer.h>
/* /*
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <net/sock.h> #include <net/sock.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/net.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/icmp.h> #include <net/icmp.h>
#include <net/udp.h> #include <net/udp.h>
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/net.h>
#include <asm/ioctls.h> #include <asm/ioctls.h>
#include <linux/sunrpc/types.h> #include <linux/sunrpc/types.h>
#include <linux/sunrpc/cache.h> #include <linux/sunrpc/cache.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment