summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/siginfo.h1
-rw-r--r--include/asm-alpha/unistd.h1
-rw-r--r--include/asm-arm/siginfo.h1
-rw-r--r--include/asm-cris/siginfo.h1
-rw-r--r--include/asm-cris/unistd.h1
-rw-r--r--include/asm-i386/siginfo.h1
-rw-r--r--include/asm-i386/unistd.h1
-rw-r--r--include/asm-ia64/siginfo.h1
-rw-r--r--include/asm-ia64/unistd.h1
-rw-r--r--include/asm-m68k/siginfo.h1
-rw-r--r--include/asm-m68k/unistd.h2
-rw-r--r--include/asm-mips/siginfo.h1
-rw-r--r--include/asm-mips/unistd.h2
-rw-r--r--include/asm-mips64/siginfo.h1
-rw-r--r--include/asm-mips64/unistd.h4
-rw-r--r--include/asm-parisc/siginfo.h1
-rw-r--r--include/asm-parisc/unistd.h4
-rw-r--r--include/asm-ppc/siginfo.h1
-rw-r--r--include/asm-ppc/unistd.h1
-rw-r--r--include/asm-s390/siginfo.h1
-rw-r--r--include/asm-s390/unistd.h2
-rw-r--r--include/asm-s390x/siginfo.h1
-rw-r--r--include/asm-s390x/unistd.h2
-rw-r--r--include/asm-sh/siginfo.h1
-rw-r--r--include/asm-sh/unistd.h2
-rw-r--r--include/asm-sparc/siginfo.h1
-rw-r--r--include/asm-sparc/unistd.h1
-rw-r--r--include/asm-sparc64/siginfo.h1
-rw-r--r--include/asm-sparc64/unistd.h1
-rw-r--r--include/linux/fs.h56
-rw-r--r--include/linux/hpfs_fs_sb.h5
-rw-r--r--include/linux/net.h4
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/proc_fs.h24
-rw-r--r--include/linux/proc_fs_i.h9
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/linux/stat.h19
-rw-r--r--include/linux/usb.h4
-rw-r--r--include/linux/zconf.h90
-rw-r--r--include/linux/zutil.h126
-rw-r--r--include/net/sock.h4
41 files changed, 358 insertions, 30 deletions
diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h
index 88470336ef6e..b5a899bd13d8 100644
--- a/include/asm-alpha/siginfo.h
+++ b/include/asm-alpha/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h
index b16c49d2e9d7..b94be13a7254 100644
--- a/include/asm-alpha/unistd.h
+++ b/include/asm-alpha/unistd.h
@@ -318,6 +318,7 @@
#define __NR_gettid 378
#define __NR_readahead 379
#define __NR_security 380 /* syscall for security modules */
+#define __NR_tkill 381
#if defined(__GNUC__)
diff --git a/include/asm-arm/siginfo.h b/include/asm-arm/siginfo.h
index 2591a6fdc963..354b4e23b306 100644
--- a/include/asm-arm/siginfo.h
+++ b/include/asm-arm/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-cris/siginfo.h b/include/asm-cris/siginfo.h
index ce26ee48e94f..d843ace9c962 100644
--- a/include/asm-cris/siginfo.h
+++ b/include/asm-cris/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 9fe719c8089e..80a36c1369ce 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -230,6 +230,7 @@
#define __NR_security 223 /* syscall for security modules */
#define __NR_gettid 224
#define __NR_readahead 225
+#define __NR_tkill 226
/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
#define _syscall0(type,name) \
diff --git a/include/asm-i386/siginfo.h b/include/asm-i386/siginfo.h
index 9abf5427a9dc..d2686eda126d 100644
--- a/include/asm-i386/siginfo.h
+++ b/include/asm-i386/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index d89e8453241b..9be3827028c6 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -242,6 +242,7 @@
#define __NR_removexattr 235
#define __NR_lremovexattr 236
#define __NR_fremovexattr 237
+#define __NR_tkill 238
/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
diff --git a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h
index dc801e5ab8f2..c04493693a80 100644
--- a/include/asm-ia64/siginfo.h
+++ b/include/asm-ia64/siginfo.h
@@ -124,6 +124,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 4ca8ff0fd67c..f594a382db4e 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -206,6 +206,7 @@
#define __NR_getdents64 1214
#define __NR_getunwind 1215
#define __NR_readahead 1216
+#define __NR_tkill 1217
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
diff --git a/include/asm-m68k/siginfo.h b/include/asm-m68k/siginfo.h
index 6b48063af642..d84552d56802 100644
--- a/include/asm-m68k/siginfo.h
+++ b/include/asm-m68k/siginfo.h
@@ -117,6 +117,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index e8bdf18a190e..c3cf1133d832 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -222,6 +222,8 @@
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_getdents64 220
+#define __NR_gettid 221
+#define __NR_tkill 222
/* user-visible error numbers are in the range -1 - -122: see
<asm-m68k/errno.h> */
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h
index aecf13381414..aeb6f5e40122 100644
--- a/include/asm-mips/siginfo.h
+++ b/include/asm-mips/siginfo.h
@@ -127,6 +127,7 @@ typedef struct siginfo {
#define SI_TIMER __SI_CODE(__SI_TIMER,-3) /* sent by timer expiration */
#define SI_MESGQ -4 /* sent by real time mesq state change */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 97d031618666..283831f78768 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -233,6 +233,8 @@
#define __NR_madvise (__NR_Linux + 218)
#define __NR_getdents64 (__NR_Linux + 219)
#define __NR_fcntl64 (__NR_Linux + 220)
+#define __NR_gettid (__NR_Linux + 221)
+#define __NR_tkill (__NR_Linux + 222)
/*
* Offset of the last Linux flavoured syscall
diff --git a/include/asm-mips64/siginfo.h b/include/asm-mips64/siginfo.h
index 7ceb380906f9..0a10716d6ab9 100644
--- a/include/asm-mips64/siginfo.h
+++ b/include/asm-mips64/siginfo.h
@@ -127,6 +127,7 @@ typedef struct siginfo {
#define SI_TIMER __SI_CODE(__SI_TIMER,-3) /* sent by timer expiration */
#define SI_MESGQ -4 /* sent by real time mesq state change */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h
index 2c9fef61786e..5d56eadb3450 100644
--- a/include/asm-mips64/unistd.h
+++ b/include/asm-mips64/unistd.h
@@ -461,11 +461,13 @@
#define __NR_mincore (__NR_Linux + 211)
#define __NR_madvise (__NR_Linux + 212)
#define __NR_getdents64 (__NR_Linux + 213)
+#define __NR_gettid (__NR_Linux + 214)
+#define __NR_tkill (__NR_Linux + 215)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 213
+#define __NR_Linux_syscalls 215
#ifndef _LANGUAGE_ASSEMBLY
diff --git a/include/asm-parisc/siginfo.h b/include/asm-parisc/siginfo.h
index 143fe7eef2ba..349b614eca38 100644
--- a/include/asm-parisc/siginfo.h
+++ b/include/asm-parisc/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
index ea0542a35fb4..f84502172fa7 100644
--- a/include/asm-parisc/unistd.h
+++ b/include/asm-parisc/unistd.h
@@ -689,8 +689,10 @@
#define __NR_getpmsg (__NR_Linux + 196) /* some people actually want streams */
#define __NR_putpmsg (__NR_Linux + 197) /* some people actually want streams */
+#define __NR_gettid (__NR_Linux + 198)
+#define __NR_tkill (__NR_Linux + 199)
-#define __NR_Linux_syscalls 197
+#define __NR_Linux_syscalls 199
#define HPUX_GATEWAY_ADDR 0xC0000004
#define LINUX_GATEWAY_ADDR 0x100
diff --git a/include/asm-ppc/siginfo.h b/include/asm-ppc/siginfo.h
index 6699c3accac1..684ad91eb8d7 100644
--- a/include/asm-ppc/siginfo.h
+++ b/include/asm-ppc/siginfo.h
@@ -108,6 +108,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
index e707c1a5589a..c2d1e8edd5d8 100644
--- a/include/asm-ppc/unistd.h
+++ b/include/asm-ppc/unistd.h
@@ -215,6 +215,7 @@
#define __NR_madvise 205
#define __NR_mincore 206
#define __NR_gettid 207
+#define __NR_tkill 208
#define __NR(n) #n
diff --git a/include/asm-s390/siginfo.h b/include/asm-s390/siginfo.h
index 876e8baaec0a..1a6401075e81 100644
--- a/include/asm-s390/siginfo.h
+++ b/include/asm-s390/siginfo.h
@@ -115,6 +115,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 2c5a01426b1f..77ff9ccfb2fd 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -211,6 +211,8 @@
#define __NR_mincore 218
#define __NR_madvise 219
#define __NR_getdents64 220
+#define __NR_gettid 226
+#define __NR_tkill 227
/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
diff --git a/include/asm-s390x/siginfo.h b/include/asm-s390x/siginfo.h
index 876e8baaec0a..1a6401075e81 100644
--- a/include/asm-s390x/siginfo.h
+++ b/include/asm-s390x/siginfo.h
@@ -115,6 +115,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-s390x/unistd.h b/include/asm-s390x/unistd.h
index eeec47819b0b..603864584386 100644
--- a/include/asm-s390x/unistd.h
+++ b/include/asm-s390x/unistd.h
@@ -181,6 +181,8 @@
#define __NR_mincore 218
#define __NR_madvise 219
#define __NR_getdents64 220
+#define __NR_gettid 226
+#define __NR_tkill 227
/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
diff --git a/include/asm-sh/siginfo.h b/include/asm-sh/siginfo.h
index aa6a1c46f307..e93ed1a89a4a 100644
--- a/include/asm-sh/siginfo.h
+++ b/include/asm-sh/siginfo.h
@@ -107,6 +107,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index e5896abec545..a22a81fb3e3c 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -231,6 +231,8 @@
#define __NR_madvise 219
#define __NR_getdents64 220
#define __NR_fcntl64 221
+#define __NR_gettid 222
+#define __NR_tkill 223
/* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */
diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h
index 61e4ef22fc94..816a08a67275 100644
--- a/include/asm-sparc/siginfo.h
+++ b/include/asm-sparc/siginfo.h
@@ -112,6 +112,7 @@ typedef struct siginfo {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 040ca14cb15e..cbed9be281d4 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -271,6 +271,7 @@
#define __NR_fdatasync 253
#define __NR_nfsservctl 254
#define __NR_aplib 255
+#define __NR_tkill 257
#define _syscall0(type,name) \
type name(void) \
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 93f849e8a336..b90c84dc86d3 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -172,6 +172,7 @@ typedef struct siginfo32 {
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
+#define SI_TKILL -6 /* sent by tkill system call */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 135eb2936520..1b325812c8c7 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -273,6 +273,7 @@
#define __NR_fdatasync 253
#define __NR_nfsservctl 254
#define __NR_aplib 255
+#define __NR_tkill 256
#define _syscall0(type,name) \
type name(void) \
diff --git a/include/linux/fs.h b/include/linux/fs.h
index cdfaac0cdc0e..8e3ce34f39da 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -91,7 +91,6 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
#define FS_NO_PRELIM 4 /* prevent preloading of dentries, even if
* FS_NO_DCACHE is not set.
*/
-#define FS_SINGLE 8 /* Filesystem that can have only one superblock */
#define FS_NOMOUNT 16 /* Never mount from userland */
#define FS_LITTER 32 /* Keeps the tree in dcache */
#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
@@ -208,6 +207,7 @@ extern void update_atime (struct inode *);
extern void buffer_init(unsigned long);
extern void inode_init(unsigned long);
extern void mnt_init(unsigned long);
+extern void files_init(unsigned long);
/* bh state bits */
enum bh_state_bits {
@@ -289,7 +289,6 @@ extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long
#include <linux/pipe_fs_i.h>
/* #include <linux/umsdos_fs_i.h> */
#include <linux/romfs_fs_i.h>
-#include <linux/proc_fs_i.h>
#include <linux/cramfs_fs_sb.h>
/*
@@ -455,12 +454,25 @@ struct inode {
union {
/* struct umsdos_inode_info umsdos_i; */
struct romfs_inode_info romfs_i;
- struct proc_inode_info proc_i;
- struct socket socket_i;
void *generic_ip;
} u;
};
+struct socket_alloc {
+ struct socket socket;
+ struct inode vfs_inode;
+};
+
+static inline struct socket *SOCKET_I(struct inode *inode)
+{
+ return &list_entry(inode, struct socket_alloc, vfs_inode)->socket;
+}
+
+static inline struct inode *SOCK_INODE(struct socket *socket)
+{
+ return &list_entry(socket, struct socket_alloc, socket)->vfs_inode;
+}
+
#include <linux/shmem_fs.h>
/* will die */
#include <linux/coda_fs_i.h>
@@ -507,6 +519,14 @@ extern int init_private_file(struct file *, struct dentry *, int);
#define MAX_NON_LFS ((1UL<<31) - 1)
+/* Page cache limit. The filesystems should put that into their s_maxbytes
+ limits, otherwise bad things can happen in VM. */
+#if BITS_PER_LONG==32
+#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
+#elif BITS_PER_LONG==64
+#define MAX_LFS_FILESIZE 0x7fffffffffffffff
+#endif
+
#define FL_POSIX 1
#define FL_FLOCK 2
#define FL_BROKEN 4 /* broken flock() emulation */
@@ -914,15 +934,36 @@ struct dquot_operations {
int (*transfer) (struct inode *, struct iattr *);
};
+/*
+ * NOTE NOTE NOTE
+ *
+ * ->read_super() is going to die. New method (->get_sb) should replace
+ * it. The only reason why ->read_super() is left for _SHORT_ transition
+ * period is to avoid a single patch touching every fs. They will be
+ * converted one-by-one and ONCE THAT IS DONE OR TWO WEEKS HAD PASSED
+ * (whatever sooner) ->read_super() WILL DISAPPEAR.
+ */
+
struct file_system_type {
const char *name;
int fs_flags;
+ struct super_block *(*get_sb) (struct file_system_type *, int, char *, void *);
struct super_block *(*read_super) (struct super_block *, void *, int);
struct module *owner;
struct file_system_type * next;
struct list_head fs_supers;
};
+struct super_block *get_sb_bdev(struct file_system_type *fs_type,
+ int flags, char *dev_name, void * data,
+ int (*fill_super)(struct super_block *, void *, int));
+struct super_block *get_sb_single(struct file_system_type *fs_type,
+ int flags, void *data,
+ int (*fill_super)(struct super_block *, void *, int));
+struct super_block *get_sb_nodev(struct file_system_type *fs_type,
+ int flags, void *data,
+ int (*fill_super)(struct super_block *, void *, int));
+
#define DECLARE_FSTYPE(var,type,read,flags) \
struct file_system_type var = { \
name: type, \
@@ -1449,6 +1490,7 @@ extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *)
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
+extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
extern int generic_file_open(struct inode * inode, struct file * filp);
@@ -1463,6 +1505,10 @@ extern struct inode_operations page_symlink_inode_operations;
extern int vfs_readdir(struct file *, filldir_t, void *);
extern int dcache_readdir(struct file *, void *, filldir_t);
+extern int vfs_stat(char *, struct kstat *);
+extern int vfs_lstat(char *, struct kstat *);
+extern int vfs_fstat(unsigned int, struct kstat *);
+
extern struct file_system_type *get_fs_type(const char *name);
extern struct super_block *get_super(kdev_t);
extern void drop_super(struct super_block *sb);
@@ -1475,8 +1521,6 @@ static inline int is_mounted(kdev_t dev)
}
return 0;
}
-unsigned long generate_cluster(kdev_t, int b[], int);
-unsigned long generate_cluster_swab32(kdev_t, int b[], int);
extern kdev_t ROOT_DEV;
extern char root_device_name[];
diff --git a/include/linux/hpfs_fs_sb.h b/include/linux/hpfs_fs_sb.h
index 9059054cf82d..068035e9a4bd 100644
--- a/include/linux/hpfs_fs_sb.h
+++ b/include/linux/hpfs_fs_sb.h
@@ -30,9 +30,8 @@ struct hpfs_sb_info {
/* 128 bytes lowercasing table */
unsigned *sb_bmp_dir; /* main bitmap directory */
unsigned sb_c_bitmap; /* current bitmap */
- wait_queue_head_t sb_creation_de;/* when creating dirents, nobody else
+ struct semaphore hpfs_creation_de; /* when creating dirents, nobody else
can alloc blocks */
- unsigned sb_creation_de_lock : 1;
/*unsigned sb_mounting : 1;*/
int sb_timeshift;
};
@@ -60,8 +59,6 @@ struct hpfs_sb_info {
#define s_hpfs_cp_table u.hpfs_sb.sb_cp_table
#define s_hpfs_bmp_dir u.hpfs_sb.sb_bmp_dir
#define s_hpfs_c_bitmap u.hpfs_sb.sb_c_bitmap
-#define s_hpfs_creation_de u.hpfs_sb.sb_creation_de
-#define s_hpfs_creation_de_lock u.hpfs_sb.sb_creation_de_lock
#define s_hpfs_iget_q u.hpfs_sb.sb_iget_q
/*#define s_hpfs_mounting u.hpfs_sb.sb_mounting*/
#define s_hpfs_timeshift u.hpfs_sb.sb_timeshift
diff --git a/include/linux/net.h b/include/linux/net.h
index 39493fc2e265..8cd440ce36d6 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -23,6 +23,7 @@
#include <linux/wait.h>
struct poll_table_struct;
+struct inode;
#define NPROTO 32 /* should be enough for now.. */
@@ -68,7 +69,6 @@ struct socket
unsigned long flags;
struct proto_ops *ops;
- struct inode *inode;
struct fasync_struct *fasync_list; /* Asynchronous wake up list */
struct file *file; /* File back pointer for gc */
struct sock *sk;
@@ -78,8 +78,6 @@ struct socket
unsigned char passcred;
};
-#define SOCK_INODE(S) ((S)->inode)
-
struct scm_cookie;
struct vm_area_struct;
struct page;
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index eda80eca898e..e95a085a2fdd 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -226,7 +226,6 @@ unsigned long page_index(struct page *page)
/*
* linux/fs/nfs/inode.c
*/
-extern struct super_block *nfs_read_super(struct super_block *, void *, int);
extern void nfs_zap_caches(struct inode *);
extern int nfs_inode_is_stale(struct inode *, struct nfs_fh *,
struct nfs_fattr *);
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 4688c8c90ede..5c0a4642fd69 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -97,7 +97,7 @@ extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
extern struct vfsmount *proc_mnt;
-extern struct super_block *proc_read_super(struct super_block *,void *,int);
+extern int proc_fill_super(struct super_block *,void *,int);
extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *);
extern int proc_match(int, const char *,struct proc_dir_entry *);
@@ -205,4 +205,26 @@ extern struct proc_dir_entry proc_root;
#endif /* CONFIG_PROC_FS */
+struct proc_inode {
+ struct task_struct *task;
+ int type;
+ union {
+ int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
+ int (*proc_read)(struct task_struct *task, char *page);
+ } op;
+ struct file *file;
+ struct proc_dir_entry *pde;
+ struct inode vfs_inode;
+};
+
+static inline struct proc_inode *PROC_I(struct inode *inode)
+{
+ return list_entry(inode, struct proc_inode, vfs_inode);
+}
+
+static inline struct proc_dir_entry *PDE(struct inode *inode)
+{
+ return PROC_I(inode)->pde;
+}
+
#endif /* _LINUX_PROC_FS_H */
diff --git a/include/linux/proc_fs_i.h b/include/linux/proc_fs_i.h
deleted file mode 100644
index d4bde0989084..000000000000
--- a/include/linux/proc_fs_i.h
+++ /dev/null
@@ -1,9 +0,0 @@
-struct proc_inode_info {
- struct task_struct *task;
- int type;
- union {
- int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
- int (*proc_read)(struct task_struct *task, char *page);
- } op;
- struct file *file;
-};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6805d6ae39df..5d3f7b02ce08 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -564,6 +564,7 @@ extern int in_egroup_p(gid_t);
extern void proc_caches_init(void);
extern void flush_signals(struct task_struct *);
extern void flush_signal_handlers(struct task_struct *);
+extern void sig_exit(int, int, struct siginfo *);
extern int dequeue_signal(sigset_t *, siginfo_t *);
extern void block_all_signals(int (*notifier)(void *priv), void *priv,
sigset_t *mask);
@@ -839,9 +840,14 @@ do { \
#define for_each_task(p) \
for (p = &init_task ; (p = p->next_task) != &init_task ; )
+#define for_each_thread(task) \
+ for (task = next_thread(current) ; task != current ; task = next_thread(task))
+
#define next_thread(p) \
list_entry((p)->thread_group.next, struct task_struct, thread_group)
+#define thread_group_leader(p) (p->pid == p->tgid)
+
static inline void unhash_process(struct task_struct *p)
{
write_lock_irq(&tasklist_lock);
diff --git a/include/linux/stat.h b/include/linux/stat.h
index e43e241f31cb..d78a416a3a39 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -52,6 +52,25 @@
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
+
+#include <linux/types.h>
+
+struct kstat {
+ unsigned long ino;
+ dev_t dev;
+ umode_t mode;
+ nlink_t nlink;
+ uid_t uid;
+ gid_t gid;
+ dev_t rdev;
+ loff_t size;
+ time_t atime;
+ time_t mtime;
+ time_t ctime;
+ unsigned long blksize;
+ unsigned long blocks;
+};
+
#endif
#endif
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 4c5837e684cd..d598c720ad2d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -857,7 +857,7 @@ extern struct urb *usb_alloc_urb(int iso_packets);
extern void usb_free_urb(struct urb *urb);
#define usb_put_urb usb_free_urb
extern struct urb *usb_get_urb(struct urb *urb);
-extern int usb_submit_urb(struct urb *urb);
+extern int usb_submit_urb(struct urb *urb, int mem_flags);
extern int usb_unlink_urb(struct urb *urb);
/*-------------------------------------------------------------------*
@@ -906,7 +906,7 @@ struct usb_operations {
int (*allocate)(struct usb_device *);
int (*deallocate)(struct usb_device *);
int (*get_frame_number) (struct usb_device *usb_dev);
- int (*submit_urb) (struct urb *urb);
+ int (*submit_urb) (struct urb *urb, int mem_flags);
int (*unlink_urb) (struct urb *urb);
};
diff --git a/include/linux/zconf.h b/include/linux/zconf.h
new file mode 100644
index 000000000000..0b5ec883812b
--- /dev/null
+++ b/include/linux/zconf.h
@@ -0,0 +1,90 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef _ZCONF_H
+#define _ZCONF_H
+
+#if defined(__GNUC__) || defined(__386__) || defined(i386)
+# ifndef __32BIT__
+# define __32BIT__
+# endif
+#endif
+
+#if defined(__STDC__) || defined(__cplusplus)
+# ifndef STDC
+# define STDC
+# endif
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# define MAX_MEM_LEVEL 9
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef FAR
+# define FAR
+#endif
+
+typedef unsigned char Byte; /* 8 bits */
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+typedef Byte FAR Bytef;
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+typedef void FAR *voidpf;
+typedef void *voidp;
+
+#include <linux/types.h> /* for off_t */
+#include <linux/unistd.h> /* for SEEK_* and off_t */
+#define z_off_t off_t
+
+#endif /* _ZCONF_H */
diff --git a/include/linux/zutil.h b/include/linux/zutil.h
new file mode 100644
index 000000000000..a4a4d8d75f1e
--- /dev/null
+++ b/include/linux/zutil.h
@@ -0,0 +1,126 @@
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id: zutil.h,v 1.1 2000/01/01 03:32:23 davem Exp $ */
+
+#ifndef _Z_UTIL_H
+#define _Z_UTIL_H
+
+#include <linux/zlib.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+ /* common constants */
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+ /* target dependencies */
+
+ /* Common defaults */
+
+#ifndef OS_CODE
+# define OS_CODE 0x03 /* assume Unix */
+#endif
+
+ /* functions */
+
+typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
+ uInt len));
+
+
+ /* checksum functions */
+
+#define BASE 65521L /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+/* ========================================================================= */
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+static inline uLong zlib_adler32(uLong adler,
+ const Bytef *buf,
+ uInt len)
+{
+ unsigned long s1 = adler & 0xffff;
+ unsigned long s2 = (adler >> 16) & 0xffff;
+ int k;
+
+ if (buf == Z_NULL) return 1L;
+
+ while (len > 0) {
+ k = len < NMAX ? len : NMAX;
+ len -= k;
+ while (k >= 16) {
+ DO16(buf);
+ buf += 16;
+ k -= 16;
+ }
+ if (k != 0) do {
+ s1 += *buf++;
+ s2 += s1;
+ } while (--k);
+ s1 %= BASE;
+ s2 %= BASE;
+ }
+ return (s2 << 16) | s1;
+}
+
+#endif /* _Z_UTIL_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index e4b723ca4545..c5e1646d8f75 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1022,7 +1022,7 @@ static inline int sock_i_uid(struct sock *sk)
int uid;
read_lock(&sk->callback_lock);
- uid = sk->socket ? sk->socket->inode->i_uid : 0;
+ uid = sk->socket ? SOCK_INODE(sk->socket)->i_uid : 0;
read_unlock(&sk->callback_lock);
return uid;
}
@@ -1032,7 +1032,7 @@ static inline unsigned long sock_i_ino(struct sock *sk)
unsigned long ino;
read_lock(&sk->callback_lock);
- ino = sk->socket ? sk->socket->inode->i_ino : 0;
+ ino = sk->socket ? SOCK_INODE(sk->socket)->i_ino : 0;
read_unlock(&sk->callback_lock);
return ino;
}