aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/attr.c1
-rw-r--r--fs/autofs/root.c1
-rw-r--r--fs/autofs4/root.c1
-rw-r--r--fs/buffer.c1
-rw-r--r--fs/compat_ioctl.c65
-rw-r--r--fs/dcookies.c1
-rw-r--r--fs/dquot.c1
-rw-r--r--fs/ext2/acl.c1
-rw-r--r--fs/ext2/balloc.c1
-rw-r--r--fs/ext2/ioctl.c1
-rw-r--r--fs/ext2/xattr_trusted.c1
-rw-r--r--fs/ext3/acl.c1
-rw-r--r--fs/ext3/balloc.c1
-rw-r--r--fs/ext3/ioctl.c1
-rw-r--r--fs/ext3/xattr_trusted.c1
-rw-r--r--fs/fat/file.c1
-rw-r--r--fs/fcntl.c1
-rw-r--r--fs/file_table.c1
-rw-r--r--fs/hfsplus/ioctl.c1
-rw-r--r--fs/hugetlbfs/inode.c1
-rw-r--r--fs/ioctl.c1
-rw-r--r--fs/ioprio.c1
-rw-r--r--fs/jffs2/fs.c1
-rw-r--r--fs/jfs/xattr.c1
-rw-r--r--fs/namei.c1
-rw-r--r--fs/namespace.c1
-rw-r--r--fs/ncpfs/ioctl.c1
-rw-r--r--fs/ocfs2/file.c1
-rw-r--r--fs/open.c1
-rw-r--r--fs/proc/base.c1
-rw-r--r--fs/proc/kcore.c1
-rw-r--r--fs/proc/vmcore.c2
-rw-r--r--fs/quota.c1
-rw-r--r--fs/reiserfs/ioctl.c1
-rw-r--r--fs/reiserfs/journal.c5
-rw-r--r--fs/reiserfs/xattr.c1
-rw-r--r--fs/reiserfs/xattr_acl.c1
-rw-r--r--fs/reiserfs/xattr_trusted.c1
-rw-r--r--fs/smbfs/proc.c1
-rw-r--r--fs/sysfs/inode.c1
-rw-r--r--fs/udf/file.c1
-rw-r--r--fs/ufs/balloc.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_cred.h4
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c1
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c3
-rw-r--r--fs/xfs/xfs_acl.c1
-rw-r--r--fs/xfs/xfs_attr.c3
-rw-r--r--fs/xfs/xfs_vnodeops.c3
49 files changed, 124 insertions, 3 deletions
diff --git a/fs/attr.c b/fs/attr.c
index d63e5096f2f2..97de94670878 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -10,6 +10,7 @@
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
13#include <linux/capability.h>
13#include <linux/fsnotify.h> 14#include <linux/fsnotify.h>
14#include <linux/fcntl.h> 15#include <linux/fcntl.h>
15#include <linux/quotaops.h> 16#include <linux/quotaops.h>
diff --git a/fs/autofs/root.c b/fs/autofs/root.c
index 808134a5a2fa..870e2cf33016 100644
--- a/fs/autofs/root.c
+++ b/fs/autofs/root.c
@@ -10,6 +10,7 @@
10 * 10 *
11 * ------------------------------------------------------------------------- */ 11 * ------------------------------------------------------------------------- */
12 12
13#include <linux/capability.h>
13#include <linux/errno.h> 14#include <linux/errno.h>
14#include <linux/stat.h> 15#include <linux/stat.h>
15#include <linux/param.h> 16#include <linux/param.h>
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 14aa70282e8c..e93a7ae467c9 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -12,6 +12,7 @@
12 * 12 *
13 * ------------------------------------------------------------------------- */ 13 * ------------------------------------------------------------------------- */
14 14
15#include <linux/capability.h>
15#include <linux/errno.h> 16#include <linux/errno.h>
16#include <linux/stat.h> 17#include <linux/stat.h>
17#include <linux/param.h> 18#include <linux/param.h>
diff --git a/fs/buffer.c b/fs/buffer.c
index 6466bc8a3dc7..b9bb7ad6897b 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -26,6 +26,7 @@
26#include <linux/percpu.h> 26#include <linux/percpu.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
29#include <linux/capability.h>
29#include <linux/blkdev.h> 30#include <linux/blkdev.h>
30#include <linux/file.h> 31#include <linux/file.h>
31#include <linux/quotaops.h> 32#include <linux/quotaops.h>
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 890bc30fbe20..5dd0207ffd46 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -14,6 +14,7 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/compat.h> 15#include <linux/compat.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/capability.h>
17#include <linux/compiler.h> 18#include <linux/compiler.h>
18#include <linux/sched.h> 19#include <linux/sched.h>
19#include <linux/smp.h> 20#include <linux/smp.h>
@@ -121,6 +122,7 @@
121#include <linux/dvb/dmx.h> 122#include <linux/dvb/dmx.h>
122#include <linux/dvb/frontend.h> 123#include <linux/dvb/frontend.h>
123#include <linux/dvb/video.h> 124#include <linux/dvb/video.h>
125#include <linux/lp.h>
124 126
125/* Aiee. Someone does not find a difference between int and long */ 127/* Aiee. Someone does not find a difference between int and long */
126#define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) 128#define EXT2_IOC32_GETFLAGS _IOR('f', 1, int)
@@ -915,6 +917,40 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
915 return err; 917 return err;
916} 918}
917 919
920struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
921 char req_state;
922 char orphan;
923 char sg_io_owned;
924 char problem;
925 int pack_id;
926 compat_uptr_t usr_ptr;
927 unsigned int duration;
928 int unused;
929};
930
931static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
932{
933 int err, i;
934 sg_req_info_t *r;
935 struct compat_sg_req_info *o = (struct compat_sg_req_info *)arg;
936 r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE);
937 err = sys_ioctl(fd,cmd,(unsigned long)r);
938 if (err < 0)
939 return err;
940 for (i = 0; i < SG_MAX_QUEUE; i++) {
941 void __user *ptr;
942 int d;
943
944 if (copy_in_user(o + i, r + i, offsetof(sg_req_info_t, usr_ptr)) ||
945 get_user(ptr, &r[i].usr_ptr) ||
946 get_user(d, &r[i].duration) ||
947 put_user((u32)(unsigned long)(ptr), &o[i].usr_ptr) ||
948 put_user(d, &o[i].duration))
949 return -EFAULT;
950 }
951 return err;
952}
953
918struct sock_fprog32 { 954struct sock_fprog32 {
919 unsigned short len; 955 unsigned short len;
920 compat_caddr_t filter; 956 compat_caddr_t filter;
@@ -2700,6 +2736,20 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon
2700} 2736}
2701#endif 2737#endif
2702 2738
2739static int
2740lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
2741{
2742 struct compat_timeval *tc = (struct compat_timeval *)arg;
2743 struct timeval *tn = compat_alloc_user_space(sizeof(struct timeval));
2744 struct timeval ts;
2745 if (get_user(ts.tv_sec, &tc->tv_sec) ||
2746 get_user(ts.tv_usec, &tc->tv_usec) ||
2747 put_user(ts.tv_sec, &tn->tv_sec) ||
2748 put_user(ts.tv_usec, &tn->tv_usec))
2749 return -EFAULT;
2750 return sys_ioctl(fd, cmd, (unsigned long)tn);
2751}
2752
2703#define HANDLE_IOCTL(cmd,handler) \ 2753#define HANDLE_IOCTL(cmd,handler) \
2704 { (cmd), (ioctl_trans_handler_t)(handler) }, 2754 { (cmd), (ioctl_trans_handler_t)(handler) },
2705 2755
@@ -2793,6 +2843,7 @@ HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans)
2793HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans) 2843HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans)
2794HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans) 2844HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans)
2795HANDLE_IOCTL(SG_IO,sg_ioctl_trans) 2845HANDLE_IOCTL(SG_IO,sg_ioctl_trans)
2846HANDLE_IOCTL(SG_GET_REQUEST_TABLE, sg_grt_trans)
2796HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans) 2847HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans)
2797HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans) 2848HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans)
2798HANDLE_IOCTL(PPPIOCSPASS32, ppp_sock_fprog_ioctl_trans) 2849HANDLE_IOCTL(PPPIOCSPASS32, ppp_sock_fprog_ioctl_trans)
@@ -2926,6 +2977,20 @@ HANDLE_IOCTL(DMX_GET_EVENT, do_dmx_get_event)
2926HANDLE_IOCTL(VIDEO_GET_EVENT, do_video_get_event) 2977HANDLE_IOCTL(VIDEO_GET_EVENT, do_video_get_event)
2927HANDLE_IOCTL(VIDEO_STILLPICTURE, do_video_stillpicture) 2978HANDLE_IOCTL(VIDEO_STILLPICTURE, do_video_stillpicture)
2928HANDLE_IOCTL(VIDEO_SET_SPU_PALETTE, do_video_set_spu_palette) 2979HANDLE_IOCTL(VIDEO_SET_SPU_PALETTE, do_video_set_spu_palette)
2980
2981/* parport */
2982COMPATIBLE_IOCTL(LPTIME)
2983COMPATIBLE_IOCTL(LPCHAR)
2984COMPATIBLE_IOCTL(LPABORTOPEN)
2985COMPATIBLE_IOCTL(LPCAREFUL)
2986COMPATIBLE_IOCTL(LPWAIT)
2987COMPATIBLE_IOCTL(LPSETIRQ)
2988COMPATIBLE_IOCTL(LPGETSTATUS)
2989COMPATIBLE_IOCTL(LPGETSTATUS)
2990COMPATIBLE_IOCTL(LPRESET)
2991/*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/
2992COMPATIBLE_IOCTL(LPGETFLAGS)
2993HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans)
2929}; 2994};
2930 2995
2931int ioctl_table_size = ARRAY_SIZE(ioctl_start); 2996int ioctl_table_size = ARRAY_SIZE(ioctl_start);
diff --git a/fs/dcookies.c b/fs/dcookies.c
index 02aa0ddc582a..f8274a8f83bd 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -18,6 +18,7 @@
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/list.h> 19#include <linux/list.h>
20#include <linux/mount.h> 20#include <linux/mount.h>
21#include <linux/capability.h>
21#include <linux/dcache.h> 22#include <linux/dcache.h>
22#include <linux/mm.h> 23#include <linux/mm.h>
23#include <linux/errno.h> 24#include <linux/errno.h>
diff --git a/fs/dquot.c b/fs/dquot.c
index cb6d5bfbdfd5..1966c890b48d 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -77,6 +77,7 @@
77#include <linux/kmod.h> 77#include <linux/kmod.h>
78#include <linux/namei.h> 78#include <linux/namei.h>
79#include <linux/buffer_head.h> 79#include <linux/buffer_head.h>
80#include <linux/capability.h>
80#include <linux/quotaops.h> 81#include <linux/quotaops.h>
81 82
82#include <asm/uaccess.h> 83#include <asm/uaccess.h>
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index 239133d01d91..35acc43b897f 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -4,6 +4,7 @@
4 * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de> 4 * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
5 */ 5 */
6 6
7#include <linux/capability.h>
7#include <linux/init.h> 8#include <linux/init.h>
8#include <linux/sched.h> 9#include <linux/sched.h>
9#include <linux/slab.h> 10#include <linux/slab.h>
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index bb6908066494..2c00953d4b0b 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -16,6 +16,7 @@
16#include <linux/quotaops.h> 16#include <linux/quotaops.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/buffer_head.h> 18#include <linux/buffer_head.h>
19#include <linux/capability.h>
19 20
20/* 21/*
21 * balloc.c contains the blocks allocation and deallocation routines 22 * balloc.c contains the blocks allocation and deallocation routines
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c
index 709d8676b962..3ca9afdf713d 100644
--- a/fs/ext2/ioctl.c
+++ b/fs/ext2/ioctl.c
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#include "ext2.h" 10#include "ext2.h"
11#include <linux/capability.h>
11#include <linux/time.h> 12#include <linux/time.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <asm/current.h> 14#include <asm/current.h>
diff --git a/fs/ext2/xattr_trusted.c b/fs/ext2/xattr_trusted.c
index 2c072bfea23b..f28a6a499c96 100644
--- a/fs/ext2/xattr_trusted.c
+++ b/fs/ext2/xattr_trusted.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/string.h> 9#include <linux/string.h>
10#include <linux/capability.h>
10#include <linux/fs.h> 11#include <linux/fs.h>
11#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
12#include <linux/ext2_fs.h> 13#include <linux/ext2_fs.h>
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c
index 9ed132c96034..47a9da2dfb4f 100644
--- a/fs/ext3/acl.c
+++ b/fs/ext3/acl.c
@@ -7,6 +7,7 @@
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <linux/slab.h> 9#include <linux/slab.h>
10#include <linux/capability.h>
10#include <linux/fs.h> 11#include <linux/fs.h>
11#include <linux/ext3_jbd.h> 12#include <linux/ext3_jbd.h>
12#include <linux/ext3_fs.h> 13#include <linux/ext3_fs.h>
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index c6393fb4c35a..6250fcdf14a1 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/config.h> 14#include <linux/config.h>
15#include <linux/time.h> 15#include <linux/time.h>
16#include <linux/capability.h>
16#include <linux/fs.h> 17#include <linux/fs.h>
17#include <linux/jbd.h> 18#include <linux/jbd.h>
18#include <linux/ext3_fs.h> 19#include <linux/ext3_fs.h>
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
index 706d68608381..556cd5510078 100644
--- a/fs/ext3/ioctl.c
+++ b/fs/ext3/ioctl.c
@@ -9,6 +9,7 @@
9 9
10#include <linux/fs.h> 10#include <linux/fs.h>
11#include <linux/jbd.h> 11#include <linux/jbd.h>
12#include <linux/capability.h>
12#include <linux/ext3_fs.h> 13#include <linux/ext3_fs.h>
13#include <linux/ext3_jbd.h> 14#include <linux/ext3_jbd.h>
14#include <linux/time.h> 15#include <linux/time.h>
diff --git a/fs/ext3/xattr_trusted.c b/fs/ext3/xattr_trusted.c
index 7c693c94f14d..86d91f1186dc 100644
--- a/fs/ext3/xattr_trusted.c
+++ b/fs/ext3/xattr_trusted.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/string.h> 9#include <linux/string.h>
10#include <linux/capability.h>
10#include <linux/fs.h> 11#include <linux/fs.h>
11#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
12#include <linux/ext3_jbd.h> 13#include <linux/ext3_jbd.h>
diff --git a/fs/fat/file.c b/fs/fat/file.c
index d30876cf35f5..e99c5a73b39e 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -6,6 +6,7 @@
6 * regular file handling primitives for fat-based filesystems 6 * regular file handling primitives for fat-based filesystems
7 */ 7 */
8 8
9#include <linux/capability.h>
9#include <linux/module.h> 10#include <linux/module.h>
10#include <linux/time.h> 11#include <linux/time.h>
11#include <linux/msdos_fs.h> 12#include <linux/msdos_fs.h>
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 9903bde475f2..d0767fe58362 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -9,6 +9,7 @@
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/fs.h> 10#include <linux/fs.h>
11#include <linux/file.h> 11#include <linux/file.h>
12#include <linux/capability.h>
12#include <linux/dnotify.h> 13#include <linux/dnotify.h>
13#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
14#include <linux/slab.h> 15#include <linux/slab.h>
diff --git a/fs/file_table.c b/fs/file_table.c
index 6142250104a6..768b58167543 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -16,6 +16,7 @@
16#include <linux/eventpoll.h> 16#include <linux/eventpoll.h>
17#include <linux/rcupdate.h> 17#include <linux/rcupdate.h>
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/capability.h>
19#include <linux/cdev.h> 20#include <linux/cdev.h>
20#include <linux/fsnotify.h> 21#include <linux/fsnotify.h>
21 22
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
index e07aa096e07c..13cf848ac833 100644
--- a/fs/hfsplus/ioctl.c
+++ b/fs/hfsplus/ioctl.c
@@ -12,6 +12,7 @@
12 * hfsplus ioctls 12 * hfsplus ioctls
13 */ 13 */
14 14
15#include <linux/capability.h>
15#include <linux/fs.h> 16#include <linux/fs.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/xattr.h> 18#include <linux/xattr.h>
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index ff1b7d108bd0..ab4c3a9d51b8 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -18,6 +18,7 @@
18#include <linux/highmem.h> 18#include <linux/highmem.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/capability.h>
21#include <linux/backing-dev.h> 22#include <linux/backing-dev.h>
22#include <linux/hugetlb.h> 23#include <linux/hugetlb.h>
23#include <linux/pagevec.h> 24#include <linux/pagevec.h>
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 569209181425..f8aeec3ca10c 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -8,6 +8,7 @@
8#include <linux/syscalls.h> 8#include <linux/syscalls.h>
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/smp_lock.h> 10#include <linux/smp_lock.h>
11#include <linux/capability.h>
11#include <linux/file.h> 12#include <linux/file.h>
12#include <linux/fs.h> 13#include <linux/fs.h>
13#include <linux/security.h> 14#include <linux/security.h>
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 4bf1c6365a19..ca77008146c0 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -22,6 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/ioprio.h> 23#include <linux/ioprio.h>
24#include <linux/blkdev.h> 24#include <linux/blkdev.h>
25#include <linux/capability.h>
25#include <linux/syscalls.h> 26#include <linux/syscalls.h>
26 27
27static int set_task_ioprio(struct task_struct *task, int ioprio) 28static int set_task_ioprio(struct task_struct *task, int ioprio)
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index d0fcc5f3497e..09e5d10b8840 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -11,6 +11,7 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/capability.h>
14#include <linux/config.h> 15#include <linux/config.h>
15#include <linux/kernel.h> 16#include <linux/kernel.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index 952da5f917cd..f23048f9471f 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -17,6 +17,7 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/capability.h>
20#include <linux/fs.h> 21#include <linux/fs.h>
21#include <linux/xattr.h> 22#include <linux/xattr.h>
22#include <linux/posix_acl_xattr.h> 23#include <linux/posix_acl_xattr.h>
diff --git a/fs/namei.c b/fs/namei.c
index 0a8f073435af..1e5746eb1380 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -28,6 +28,7 @@
28#include <linux/syscalls.h> 28#include <linux/syscalls.h>
29#include <linux/mount.h> 29#include <linux/mount.h>
30#include <linux/audit.h> 30#include <linux/audit.h>
31#include <linux/capability.h>
31#include <linux/file.h> 32#include <linux/file.h>
32#include <asm/namei.h> 33#include <asm/namei.h>
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
diff --git a/fs/namespace.c b/fs/namespace.c
index 2ca6145f43d6..8bc15b362d23 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/quotaops.h> 17#include <linux/quotaops.h>
18#include <linux/acct.h> 18#include <linux/acct.h>
19#include <linux/capability.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/seq_file.h> 21#include <linux/seq_file.h>
21#include <linux/namespace.h> 22#include <linux/namespace.h>
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index fd3efdca5ae3..d6e0c089e1b1 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -10,6 +10,7 @@
10#include <linux/config.h> 10#include <linux/config.h>
11 11
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <linux/capability.h>
13#include <linux/errno.h> 14#include <linux/errno.h>
14#include <linux/fs.h> 15#include <linux/fs.h>
15#include <linux/ioctl.h> 16#include <linux/ioctl.h>
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index ca5f9f90d794..eaf33caa0a1f 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -23,6 +23,7 @@
23 * Boston, MA 021110-1307, USA. 23 * Boston, MA 021110-1307, USA.
24 */ 24 */
25 25
26#include <linux/capability.h>
26#include <linux/fs.h> 27#include <linux/fs.h>
27#include <linux/types.h> 28#include <linux/types.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/fs/open.c b/fs/open.c
index a3b3a9b5c2ff..8e20c1f32563 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -16,6 +16,7 @@
16#include <linux/tty.h> 16#include <linux/tty.h>
17#include <linux/namei.h> 17#include <linux/namei.h>
18#include <linux/backing-dev.h> 18#include <linux/backing-dev.h>
19#include <linux/capability.h>
19#include <linux/security.h> 20#include <linux/security.h>
20#include <linux/mount.h> 21#include <linux/mount.h>
21#include <linux/vfs.h> 22#include <linux/vfs.h>
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 634355e16986..20feb7568deb 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -55,6 +55,7 @@
55#include <linux/proc_fs.h> 55#include <linux/proc_fs.h>
56#include <linux/stat.h> 56#include <linux/stat.h>
57#include <linux/init.h> 57#include <linux/init.h>
58#include <linux/capability.h>
58#include <linux/file.h> 59#include <linux/file.h>
59#include <linux/string.h> 60#include <linux/string.h>
60#include <linux/seq_file.h> 61#include <linux/seq_file.h>
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 1c7da988fcc3..adc2cd95169a 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -14,6 +14,7 @@
14#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
15#include <linux/user.h> 15#include <linux/user.h>
16#include <linux/a.out.h> 16#include <linux/a.out.h>
17#include <linux/capability.h>
17#include <linux/elf.h> 18#include <linux/elf.h>
18#include <linux/elfcore.h> 19#include <linux/elfcore.h>
19#include <linux/vmalloc.h> 20#include <linux/vmalloc.h>
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 124e35442ac8..4063fb32f78c 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -41,7 +41,7 @@ struct proc_dir_entry *proc_vmcore = NULL;
41 41
42/* Reads a page from the oldmem device from given offset. */ 42/* Reads a page from the oldmem device from given offset. */
43static ssize_t read_from_oldmem(char *buf, size_t count, 43static ssize_t read_from_oldmem(char *buf, size_t count,
44 loff_t *ppos, int userbuf) 44 u64 *ppos, int userbuf)
45{ 45{
46 unsigned long pfn, offset; 46 unsigned long pfn, offset;
47 size_t nr_bytes; 47 size_t nr_bytes;
diff --git a/fs/quota.c b/fs/quota.c
index d14d872646d4..ba9e0bf32f67 100644
--- a/fs/quota.c
+++ b/fs/quota.c
@@ -15,6 +15,7 @@
15#include <linux/security.h> 15#include <linux/security.h>
16#include <linux/syscalls.h> 16#include <linux/syscalls.h>
17#include <linux/buffer_head.h> 17#include <linux/buffer_head.h>
18#include <linux/capability.h>
18#include <linux/quotaops.h> 19#include <linux/quotaops.h>
19 20
20/* Check validity of generic quotactl commands */ 21/* Check validity of generic quotactl commands */
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index ba8bf8df6dc7..745c88100895 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -2,6 +2,7 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/capability.h>
5#include <linux/fs.h> 6#include <linux/fs.h>
6#include <linux/reiserfs_fs.h> 7#include <linux/reiserfs_fs.h>
7#include <linux/time.h> 8#include <linux/time.h>
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 3f17ef844fb6..4491fcf2a0e6 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -3925,10 +3925,13 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
3925 flush = 1; 3925 flush = 1;
3926 } 3926 }
3927#ifdef REISERFS_PREALLOCATE 3927#ifdef REISERFS_PREALLOCATE
3928 /* quota ops might need to nest, setup the journal_info pointer for them */ 3928 /* quota ops might need to nest, setup the journal_info pointer for them
3929 * and raise the refcount so that it is > 0. */
3929 current->journal_info = th; 3930 current->journal_info = th;
3931 th->t_refcount++;
3930 reiserfs_discard_all_prealloc(th); /* it should not involve new blocks into 3932 reiserfs_discard_all_prealloc(th); /* it should not involve new blocks into
3931 * the transaction */ 3933 * the transaction */
3934 th->t_refcount--;
3932 current->journal_info = th->t_handle_save; 3935 current->journal_info = th->t_handle_save;
3933#endif 3936#endif
3934 3937
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 6f99e01f94ab..cc061bfd437b 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -30,6 +30,7 @@
30 */ 30 */
31 31
32#include <linux/reiserfs_fs.h> 32#include <linux/reiserfs_fs.h>
33#include <linux/capability.h>
33#include <linux/dcache.h> 34#include <linux/dcache.h>
34#include <linux/namei.h> 35#include <linux/namei.h>
35#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index 2dc953504cc0..43de3ba83332 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -1,3 +1,4 @@
1#include <linux/capability.h>
1#include <linux/fs.h> 2#include <linux/fs.h>
2#include <linux/posix_acl.h> 3#include <linux/posix_acl.h>
3#include <linux/reiserfs_fs.h> 4#include <linux/reiserfs_fs.h>
diff --git a/fs/reiserfs/xattr_trusted.c b/fs/reiserfs/xattr_trusted.c
index 2501f7e66ab9..024a938ca60f 100644
--- a/fs/reiserfs/xattr_trusted.c
+++ b/fs/reiserfs/xattr_trusted.c
@@ -1,4 +1,5 @@
1#include <linux/reiserfs_fs.h> 1#include <linux/reiserfs_fs.h>
2#include <linux/capability.h>
2#include <linux/errno.h> 3#include <linux/errno.h>
3#include <linux/fs.h> 4#include <linux/fs.h>
4#include <linux/pagemap.h> 5#include <linux/pagemap.h>
diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c
index d6baec0f24ad..b1b878b81730 100644
--- a/fs/smbfs/proc.c
+++ b/fs/smbfs/proc.c
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/capability.h>
11#include <linux/errno.h> 12#include <linux/errno.h>
12#include <linux/slab.h> 13#include <linux/slab.h>
13#include <linux/fs.h> 14#include <linux/fs.h>
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index c3133219941c..689f7bcfaf30 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -11,6 +11,7 @@
11#include <linux/pagemap.h> 11#include <linux/pagemap.h>
12#include <linux/namei.h> 12#include <linux/namei.h>
13#include <linux/backing-dev.h> 13#include <linux/backing-dev.h>
14#include <linux/capability.h>
14#include "sysfs.h" 15#include "sysfs.h"
15 16
16extern struct super_block * sysfs_sb; 17extern struct super_block * sysfs_sb;
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 8a388289040d..a6f2acc1f15c 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -31,6 +31,7 @@
31#include <asm/uaccess.h> 31#include <asm/uaccess.h>
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/string.h> /* memset */ 33#include <linux/string.h> /* memset */
34#include <linux/capability.h>
34#include <linux/errno.h> 35#include <linux/errno.h>
35#include <linux/smp_lock.h> 36#include <linux/smp_lock.h>
36#include <linux/pagemap.h> 37#include <linux/pagemap.h>
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index faf1512173eb..a9f4421ddb6f 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -13,6 +13,7 @@
13#include <linux/string.h> 13#include <linux/string.h>
14#include <linux/quotaops.h> 14#include <linux/quotaops.h>
15#include <linux/buffer_head.h> 15#include <linux/buffer_head.h>
16#include <linux/capability.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/bitops.h> 18#include <linux/bitops.h>
18#include <asm/byteorder.h> 19#include <asm/byteorder.h>
diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h
index 4af491024727..e7f3da61c6c3 100644
--- a/fs/xfs/linux-2.6/xfs_cred.h
+++ b/fs/xfs/linux-2.6/xfs_cred.h
@@ -18,6 +18,8 @@
18#ifndef __XFS_CRED_H__ 18#ifndef __XFS_CRED_H__
19#define __XFS_CRED_H__ 19#define __XFS_CRED_H__
20 20
21#include <linux/capability.h>
22
21/* 23/*
22 * Credentials 24 * Credentials
23 */ 25 */
@@ -27,7 +29,7 @@ typedef struct cred {
27 29
28extern struct cred *sys_cred; 30extern struct cred *sys_cred;
29 31
30/* this is a hack.. (assums sys_cred is the only cred_t in the system) */ 32/* this is a hack.. (assumes sys_cred is the only cred_t in the system) */
31static __inline int capable_cred(cred_t *cr, int cid) 33static __inline int capable_cred(cred_t *cr, int cid)
32{ 34{
33 return (cr == sys_cred) ? 1 : capable(cid); 35 return (cr == sys_cred) ? 1 : capable(cid);
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index b3b2cfda273c..4db47790415c 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -52,6 +52,7 @@
52#include "xfs_dfrag.h" 52#include "xfs_dfrag.h"
53#include "xfs_fsops.h" 53#include "xfs_fsops.h"
54 54
55#include <linux/capability.h>
55#include <linux/dcache.h> 56#include <linux/dcache.h>
56#include <linux/mount.h> 57#include <linux/mount.h>
57#include <linux/namei.h> 58#include <linux/namei.h>
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 129403958044..4bd3d03b23ed 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -51,6 +51,7 @@
51#include "xfs_buf_item.h" 51#include "xfs_buf_item.h"
52#include "xfs_utils.h" 52#include "xfs_utils.h"
53 53
54#include <linux/capability.h>
54#include <linux/xattr.h> 55#include <linux/xattr.h>
55#include <linux/namei.h> 56#include <linux/namei.h>
56#include <linux/security.h> 57#include <linux/security.h>
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 86a1d09f48d5..676884394aae 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -15,6 +15,9 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18
19#include <linux/capability.h>
20
18#include "xfs.h" 21#include "xfs.h"
19#include "xfs_fs.h" 22#include "xfs_fs.h"
20#include "xfs_bit.h" 23#include "xfs_bit.h"
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index cc9c91b9e771..4ff0f4e41c61 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -36,6 +36,7 @@
36#include "xfs_mac.h" 36#include "xfs_mac.h"
37#include "xfs_attr.h" 37#include "xfs_attr.h"
38 38
39#include <linux/capability.h>
39#include <linux/posix_acl_xattr.h> 40#include <linux/posix_acl_xattr.h>
40 41
41STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *); 42STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *);
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 1a11c2b51701..e5e91e9c7e89 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -15,6 +15,9 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18
19#include <linux/capability.h>
20
18#include "xfs.h" 21#include "xfs.h"
19#include "xfs_fs.h" 22#include "xfs_fs.h"
20#include "xfs_types.h" 23#include "xfs_types.h"
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index f8916349a9c6..8076cc981e11 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -15,6 +15,9 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18
19#include <linux/capability.h>
20
18#include "xfs.h" 21#include "xfs.h"
19#include "xfs_fs.h" 22#include "xfs_fs.h"
20#include "xfs_types.h" 23#include "xfs_types.h"