diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
commit | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch) | |
tree | b25a250ec5bec4b7b6355d214642d8b57c5cab32 /arch | |
parent | 02550d61f49266930e674286379d3601006b2893 (diff) | |
parent | c3aa077648e147783a7a53b409578234647db853 (diff) |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
Diffstat (limited to 'arch')
45 files changed, 46 insertions, 457 deletions
diff --git a/arch/alpha/include/asm/ipcbuf.h b/arch/alpha/include/asm/ipcbuf.h index d9c0e1a50702..84c7e51cb6d0 100644 --- a/arch/alpha/include/asm/ipcbuf.h +++ b/arch/alpha/include/asm/ipcbuf.h | |||
@@ -1,28 +1 @@ | |||
1 | #ifndef _ALPHA_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ALPHA_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for alpha architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit seq | ||
11 | * - 2 miscellaneous 64-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid_t uid; | ||
18 | __kernel_gid_t gid; | ||
19 | __kernel_uid_t cuid; | ||
20 | __kernel_gid_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short seq; | ||
23 | unsigned short __pad1; | ||
24 | unsigned long __unused1; | ||
25 | unsigned long __unused2; | ||
26 | }; | ||
27 | |||
28 | #endif /* _ALPHA_IPCBUF_H */ | ||
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h index 881544339c21..0a0579076f4a 100644 --- a/arch/alpha/include/asm/types.h +++ b/arch/alpha/include/asm/types.h | |||
@@ -15,9 +15,4 @@ | |||
15 | #include <asm-generic/int-l64.h> | 15 | #include <asm-generic/int-l64.h> |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | typedef unsigned int umode_t; | ||
21 | |||
22 | #endif /* __ASSEMBLY__ */ | ||
23 | #endif /* _ALPHA_TYPES_H */ | 18 | #endif /* _ALPHA_TYPES_H */ |
diff --git a/arch/arm/include/asm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h index 97683975f7df..84c7e51cb6d0 100644 --- a/arch/arm/include/asm/ipcbuf.h +++ b/arch/arm/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef __ASMARM_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define __ASMARM_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __ASMARM_IPCBUF_H */ | ||
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h index 48192ac3a23a..28beab917ffc 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/asm/types.h | |||
@@ -3,12 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | typedef unsigned short umode_t; | ||
9 | |||
10 | #endif /* __ASSEMBLY__ */ | ||
11 | |||
12 | /* | 6 | /* |
13 | * These aren't exported outside the kernel to avoid name space clashes | 7 | * These aren't exported outside the kernel to avoid name space clashes |
14 | */ | 8 | */ |
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c index 8736afff82f3..0c56a5aaf588 100644 --- a/arch/arm/mach-msm/smd_debug.c +++ b/arch/arm/mach-msm/smd_debug.c | |||
@@ -215,7 +215,7 @@ static const struct file_operations debug_ops = { | |||
215 | .llseek = default_llseek, | 215 | .llseek = default_llseek, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | static void debug_create(const char *name, mode_t mode, | 218 | static void debug_create(const char *name, umode_t mode, |
219 | struct dentry *dent, | 219 | struct dentry *dent, |
220 | int (*fill)(char *buf, int max)) | 220 | int (*fill)(char *buf, int max)) |
221 | { | 221 | { |
diff --git a/arch/avr32/include/asm/ipcbuf.h b/arch/avr32/include/asm/ipcbuf.h index 1552c9698f5e..84c7e51cb6d0 100644 --- a/arch/avr32/include/asm/ipcbuf.h +++ b/arch/avr32/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef __ASM_AVR32_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define __ASM_AVR32_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for AVR32 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __ASM_AVR32_IPCBUF_H */ | ||
diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h index 72667a3b1af7..9bb2d8b2e6ca 100644 --- a/arch/avr32/include/asm/types.h +++ b/arch/avr32/include/asm/types.h | |||
@@ -10,12 +10,6 @@ | |||
10 | 10 | ||
11 | #include <asm-generic/int-ll64.h> | 11 | #include <asm-generic/int-ll64.h> |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | ||
14 | |||
15 | typedef unsigned short umode_t; | ||
16 | |||
17 | #endif /* __ASSEMBLY__ */ | ||
18 | |||
19 | /* | 13 | /* |
20 | * These aren't exported outside the kernel to avoid name space clashes | 14 | * These aren't exported outside the kernel to avoid name space clashes |
21 | */ | 15 | */ |
diff --git a/arch/cris/include/asm/ipcbuf.h b/arch/cris/include/asm/ipcbuf.h index 8b0c18b02844..84c7e51cb6d0 100644 --- a/arch/cris/include/asm/ipcbuf.h +++ b/arch/cris/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef __CRIS_IPCBUF_H__ | #include <asm-generic/ipcbuf.h> | |
2 | #define __CRIS_IPCBUF_H__ | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for CRIS architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __CRIS_IPCBUF_H__ */ | ||
diff --git a/arch/cris/include/asm/types.h b/arch/cris/include/asm/types.h index 551a12c0aa01..adaf82780bb4 100644 --- a/arch/cris/include/asm/types.h +++ b/arch/cris/include/asm/types.h | |||
@@ -3,12 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | typedef unsigned short umode_t; | ||
9 | |||
10 | #endif /* __ASSEMBLY__ */ | ||
11 | |||
12 | /* | 6 | /* |
13 | * These aren't exported outside the kernel to avoid name space clashes | 7 | * These aren't exported outside the kernel to avoid name space clashes |
14 | */ | 8 | */ |
diff --git a/arch/frv/include/asm/ipcbuf.h b/arch/frv/include/asm/ipcbuf.h index b546f67e455f..84c7e51cb6d0 100644 --- a/arch/frv/include/asm/ipcbuf.h +++ b/arch/frv/include/asm/ipcbuf.h | |||
@@ -1,30 +1 @@ | |||
1 | #ifndef __ASM_IPCBUF_H__ | #include <asm-generic/ipcbuf.h> | |
2 | #define __ASM_IPCBUF_H__ | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for FR-V architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __ASM_IPCBUF_H__ */ | ||
30 | |||
diff --git a/arch/frv/include/asm/types.h b/arch/frv/include/asm/types.h index aa3e7fdc7f29..390a612f3a58 100644 --- a/arch/frv/include/asm/types.h +++ b/arch/frv/include/asm/types.h | |||
@@ -14,12 +14,6 @@ | |||
14 | 14 | ||
15 | #include <asm-generic/int-ll64.h> | 15 | #include <asm-generic/int-ll64.h> |
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | typedef unsigned short umode_t; | ||
20 | |||
21 | #endif /* __ASSEMBLY__ */ | ||
22 | |||
23 | /* | 17 | /* |
24 | * These aren't exported outside the kernel to avoid name space clashes | 18 | * These aren't exported outside the kernel to avoid name space clashes |
25 | */ | 19 | */ |
diff --git a/arch/h8300/include/asm/ipcbuf.h b/arch/h8300/include/asm/ipcbuf.h index 2cd1ebcc109d..84c7e51cb6d0 100644 --- a/arch/h8300/include/asm/ipcbuf.h +++ b/arch/h8300/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef __H8300_IPCBUF_H__ | #include <asm-generic/ipcbuf.h> | |
2 | #define __H8300_IPCBUF_H__ | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for H8/300 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __H8300_IPCBUF_H__ */ | ||
diff --git a/arch/h8300/include/asm/types.h b/arch/h8300/include/asm/types.h index bb2c91a3522e..07257d9487d8 100644 --- a/arch/h8300/include/asm/types.h +++ b/arch/h8300/include/asm/types.h | |||
@@ -3,27 +3,10 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
6 | #if !defined(__ASSEMBLY__) | ||
7 | |||
8 | /* | ||
9 | * This file is never included by application software unless | ||
10 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
11 | * application is Linux specific so (user-) name space pollution is | ||
12 | * not a major issue. However, for interoperability, libraries still | ||
13 | * need to be careful to avoid a name clashes. | ||
14 | */ | ||
15 | |||
16 | typedef unsigned short umode_t; | ||
17 | |||
18 | /* | ||
19 | * These aren't exported outside the kernel to avoid name space clashes | ||
20 | */ | ||
21 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
22 | 7 | ||
23 | #define BITS_PER_LONG 32 | 8 | #define BITS_PER_LONG 32 |
24 | 9 | ||
25 | #endif /* __KERNEL__ */ | 10 | #endif /* __KERNEL__ */ |
26 | 11 | ||
27 | #endif /* __ASSEMBLY__ */ | ||
28 | |||
29 | #endif /* _H8300_TYPES_H */ | 12 | #endif /* _H8300_TYPES_H */ |
diff --git a/arch/ia64/include/asm/ipcbuf.h b/arch/ia64/include/asm/ipcbuf.h index 079899ae7d32..84c7e51cb6d0 100644 --- a/arch/ia64/include/asm/ipcbuf.h +++ b/arch/ia64/include/asm/ipcbuf.h | |||
@@ -1,28 +1 @@ | |||
1 | #ifndef _ASM_IA64_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ASM_IA64_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for IA-64 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit seq | ||
11 | * - 2 miscellaneous 64-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid_t uid; | ||
18 | __kernel_gid_t gid; | ||
19 | __kernel_uid_t cuid; | ||
20 | __kernel_gid_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short seq; | ||
23 | unsigned short __pad1; | ||
24 | unsigned long __unused1; | ||
25 | unsigned long __unused2; | ||
26 | }; | ||
27 | |||
28 | #endif /* _ASM_IA64_IPCBUF_H */ | ||
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 82b3939d2718..3f5b122d9975 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -28,8 +28,6 @@ | |||
28 | # define __IA64_UL(x) ((unsigned long)(x)) | 28 | # define __IA64_UL(x) ((unsigned long)(x)) |
29 | # define __IA64_UL_CONST(x) x##UL | 29 | # define __IA64_UL_CONST(x) x##UL |
30 | 30 | ||
31 | typedef unsigned int umode_t; | ||
32 | |||
33 | /* | 31 | /* |
34 | * These aren't exported outside the kernel to avoid name space clashes | 32 | * These aren't exported outside the kernel to avoid name space clashes |
35 | */ | 33 | */ |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 89accc626b86..b2c65e034f5d 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2228,7 +2228,7 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2228 | /* | 2228 | /* |
2229 | * allocate a new dcache entry | 2229 | * allocate a new dcache entry |
2230 | */ | 2230 | */ |
2231 | path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2231 | path.dentry = d_alloc(pfmfs_mnt->mnt_root, &this); |
2232 | if (!path.dentry) { | 2232 | if (!path.dentry) { |
2233 | iput(inode); | 2233 | iput(inode); |
2234 | return ERR_PTR(-ENOMEM); | 2234 | return ERR_PTR(-ENOMEM); |
diff --git a/arch/m32r/include/asm/ipcbuf.h b/arch/m32r/include/asm/ipcbuf.h index 8d2d7c8ffdb0..84c7e51cb6d0 100644 --- a/arch/m32r/include/asm/ipcbuf.h +++ b/arch/m32r/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef _ASM_M32R_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ASM_M32R_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for m32r architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* _ASM_M32R_IPCBUF_H */ | ||
diff --git a/arch/m32r/include/asm/types.h b/arch/m32r/include/asm/types.h index bd0035597b3b..bb2eeadecf99 100644 --- a/arch/m32r/include/asm/types.h +++ b/arch/m32r/include/asm/types.h | |||
@@ -3,12 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | typedef unsigned short umode_t; | ||
9 | |||
10 | #endif /* __ASSEMBLY__ */ | ||
11 | |||
12 | /* | 6 | /* |
13 | * These aren't exported outside the kernel to avoid name space clashes | 7 | * These aren't exported outside the kernel to avoid name space clashes |
14 | */ | 8 | */ |
diff --git a/arch/m68k/include/asm/ipcbuf.h b/arch/m68k/include/asm/ipcbuf.h index a623ea3f0955..84c7e51cb6d0 100644 --- a/arch/m68k/include/asm/ipcbuf.h +++ b/arch/m68k/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef __m68k_IPCBUF_H__ | #include <asm-generic/ipcbuf.h> | |
2 | #define __m68k_IPCBUF_H__ | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for m68k architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __m68k_IPCBUF_H__ */ | ||
diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h index b17fd115a4e7..89705adcbd52 100644 --- a/arch/m68k/include/asm/types.h +++ b/arch/m68k/include/asm/types.h | |||
@@ -10,12 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | #include <asm-generic/int-ll64.h> | 11 | #include <asm-generic/int-ll64.h> |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | ||
14 | |||
15 | typedef unsigned short umode_t; | ||
16 | |||
17 | #endif /* __ASSEMBLY__ */ | ||
18 | |||
19 | /* | 13 | /* |
20 | * These aren't exported outside the kernel to avoid name space clashes | 14 | * These aren't exported outside the kernel to avoid name space clashes |
21 | */ | 15 | */ |
diff --git a/arch/mips/include/asm/ipcbuf.h b/arch/mips/include/asm/ipcbuf.h index d47d08f264e7..84c7e51cb6d0 100644 --- a/arch/mips/include/asm/ipcbuf.h +++ b/arch/mips/include/asm/ipcbuf.h | |||
@@ -1,28 +1 @@ | |||
1 | #ifndef _ASM_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ASM_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for alpha architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit seq | ||
11 | * - 2 miscellaneous 64-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid_t uid; | ||
18 | __kernel_gid_t gid; | ||
19 | __kernel_uid_t cuid; | ||
20 | __kernel_gid_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short seq; | ||
23 | unsigned short __pad1; | ||
24 | unsigned long __unused1; | ||
25 | unsigned long __unused2; | ||
26 | }; | ||
27 | |||
28 | #endif /* _ASM_IPCBUF_H */ | ||
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 533812b61881..43bf70ebd3a2 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h | |||
@@ -21,12 +21,6 @@ | |||
21 | # include <asm-generic/int-ll64.h> | 21 | # include <asm-generic/int-ll64.h> |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifndef __ASSEMBLY__ | ||
25 | |||
26 | typedef unsigned short umode_t; | ||
27 | |||
28 | #endif /* __ASSEMBLY__ */ | ||
29 | |||
30 | /* | 24 | /* |
31 | * These aren't exported outside the kernel to avoid name space clashes | 25 | * These aren't exported outside the kernel to avoid name space clashes |
32 | */ | 26 | */ |
diff --git a/arch/mn10300/include/asm/ipcbuf.h b/arch/mn10300/include/asm/ipcbuf.h index f6f63d448272..84c7e51cb6d0 100644 --- a/arch/mn10300/include/asm/ipcbuf.h +++ b/arch/mn10300/include/asm/ipcbuf.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef _ASM_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ASM_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for MN10300 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* _ASM_IPCBUF_H */ | ||
diff --git a/arch/mn10300/include/asm/types.h b/arch/mn10300/include/asm/types.h index c1833eb192e3..713d4ba108a5 100644 --- a/arch/mn10300/include/asm/types.h +++ b/arch/mn10300/include/asm/types.h | |||
@@ -13,12 +13,6 @@ | |||
13 | 13 | ||
14 | #include <asm-generic/int-ll64.h> | 14 | #include <asm-generic/int-ll64.h> |
15 | 15 | ||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | typedef unsigned short umode_t; | ||
19 | |||
20 | #endif /* __ASSEMBLY__ */ | ||
21 | |||
22 | /* | 16 | /* |
23 | * These aren't exported outside the kernel to avoid name space clashes | 17 | * These aren't exported outside the kernel to avoid name space clashes |
24 | */ | 18 | */ |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 6ab9580b0b00..d9dc6cd3b7d2 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
@@ -136,16 +136,9 @@ struct hpux_ustat { | |||
136 | */ | 136 | */ |
137 | static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) | 137 | static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) |
138 | { | 138 | { |
139 | struct super_block *s; | ||
140 | struct hpux_ustat tmp; /* Changed to hpux_ustat */ | 139 | struct hpux_ustat tmp; /* Changed to hpux_ustat */ |
141 | struct kstatfs sbuf; | 140 | struct kstatfs sbuf; |
142 | int err = -EINVAL; | 141 | int err = vfs_ustat(dev, &sbuf); |
143 | |||
144 | s = user_get_super(dev); | ||
145 | if (s == NULL) | ||
146 | goto out; | ||
147 | err = statfs_by_dentry(s->s_root, &sbuf); | ||
148 | drop_super(s); | ||
149 | if (err) | 142 | if (err) |
150 | goto out; | 143 | goto out; |
151 | 144 | ||
diff --git a/arch/parisc/include/asm/types.h b/arch/parisc/include/asm/types.h index 80e415c9936d..8866f9bbdeaf 100644 --- a/arch/parisc/include/asm/types.h +++ b/arch/parisc/include/asm/types.h | |||
@@ -3,10 +3,4 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | typedef unsigned short umode_t; | ||
9 | |||
10 | #endif /* __ASSEMBLY__ */ | ||
11 | |||
12 | #endif | 6 | #endif |
diff --git a/arch/powerpc/include/asm/spu.h b/arch/powerpc/include/asm/spu.h index fff921345ddc..93f280e23279 100644 --- a/arch/powerpc/include/asm/spu.h +++ b/arch/powerpc/include/asm/spu.h | |||
@@ -237,7 +237,7 @@ extern long spu_sys_callback(struct spu_syscall_block *s); | |||
237 | struct file; | 237 | struct file; |
238 | struct spufs_calls { | 238 | struct spufs_calls { |
239 | long (*create_thread)(const char __user *name, | 239 | long (*create_thread)(const char __user *name, |
240 | unsigned int flags, mode_t mode, | 240 | unsigned int flags, umode_t mode, |
241 | struct file *neighbor); | 241 | struct file *neighbor); |
242 | long (*spu_run)(struct file *filp, __u32 __user *unpc, | 242 | long (*spu_run)(struct file *filp, __u32 __user *unpc, |
243 | __u32 __user *ustatus); | 243 | __u32 __user *ustatus); |
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index d82e94e6c2b4..0abf7f2c6df9 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -30,12 +30,6 @@ | |||
30 | * 2 of the License, or (at your option) any later version. | 30 | * 2 of the License, or (at your option) any later version. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifdef __powerpc64__ | ||
34 | typedef unsigned int umode_t; | ||
35 | #else | ||
36 | typedef unsigned short umode_t; | ||
37 | #endif | ||
38 | |||
39 | typedef struct { | 33 | typedef struct { |
40 | __u32 u[4]; | 34 | __u32 u[4]; |
41 | } __attribute__((aligned(16))) __vector128; | 35 | } __attribute__((aligned(16))) __vector128; |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 84daabe2fcba..578f35f18723 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -783,7 +783,7 @@ static const struct file_operations lparcfg_fops = { | |||
783 | static int __init lparcfg_init(void) | 783 | static int __init lparcfg_init(void) |
784 | { | 784 | { |
785 | struct proc_dir_entry *ent; | 785 | struct proc_dir_entry *ent; |
786 | mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; | 786 | umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; |
787 | 787 | ||
788 | /* Allow writing if we have FW_FEATURE_SPLPAR */ | 788 | /* Allow writing if we have FW_FEATURE_SPLPAR */ |
789 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && | 789 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && |
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index 75530d99eda6..714bbfc3162c 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c | |||
@@ -65,8 +65,8 @@ static inline void spufs_calls_put(struct spufs_calls *calls) { } | |||
65 | 65 | ||
66 | #endif /* CONFIG_SPU_FS_MODULE */ | 66 | #endif /* CONFIG_SPU_FS_MODULE */ |
67 | 67 | ||
68 | asmlinkage long sys_spu_create(const char __user *name, | 68 | SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags, |
69 | unsigned int flags, mode_t mode, int neighbor_fd) | 69 | umode_t, mode, int, neighbor_fd) |
70 | { | 70 | { |
71 | long ret; | 71 | long ret; |
72 | struct file *neighbor; | 72 | struct file *neighbor; |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e481f6b9a789..d4a094ca96f3 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -74,7 +74,6 @@ spufs_alloc_inode(struct super_block *sb) | |||
74 | static void spufs_i_callback(struct rcu_head *head) | 74 | static void spufs_i_callback(struct rcu_head *head) |
75 | { | 75 | { |
76 | struct inode *inode = container_of(head, struct inode, i_rcu); | 76 | struct inode *inode = container_of(head, struct inode, i_rcu); |
77 | INIT_LIST_HEAD(&inode->i_dentry); | ||
78 | kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); | 77 | kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); |
79 | } | 78 | } |
80 | 79 | ||
@@ -92,7 +91,7 @@ spufs_init_once(void *p) | |||
92 | } | 91 | } |
93 | 92 | ||
94 | static struct inode * | 93 | static struct inode * |
95 | spufs_new_inode(struct super_block *sb, int mode) | 94 | spufs_new_inode(struct super_block *sb, umode_t mode) |
96 | { | 95 | { |
97 | struct inode *inode; | 96 | struct inode *inode; |
98 | 97 | ||
@@ -124,7 +123,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr) | |||
124 | 123 | ||
125 | static int | 124 | static int |
126 | spufs_new_file(struct super_block *sb, struct dentry *dentry, | 125 | spufs_new_file(struct super_block *sb, struct dentry *dentry, |
127 | const struct file_operations *fops, int mode, | 126 | const struct file_operations *fops, umode_t mode, |
128 | size_t size, struct spu_context *ctx) | 127 | size_t size, struct spu_context *ctx) |
129 | { | 128 | { |
130 | static const struct inode_operations spufs_file_iops = { | 129 | static const struct inode_operations spufs_file_iops = { |
@@ -194,7 +193,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) | |||
194 | } | 193 | } |
195 | 194 | ||
196 | static int spufs_fill_dir(struct dentry *dir, | 195 | static int spufs_fill_dir(struct dentry *dir, |
197 | const struct spufs_tree_descr *files, int mode, | 196 | const struct spufs_tree_descr *files, umode_t mode, |
198 | struct spu_context *ctx) | 197 | struct spu_context *ctx) |
199 | { | 198 | { |
200 | struct dentry *dentry, *tmp; | 199 | struct dentry *dentry, *tmp; |
@@ -264,7 +263,7 @@ EXPORT_SYMBOL_GPL(spufs_context_fops); | |||
264 | 263 | ||
265 | static int | 264 | static int |
266 | spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, | 265 | spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, |
267 | int mode) | 266 | umode_t mode) |
268 | { | 267 | { |
269 | int ret; | 268 | int ret; |
270 | struct inode *inode; | 269 | struct inode *inode; |
@@ -447,7 +446,7 @@ spufs_set_affinity(unsigned int flags, struct spu_context *ctx, | |||
447 | 446 | ||
448 | static int | 447 | static int |
449 | spufs_create_context(struct inode *inode, struct dentry *dentry, | 448 | spufs_create_context(struct inode *inode, struct dentry *dentry, |
450 | struct vfsmount *mnt, int flags, int mode, | 449 | struct vfsmount *mnt, int flags, umode_t mode, |
451 | struct file *aff_filp) | 450 | struct file *aff_filp) |
452 | { | 451 | { |
453 | int ret; | 452 | int ret; |
@@ -521,7 +520,7 @@ out: | |||
521 | } | 520 | } |
522 | 521 | ||
523 | static int | 522 | static int |
524 | spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode) | 523 | spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) |
525 | { | 524 | { |
526 | int ret; | 525 | int ret; |
527 | struct inode *inode; | 526 | struct inode *inode; |
@@ -584,7 +583,7 @@ out: | |||
584 | 583 | ||
585 | static int spufs_create_gang(struct inode *inode, | 584 | static int spufs_create_gang(struct inode *inode, |
586 | struct dentry *dentry, | 585 | struct dentry *dentry, |
587 | struct vfsmount *mnt, int mode) | 586 | struct vfsmount *mnt, umode_t mode) |
588 | { | 587 | { |
589 | int ret; | 588 | int ret; |
590 | 589 | ||
@@ -612,7 +611,7 @@ out: | |||
612 | static struct file_system_type spufs_type; | 611 | static struct file_system_type spufs_type; |
613 | 612 | ||
614 | long spufs_create(struct path *path, struct dentry *dentry, | 613 | long spufs_create(struct path *path, struct dentry *dentry, |
615 | unsigned int flags, mode_t mode, struct file *filp) | 614 | unsigned int flags, umode_t mode, struct file *filp) |
616 | { | 615 | { |
617 | int ret; | 616 | int ret; |
618 | 617 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 099245f230b2..67852ade4c01 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -237,7 +237,7 @@ struct spufs_inode_info { | |||
237 | struct spufs_tree_descr { | 237 | struct spufs_tree_descr { |
238 | const char *name; | 238 | const char *name; |
239 | const struct file_operations *ops; | 239 | const struct file_operations *ops; |
240 | int mode; | 240 | umode_t mode; |
241 | size_t size; | 241 | size_t size; |
242 | }; | 242 | }; |
243 | 243 | ||
@@ -249,7 +249,7 @@ extern const struct spufs_tree_descr spufs_dir_debug_contents[]; | |||
249 | extern struct spufs_calls spufs_calls; | 249 | extern struct spufs_calls spufs_calls; |
250 | long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); | 250 | long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); |
251 | long spufs_create(struct path *nd, struct dentry *dentry, unsigned int flags, | 251 | long spufs_create(struct path *nd, struct dentry *dentry, unsigned int flags, |
252 | mode_t mode, struct file *filp); | 252 | umode_t mode, struct file *filp); |
253 | /* ELF coredump callbacks for writing SPU ELF notes */ | 253 | /* ELF coredump callbacks for writing SPU ELF notes */ |
254 | extern int spufs_coredump_extra_notes_size(void); | 254 | extern int spufs_coredump_extra_notes_size(void); |
255 | extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset); | 255 | extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset); |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 71a5b5207266..8591bb62d7fc 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -60,7 +60,7 @@ out: | |||
60 | } | 60 | } |
61 | 61 | ||
62 | static long do_spu_create(const char __user *pathname, unsigned int flags, | 62 | static long do_spu_create(const char __user *pathname, unsigned int flags, |
63 | mode_t mode, struct file *neighbor) | 63 | umode_t mode, struct file *neighbor) |
64 | { | 64 | { |
65 | struct path path; | 65 | struct path path; |
66 | struct dentry *dentry; | 66 | struct dentry *dentry; |
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index ba4271919062..1c16141c031c 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/bio.h> | 26 | #include <linux/bio.h> |
27 | #include <linux/blkdev.h> | 27 | #include <linux/blkdev.h> |
28 | #include <linux/buffer_head.h> | ||
29 | #include <linux/device.h> | 28 | #include <linux/device.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 481f4f76f664..8a2a887478cc 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -97,7 +97,7 @@ static void hypfs_delete_tree(struct dentry *root) | |||
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | static struct inode *hypfs_make_inode(struct super_block *sb, int mode) | 100 | static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode) |
101 | { | 101 | { |
102 | struct inode *ret = new_inode(sb); | 102 | struct inode *ret = new_inode(sb); |
103 | 103 | ||
@@ -107,7 +107,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode) | |||
107 | ret->i_uid = hypfs_info->uid; | 107 | ret->i_uid = hypfs_info->uid; |
108 | ret->i_gid = hypfs_info->gid; | 108 | ret->i_gid = hypfs_info->gid; |
109 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; | 109 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; |
110 | if (mode & S_IFDIR) | 110 | if (S_ISDIR(mode)) |
111 | set_nlink(ret, 2); | 111 | set_nlink(ret, 2); |
112 | } | 112 | } |
113 | return ret; | 113 | return ret; |
@@ -259,9 +259,9 @@ static int hypfs_parse_options(char *options, struct super_block *sb) | |||
259 | return 0; | 259 | return 0; |
260 | } | 260 | } |
261 | 261 | ||
262 | static int hypfs_show_options(struct seq_file *s, struct vfsmount *mnt) | 262 | static int hypfs_show_options(struct seq_file *s, struct dentry *root) |
263 | { | 263 | { |
264 | struct hypfs_sb_info *hypfs_info = mnt->mnt_sb->s_fs_info; | 264 | struct hypfs_sb_info *hypfs_info = root->d_sb->s_fs_info; |
265 | 265 | ||
266 | seq_printf(s, ",uid=%u", hypfs_info->uid); | 266 | seq_printf(s, ",uid=%u", hypfs_info->uid); |
267 | seq_printf(s, ",gid=%u", hypfs_info->gid); | 267 | seq_printf(s, ",gid=%u", hypfs_info->gid); |
@@ -333,7 +333,7 @@ static void hypfs_kill_super(struct super_block *sb) | |||
333 | 333 | ||
334 | static struct dentry *hypfs_create_file(struct super_block *sb, | 334 | static struct dentry *hypfs_create_file(struct super_block *sb, |
335 | struct dentry *parent, const char *name, | 335 | struct dentry *parent, const char *name, |
336 | char *data, mode_t mode) | 336 | char *data, umode_t mode) |
337 | { | 337 | { |
338 | struct dentry *dentry; | 338 | struct dentry *dentry; |
339 | struct inode *inode; | 339 | struct inode *inode; |
@@ -350,13 +350,13 @@ static struct dentry *hypfs_create_file(struct super_block *sb, | |||
350 | dentry = ERR_PTR(-ENOMEM); | 350 | dentry = ERR_PTR(-ENOMEM); |
351 | goto fail; | 351 | goto fail; |
352 | } | 352 | } |
353 | if (mode & S_IFREG) { | 353 | if (S_ISREG(mode)) { |
354 | inode->i_fop = &hypfs_file_ops; | 354 | inode->i_fop = &hypfs_file_ops; |
355 | if (data) | 355 | if (data) |
356 | inode->i_size = strlen(data); | 356 | inode->i_size = strlen(data); |
357 | else | 357 | else |
358 | inode->i_size = 0; | 358 | inode->i_size = 0; |
359 | } else if (mode & S_IFDIR) { | 359 | } else if (S_ISDIR(mode)) { |
360 | inode->i_op = &simple_dir_inode_operations; | 360 | inode->i_op = &simple_dir_inode_operations; |
361 | inode->i_fop = &simple_dir_operations; | 361 | inode->i_fop = &simple_dir_operations; |
362 | inc_nlink(parent->d_inode); | 362 | inc_nlink(parent->d_inode); |
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 18124b75a7ab..9d88db1f55d0 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h | |||
@@ -73,7 +73,7 @@ typedef struct debug_info { | |||
73 | struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; | 73 | struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; |
74 | struct debug_view* views[DEBUG_MAX_VIEWS]; | 74 | struct debug_view* views[DEBUG_MAX_VIEWS]; |
75 | char name[DEBUG_MAX_NAME_LEN]; | 75 | char name[DEBUG_MAX_NAME_LEN]; |
76 | mode_t mode; | 76 | umode_t mode; |
77 | } debug_info_t; | 77 | } debug_info_t; |
78 | 78 | ||
79 | typedef int (debug_header_proc_t) (debug_info_t* id, | 79 | typedef int (debug_header_proc_t) (debug_info_t* id, |
@@ -124,7 +124,7 @@ debug_info_t *debug_register(const char *name, int pages, int nr_areas, | |||
124 | int buf_size); | 124 | int buf_size); |
125 | 125 | ||
126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, | 126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, |
127 | int buf_size, mode_t mode, uid_t uid, | 127 | int buf_size, umode_t mode, uid_t uid, |
128 | gid_t gid); | 128 | gid_t gid); |
129 | 129 | ||
130 | void debug_unregister(debug_info_t* id); | 130 | void debug_unregister(debug_info_t* id); |
diff --git a/arch/s390/include/asm/types.h b/arch/s390/include/asm/types.h index eeb52ccf499f..05ebbcdbbf6b 100644 --- a/arch/s390/include/asm/types.h +++ b/arch/s390/include/asm/types.h | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | typedef unsigned short umode_t; | ||
17 | |||
18 | /* A address type so that arithmetic can be done on it & it can be upgraded to | 16 | /* A address type so that arithmetic can be done on it & it can be upgraded to |
19 | 64 bit when necessary | 17 | 64 bit when necessary |
20 | */ | 18 | */ |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 5ad6bc078bfd..6848828b962e 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -74,7 +74,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf, | |||
74 | static int debug_open(struct inode *inode, struct file *file); | 74 | static int debug_open(struct inode *inode, struct file *file); |
75 | static int debug_close(struct inode *inode, struct file *file); | 75 | static int debug_close(struct inode *inode, struct file *file); |
76 | static debug_info_t *debug_info_create(const char *name, int pages_per_area, | 76 | static debug_info_t *debug_info_create(const char *name, int pages_per_area, |
77 | int nr_areas, int buf_size, mode_t mode); | 77 | int nr_areas, int buf_size, umode_t mode); |
78 | static void debug_info_get(debug_info_t *); | 78 | static void debug_info_get(debug_info_t *); |
79 | static void debug_info_put(debug_info_t *); | 79 | static void debug_info_put(debug_info_t *); |
80 | static int debug_prolog_level_fn(debug_info_t * id, | 80 | static int debug_prolog_level_fn(debug_info_t * id, |
@@ -330,7 +330,7 @@ debug_info_free(debug_info_t* db_info){ | |||
330 | 330 | ||
331 | static debug_info_t* | 331 | static debug_info_t* |
332 | debug_info_create(const char *name, int pages_per_area, int nr_areas, | 332 | debug_info_create(const char *name, int pages_per_area, int nr_areas, |
333 | int buf_size, mode_t mode) | 333 | int buf_size, umode_t mode) |
334 | { | 334 | { |
335 | debug_info_t* rc; | 335 | debug_info_t* rc; |
336 | 336 | ||
@@ -688,7 +688,7 @@ debug_close(struct inode *inode, struct file *file) | |||
688 | */ | 688 | */ |
689 | 689 | ||
690 | debug_info_t *debug_register_mode(const char *name, int pages_per_area, | 690 | debug_info_t *debug_register_mode(const char *name, int pages_per_area, |
691 | int nr_areas, int buf_size, mode_t mode, | 691 | int nr_areas, int buf_size, umode_t mode, |
692 | uid_t uid, gid_t gid) | 692 | uid_t uid, gid_t gid) |
693 | { | 693 | { |
694 | debug_info_t *rc = NULL; | 694 | debug_info_t *rc = NULL; |
@@ -1090,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view) | |||
1090 | int rc = 0; | 1090 | int rc = 0; |
1091 | int i; | 1091 | int i; |
1092 | unsigned long flags; | 1092 | unsigned long flags; |
1093 | mode_t mode; | 1093 | umode_t mode; |
1094 | struct dentry *pde; | 1094 | struct dentry *pde; |
1095 | 1095 | ||
1096 | if (!id) | 1096 | if (!id) |
diff --git a/arch/sparc/include/asm/posix_types.h b/arch/sparc/include/asm/posix_types.h index 98d6ebb922fb..dbfc1a34b3a2 100644 --- a/arch/sparc/include/asm/posix_types.h +++ b/arch/sparc/include/asm/posix_types.h | |||
@@ -20,7 +20,6 @@ typedef unsigned int __kernel_uid_t; | |||
20 | typedef unsigned int __kernel_gid_t; | 20 | typedef unsigned int __kernel_gid_t; |
21 | typedef unsigned long __kernel_ino_t; | 21 | typedef unsigned long __kernel_ino_t; |
22 | typedef unsigned int __kernel_mode_t; | 22 | typedef unsigned int __kernel_mode_t; |
23 | typedef unsigned short __kernel_umode_t; | ||
24 | typedef unsigned int __kernel_nlink_t; | 23 | typedef unsigned int __kernel_nlink_t; |
25 | typedef int __kernel_daddr_t; | 24 | typedef int __kernel_daddr_t; |
26 | typedef long __kernel_off_t; | 25 | typedef long __kernel_off_t; |
@@ -55,7 +54,6 @@ typedef unsigned short __kernel_uid_t; | |||
55 | typedef unsigned short __kernel_gid_t; | 54 | typedef unsigned short __kernel_gid_t; |
56 | typedef unsigned long __kernel_ino_t; | 55 | typedef unsigned long __kernel_ino_t; |
57 | typedef unsigned short __kernel_mode_t; | 56 | typedef unsigned short __kernel_mode_t; |
58 | typedef unsigned short __kernel_umode_t; | ||
59 | typedef short __kernel_nlink_t; | 57 | typedef short __kernel_nlink_t; |
60 | typedef long __kernel_daddr_t; | 58 | typedef long __kernel_daddr_t; |
61 | typedef long __kernel_off_t; | 59 | typedef long __kernel_off_t; |
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h index 91e5a034f987..383d156cde9c 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/asm/types.h | |||
@@ -12,12 +12,6 @@ | |||
12 | 12 | ||
13 | #include <asm-generic/int-ll64.h> | 13 | #include <asm-generic/int-ll64.h> |
14 | 14 | ||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | typedef unsigned short umode_t; | ||
18 | |||
19 | #endif /* __ASSEMBLY__ */ | ||
20 | |||
21 | #endif /* defined(__sparc__) */ | 15 | #endif /* defined(__sparc__) */ |
22 | 16 | ||
23 | #endif /* defined(_SPARC_TYPES_H) */ | 17 | #endif /* defined(_SPARC_TYPES_H) */ |
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 212a6a42527c..a524353d93f2 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -177,7 +177,7 @@ static struct notifier_block __refdata cpuid_class_cpu_notifier = | |||
177 | .notifier_call = cpuid_class_cpu_callback, | 177 | .notifier_call = cpuid_class_cpu_callback, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static char *cpuid_devnode(struct device *dev, mode_t *mode) | 180 | static char *cpuid_devnode(struct device *dev, umode_t *mode) |
181 | { | 181 | { |
182 | return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); | 182 | return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); |
183 | } | 183 | } |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 12fcbe2c143e..96356762a51d 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -236,7 +236,7 @@ static struct notifier_block __refdata msr_class_cpu_notifier = { | |||
236 | .notifier_call = msr_class_cpu_callback, | 236 | .notifier_call = msr_class_cpu_callback, |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static char *msr_devnode(struct device *dev, mode_t *mode) | 239 | static char *msr_devnode(struct device *dev, umode_t *mode) |
240 | { | 240 | { |
241 | return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); | 241 | return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); |
242 | } | 242 | } |
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index 7c0fedd98ea0..ef1db1900d86 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c | |||
@@ -109,7 +109,7 @@ static const struct file_operations u32_array_fops = { | |||
109 | .llseek = no_llseek, | 109 | .llseek = no_llseek, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, | 112 | struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, |
113 | struct dentry *parent, | 113 | struct dentry *parent, |
114 | u32 *array, unsigned elements) | 114 | u32 *array, unsigned elements) |
115 | { | 115 | { |
diff --git a/arch/x86/xen/debugfs.h b/arch/x86/xen/debugfs.h index e28132084832..78d25499be5b 100644 --- a/arch/x86/xen/debugfs.h +++ b/arch/x86/xen/debugfs.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | struct dentry * __init xen_init_debugfs(void); | 4 | struct dentry * __init xen_init_debugfs(void); |
5 | 5 | ||
6 | struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, | 6 | struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, |
7 | struct dentry *parent, | 7 | struct dentry *parent, |
8 | u32 *array, unsigned elements); | 8 | u32 *array, unsigned elements); |
9 | 9 | ||
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h index b1c981e39b52..6d4db7e8ffac 100644 --- a/arch/xtensa/include/asm/types.h +++ b/arch/xtensa/include/asm/types.h | |||
@@ -23,8 +23,6 @@ | |||
23 | 23 | ||
24 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
25 | 25 | ||
26 | typedef unsigned short umode_t; | ||
27 | |||
28 | /* | 26 | /* |
29 | * These aren't exported outside the kernel to avoid name space clashes | 27 | * These aren't exported outside the kernel to avoid name space clashes |
30 | */ | 28 | */ |