Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'vfsmount-guts', 'umode_t' and 'partitions' into Z

Al Viro ece2ccb6 d10577a8

+1007 -1470
+3 -3
Documentation/filesystems/Locking
··· 37 37 38 38 --------------------------- inode_operations --------------------------- 39 39 prototypes: 40 - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); 40 + int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); 41 41 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid 42 42 ata *); 43 43 int (*link) (struct dentry *,struct inode *,struct dentry *); 44 44 int (*unlink) (struct inode *,struct dentry *); 45 45 int (*symlink) (struct inode *,struct dentry *,const char *); 46 - int (*mkdir) (struct inode *,struct dentry *,int); 46 + int (*mkdir) (struct inode *,struct dentry *,umode_t); 47 47 int (*rmdir) (struct inode *,struct dentry *); 48 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 48 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 49 49 int (*rename) (struct inode *, struct dentry *, 50 50 struct inode *, struct dentry *); 51 51 int (*readlink) (struct dentry *, char __user *,int);
+1 -1
Documentation/filesystems/configfs/configfs.txt
··· 192 192 struct configfs_attribute { 193 193 char *ca_name; 194 194 struct module *ca_owner; 195 - mode_t ca_mode; 195 + umode_t ca_mode; 196 196 }; 197 197 198 198 When a config_item wants an attribute to appear as a file in the item's
+12 -12
Documentation/filesystems/debugfs.txt
··· 35 35 36 36 The most general way to create a file within a debugfs directory is with: 37 37 38 - struct dentry *debugfs_create_file(const char *name, mode_t mode, 38 + struct dentry *debugfs_create_file(const char *name, umode_t mode, 39 39 struct dentry *parent, void *data, 40 40 const struct file_operations *fops); 41 41 ··· 53 53 for simple situations. Files containing a single integer value can be 54 54 created with any of: 55 55 56 - struct dentry *debugfs_create_u8(const char *name, mode_t mode, 56 + struct dentry *debugfs_create_u8(const char *name, umode_t mode, 57 57 struct dentry *parent, u8 *value); 58 - struct dentry *debugfs_create_u16(const char *name, mode_t mode, 58 + struct dentry *debugfs_create_u16(const char *name, umode_t mode, 59 59 struct dentry *parent, u16 *value); 60 - struct dentry *debugfs_create_u32(const char *name, mode_t mode, 60 + struct dentry *debugfs_create_u32(const char *name, umode_t mode, 61 61 struct dentry *parent, u32 *value); 62 - struct dentry *debugfs_create_u64(const char *name, mode_t mode, 62 + struct dentry *debugfs_create_u64(const char *name, umode_t mode, 63 63 struct dentry *parent, u64 *value); 64 64 65 65 These files support both reading and writing the given value; if a specific ··· 67 67 values in these files are in decimal; if hexadecimal is more appropriate, 68 68 the following functions can be used instead: 69 69 70 - struct dentry *debugfs_create_x8(const char *name, mode_t mode, 70 + struct dentry *debugfs_create_x8(const char *name, umode_t mode, 71 71 struct dentry *parent, u8 *value); 72 - struct dentry *debugfs_create_x16(const char *name, mode_t mode, 72 + struct dentry *debugfs_create_x16(const char *name, umode_t mode, 73 73 struct dentry *parent, u16 *value); 74 - struct dentry *debugfs_create_x32(const char *name, mode_t mode, 74 + struct dentry *debugfs_create_x32(const char *name, umode_t mode, 75 75 struct dentry *parent, u32 *value); 76 - struct dentry *debugfs_create_x64(const char *name, mode_t mode, 76 + struct dentry *debugfs_create_x64(const char *name, umode_t mode, 77 77 struct dentry *parent, u64 *value); 78 78 79 79 These functions are useful as long as the developer knows the size of the ··· 81 81 architectures, though, complicating the situation somewhat. There is a 82 82 function meant to help out in one special case: 83 83 84 - struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 84 + struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 85 85 struct dentry *parent, 86 86 size_t *value); 87 87 ··· 90 90 91 91 Boolean values can be placed in debugfs with: 92 92 93 - struct dentry *debugfs_create_bool(const char *name, mode_t mode, 93 + struct dentry *debugfs_create_bool(const char *name, umode_t mode, 94 94 struct dentry *parent, u32 *value); 95 95 96 96 A read on the resulting file will yield either Y (for non-zero values) or ··· 104 104 unsigned long size; 105 105 }; 106 106 107 - struct dentry *debugfs_create_blob(const char *name, mode_t mode, 107 + struct dentry *debugfs_create_blob(const char *name, umode_t mode, 108 108 struct dentry *parent, 109 109 struct debugfs_blob_wrapper *blob); 110 110
+1 -1
Documentation/filesystems/sysfs.txt
··· 70 70 struct attribute { 71 71 char * name; 72 72 struct module *owner; 73 - mode_t mode; 73 + umode_t mode; 74 74 }; 75 75 76 76
+3 -3
Documentation/filesystems/vfs.txt
··· 341 341 filesystem. As of kernel 2.6.22, the following members are defined: 342 342 343 343 struct inode_operations { 344 - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); 344 + int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); 345 345 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); 346 346 int (*link) (struct dentry *,struct inode *,struct dentry *); 347 347 int (*unlink) (struct inode *,struct dentry *); 348 348 int (*symlink) (struct inode *,struct dentry *,const char *); 349 - int (*mkdir) (struct inode *,struct dentry *,int); 349 + int (*mkdir) (struct inode *,struct dentry *,umode_t); 350 350 int (*rmdir) (struct inode *,struct dentry *); 351 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 351 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 352 352 int (*rename) (struct inode *, struct dentry *, 353 353 struct inode *, struct dentry *); 354 354 int (*readlink) (struct dentry *, char __user *,int);
+1 -28
arch/alpha/include/asm/ipcbuf.h
··· 1 - #ifndef _ALPHA_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 */ 1 + #include <asm-generic/ipcbuf.h>
-5
arch/alpha/include/asm/types.h
··· 15 15 #include <asm-generic/int-l64.h> 16 16 #endif 17 17 18 - #ifndef __ASSEMBLY__ 19 - 20 - typedef unsigned int umode_t; 21 - 22 - #endif /* __ASSEMBLY__ */ 23 18 #endif /* _ALPHA_TYPES_H */
+1 -29
arch/arm/include/asm/ipcbuf.h
··· 1 - #ifndef __ASMARM_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 */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/arm/include/asm/types.h
··· 3 3 4 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 7 * These aren't exported outside the kernel to avoid name space clashes 14 8 */
+1 -1
arch/arm/mach-msm/smd_debug.c
··· 215 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 219 struct dentry *dent, 220 220 int (*fill)(char *buf, int max)) 221 221 {
+1 -29
arch/avr32/include/asm/ipcbuf.h
··· 1 - #ifndef __ASM_AVR32_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 */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/avr32/include/asm/types.h
··· 10 10 11 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 14 * These aren't exported outside the kernel to avoid name space clashes 21 15 */
+1 -29
arch/cris/include/asm/ipcbuf.h
··· 1 - #ifndef __CRIS_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__ */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/cris/include/asm/types.h
··· 3 3 4 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 7 * These aren't exported outside the kernel to avoid name space clashes 14 8 */
+1 -30
arch/frv/include/asm/ipcbuf.h
··· 1 - #ifndef __ASM_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 - 1 + #include <asm-generic/ipcbuf.h>
-6
arch/frv/include/asm/types.h
··· 14 14 15 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 18 * These aren't exported outside the kernel to avoid name space clashes 25 19 */
+1 -29
arch/h8300/include/asm/ipcbuf.h
··· 1 - #ifndef __H8300_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__ */ 1 + #include <asm-generic/ipcbuf.h>
-17
arch/h8300/include/asm/types.h
··· 3 3 4 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 6 #ifdef __KERNEL__ 22 7 23 8 #define BITS_PER_LONG 32 24 9 25 10 #endif /* __KERNEL__ */ 26 - 27 - #endif /* __ASSEMBLY__ */ 28 11 29 12 #endif /* _H8300_TYPES_H */
+1 -28
arch/ia64/include/asm/ipcbuf.h
··· 1 - #ifndef _ASM_IA64_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 */ 1 + #include <asm-generic/ipcbuf.h>
-2
arch/ia64/include/asm/types.h
··· 28 28 # define __IA64_UL(x) ((unsigned long)(x)) 29 29 # define __IA64_UL_CONST(x) x##UL 30 30 31 - typedef unsigned int umode_t; 32 - 33 31 /* 34 32 * These aren't exported outside the kernel to avoid name space clashes 35 33 */
+1 -29
arch/m32r/include/asm/ipcbuf.h
··· 1 - #ifndef _ASM_M32R_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 */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/m32r/include/asm/types.h
··· 3 3 4 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 7 * These aren't exported outside the kernel to avoid name space clashes 14 8 */
+1 -29
arch/m68k/include/asm/ipcbuf.h
··· 1 - #ifndef __m68k_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__ */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/m68k/include/asm/types.h
··· 10 10 */ 11 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 14 * These aren't exported outside the kernel to avoid name space clashes 21 15 */
+1 -28
arch/mips/include/asm/ipcbuf.h
··· 1 - #ifndef _ASM_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 */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/mips/include/asm/types.h
··· 21 21 # include <asm-generic/int-ll64.h> 22 22 #endif 23 23 24 - #ifndef __ASSEMBLY__ 25 - 26 - typedef unsigned short umode_t; 27 - 28 - #endif /* __ASSEMBLY__ */ 29 - 30 24 /* 31 25 * These aren't exported outside the kernel to avoid name space clashes 32 26 */
+1 -29
arch/mn10300/include/asm/ipcbuf.h
··· 1 - #ifndef _ASM_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 */ 1 + #include <asm-generic/ipcbuf.h>
-6
arch/mn10300/include/asm/types.h
··· 13 13 14 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 17 * These aren't exported outside the kernel to avoid name space clashes 24 18 */
-6
arch/parisc/include/asm/types.h
··· 3 3 4 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 #endif
+1 -1
arch/powerpc/include/asm/spu.h
··· 237 237 struct file; 238 238 struct spufs_calls { 239 239 long (*create_thread)(const char __user *name, 240 - unsigned int flags, mode_t mode, 240 + unsigned int flags, umode_t mode, 241 241 struct file *neighbor); 242 242 long (*spu_run)(struct file *filp, __u32 __user *unpc, 243 243 __u32 __user *ustatus);
-6
arch/powerpc/include/asm/types.h
··· 27 27 * 2 of the License, or (at your option) any later version. 28 28 */ 29 29 30 - #ifdef __powerpc64__ 31 - typedef unsigned int umode_t; 32 - #else 33 - typedef unsigned short umode_t; 34 - #endif 35 - 36 30 typedef struct { 37 31 __u32 u[4]; 38 32 } __attribute__((aligned(16))) __vector128;
+1 -1
arch/powerpc/kernel/lparcfg.c
··· 783 783 static int __init lparcfg_init(void) 784 784 { 785 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 788 /* Allow writing if we have FW_FEATURE_SPLPAR */ 789 789 if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
+2 -2
arch/powerpc/platforms/cell/spu_syscalls.c
··· 65 65 66 66 #endif /* CONFIG_SPU_FS_MODULE */ 67 67 68 - asmlinkage long sys_spu_create(const char __user *name, 69 - unsigned int flags, mode_t mode, int neighbor_fd) 68 + SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags, 69 + umode_t, mode, int, neighbor_fd) 70 70 { 71 71 long ret; 72 72 struct file *neighbor;
+8 -8
arch/powerpc/platforms/cell/spufs/inode.c
··· 91 91 } 92 92 93 93 static struct inode * 94 - spufs_new_inode(struct super_block *sb, int mode) 94 + spufs_new_inode(struct super_block *sb, umode_t mode) 95 95 { 96 96 struct inode *inode; 97 97 ··· 123 123 124 124 static int 125 125 spufs_new_file(struct super_block *sb, struct dentry *dentry, 126 - const struct file_operations *fops, int mode, 126 + const struct file_operations *fops, umode_t mode, 127 127 size_t size, struct spu_context *ctx) 128 128 { 129 129 static const struct inode_operations spufs_file_iops = { ··· 193 193 } 194 194 195 195 static int spufs_fill_dir(struct dentry *dir, 196 - const struct spufs_tree_descr *files, int mode, 196 + const struct spufs_tree_descr *files, umode_t mode, 197 197 struct spu_context *ctx) 198 198 { 199 199 struct dentry *dentry, *tmp; ··· 263 263 264 264 static int 265 265 spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, 266 - int mode) 266 + umode_t mode) 267 267 { 268 268 int ret; 269 269 struct inode *inode; ··· 446 446 447 447 static int 448 448 spufs_create_context(struct inode *inode, struct dentry *dentry, 449 - struct vfsmount *mnt, int flags, int mode, 449 + struct vfsmount *mnt, int flags, umode_t mode, 450 450 struct file *aff_filp) 451 451 { 452 452 int ret; ··· 520 520 } 521 521 522 522 static int 523 - spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode) 523 + spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) 524 524 { 525 525 int ret; 526 526 struct inode *inode; ··· 583 583 584 584 static int spufs_create_gang(struct inode *inode, 585 585 struct dentry *dentry, 586 - struct vfsmount *mnt, int mode) 586 + struct vfsmount *mnt, umode_t mode) 587 587 { 588 588 int ret; 589 589 ··· 611 611 static struct file_system_type spufs_type; 612 612 613 613 long spufs_create(struct path *path, struct dentry *dentry, 614 - unsigned int flags, mode_t mode, struct file *filp) 614 + unsigned int flags, umode_t mode, struct file *filp) 615 615 { 616 616 int ret; 617 617
+2 -2
arch/powerpc/platforms/cell/spufs/spufs.h
··· 237 237 struct spufs_tree_descr { 238 238 const char *name; 239 239 const struct file_operations *ops; 240 - int mode; 240 + umode_t mode; 241 241 size_t size; 242 242 }; 243 243 ··· 249 249 extern struct spufs_calls spufs_calls; 250 250 long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); 251 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 253 /* ELF coredump callbacks for writing SPU ELF notes */ 254 254 extern int spufs_coredump_extra_notes_size(void); 255 255 extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset);
+1 -1
arch/powerpc/platforms/cell/spufs/syscalls.c
··· 60 60 } 61 61 62 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 65 struct path path; 66 66 struct dentry *dentry;
-1
arch/powerpc/sysdev/axonram.c
··· 25 25 26 26 #include <linux/bio.h> 27 27 #include <linux/blkdev.h> 28 - #include <linux/buffer_head.h> 29 28 #include <linux/device.h> 30 29 #include <linux/errno.h> 31 30 #include <linux/fs.h>
+5 -5
arch/s390/hypfs/inode.c
··· 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 102 struct inode *ret = new_inode(sb); 103 103 ··· 107 107 ret->i_uid = hypfs_info->uid; 108 108 ret->i_gid = hypfs_info->gid; 109 109 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 110 - if (mode & S_IFDIR) 110 + if (S_ISDIR(mode)) 111 111 set_nlink(ret, 2); 112 112 } 113 113 return ret; ··· 333 333 334 334 static struct dentry *hypfs_create_file(struct super_block *sb, 335 335 struct dentry *parent, const char *name, 336 - char *data, mode_t mode) 336 + char *data, umode_t mode) 337 337 { 338 338 struct dentry *dentry; 339 339 struct inode *inode; ··· 350 350 dentry = ERR_PTR(-ENOMEM); 351 351 goto fail; 352 352 } 353 - if (mode & S_IFREG) { 353 + if (S_ISREG(mode)) { 354 354 inode->i_fop = &hypfs_file_ops; 355 355 if (data) 356 356 inode->i_size = strlen(data); 357 357 else 358 358 inode->i_size = 0; 359 - } else if (mode & S_IFDIR) { 359 + } else if (S_ISDIR(mode)) { 360 360 inode->i_op = &simple_dir_inode_operations; 361 361 inode->i_fop = &simple_dir_operations; 362 362 inc_nlink(parent->d_inode);
+2 -2
arch/s390/include/asm/debug.h
··· 73 73 struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; 74 74 struct debug_view* views[DEBUG_MAX_VIEWS]; 75 75 char name[DEBUG_MAX_NAME_LEN]; 76 - mode_t mode; 76 + umode_t mode; 77 77 } debug_info_t; 78 78 79 79 typedef int (debug_header_proc_t) (debug_info_t* id, ··· 124 124 int buf_size); 125 125 126 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 128 gid_t gid); 129 129 130 130 void debug_unregister(debug_info_t* id);
-2
arch/s390/include/asm/types.h
··· 13 13 14 14 #ifndef __ASSEMBLY__ 15 15 16 - typedef unsigned short umode_t; 17 - 18 16 /* A address type so that arithmetic can be done on it & it can be upgraded to 19 17 64 bit when necessary 20 18 */
+4 -4
arch/s390/kernel/debug.c
··· 74 74 static int debug_open(struct inode *inode, struct file *file); 75 75 static int debug_close(struct inode *inode, struct file *file); 76 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 78 static void debug_info_get(debug_info_t *); 79 79 static void debug_info_put(debug_info_t *); 80 80 static int debug_prolog_level_fn(debug_info_t * id, ··· 330 330 331 331 static debug_info_t* 332 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 335 debug_info_t* rc; 336 336 ··· 688 688 */ 689 689 690 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 692 uid_t uid, gid_t gid) 693 693 { 694 694 debug_info_t *rc = NULL; ··· 1090 1090 int rc = 0; 1091 1091 int i; 1092 1092 unsigned long flags; 1093 - mode_t mode; 1093 + umode_t mode; 1094 1094 struct dentry *pde; 1095 1095 1096 1096 if (!id)
-2
arch/sparc/include/asm/posix_types.h
··· 20 20 typedef unsigned int __kernel_gid_t; 21 21 typedef unsigned long __kernel_ino_t; 22 22 typedef unsigned int __kernel_mode_t; 23 - typedef unsigned short __kernel_umode_t; 24 23 typedef unsigned int __kernel_nlink_t; 25 24 typedef int __kernel_daddr_t; 26 25 typedef long __kernel_off_t; ··· 54 55 typedef unsigned short __kernel_gid_t; 55 56 typedef unsigned long __kernel_ino_t; 56 57 typedef unsigned short __kernel_mode_t; 57 - typedef unsigned short __kernel_umode_t; 58 58 typedef short __kernel_nlink_t; 59 59 typedef long __kernel_daddr_t; 60 60 typedef long __kernel_off_t;
-6
arch/sparc/include/asm/types.h
··· 12 12 13 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 15 #endif /* defined(__sparc__) */ 22 16 23 17 #endif /* defined(_SPARC_TYPES_H) */
+1 -1
arch/x86/kernel/cpuid.c
··· 177 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 182 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); 183 183 }
+1 -1
arch/x86/kernel/msr.c
··· 236 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 241 return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); 242 242 }
+1 -1
arch/x86/xen/debugfs.c
··· 109 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 113 struct dentry *parent, 114 114 u32 *array, unsigned elements) 115 115 {
+1 -1
arch/x86/xen/debugfs.h
··· 3 3 4 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 7 struct dentry *parent, 8 8 u32 *array, unsigned elements); 9 9
-2
arch/xtensa/include/asm/types.h
··· 23 23 24 24 #ifndef __ASSEMBLY__ 25 25 26 - typedef unsigned short umode_t; 27 - 28 26 /* 29 27 * These aren't exported outside the kernel to avoid name space clashes 30 28 */
+6
block/Kconfig
··· 99 99 100 100 See Documentation/cgroups/blkio-controller.txt for more information. 101 101 102 + menu "Partition Types" 103 + 104 + source "block/partitions/Kconfig" 105 + 106 + endmenu 107 + 102 108 endif # BLOCK 103 109 104 110 config BLOCK_COMPAT
+2 -1
block/Makefile
··· 5 5 obj-$(CONFIG_BLOCK) := elevator.o blk-core.o blk-tag.o blk-sysfs.o \ 6 6 blk-flush.o blk-settings.o blk-ioc.o blk-map.o \ 7 7 blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \ 8 - blk-iopoll.o blk-lib.o ioctl.o genhd.o scsi_ioctl.o 8 + blk-iopoll.o blk-lib.o ioctl.o genhd.o scsi_ioctl.o \ 9 + partition-generic.o partitions/ 9 10 10 11 obj-$(CONFIG_BLK_DEV_BSG) += bsg.o 11 12 obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o
+1 -1
block/bsg.c
··· 1070 1070 1071 1071 static struct cdev bsg_cdev; 1072 1072 1073 - static char *bsg_devnode(struct device *dev, mode_t *mode) 1073 + static char *bsg_devnode(struct device *dev, umode_t *mode) 1074 1074 { 1075 1075 return kasprintf(GFP_KERNEL, "bsg/%s", dev_name(dev)); 1076 1076 }
+2 -3
block/genhd.c
··· 15 15 #include <linux/slab.h> 16 16 #include <linux/kmod.h> 17 17 #include <linux/kobj_map.h> 18 - #include <linux/buffer_head.h> 19 18 #include <linux/mutex.h> 20 19 #include <linux/idr.h> 21 20 #include <linux/log2.h> ··· 506 507 return 0; 507 508 } 508 509 509 - void register_disk(struct gendisk *disk) 510 + static void register_disk(struct gendisk *disk) 510 511 { 511 512 struct device *ddev = disk_to_dev(disk); 512 513 struct block_device *bdev; ··· 1108 1109 .name = "block", 1109 1110 }; 1110 1111 1111 - static char *block_devnode(struct device *dev, mode_t *mode) 1112 + static char *block_devnode(struct device *dev, umode_t *mode) 1112 1113 { 1113 1114 struct gendisk *disk = dev_to_disk(dev); 1114 1115
+1 -1
block/ioctl.c
··· 5 5 #include <linux/blkpg.h> 6 6 #include <linux/hdreg.h> 7 7 #include <linux/backing-dev.h> 8 - #include <linux/buffer_head.h> 8 + #include <linux/fs.h> 9 9 #include <linux/blktrace_api.h> 10 10 #include <asm/uaccess.h> 11 11
+166
block/partitions/check.c
··· 1 + /* 2 + * fs/partitions/check.c 3 + * 4 + * Code extracted from drivers/block/genhd.c 5 + * Copyright (C) 1991-1998 Linus Torvalds 6 + * Re-organised Feb 1998 Russell King 7 + * 8 + * We now have independent partition support from the 9 + * block drivers, which allows all the partition code to 10 + * be grouped in one location, and it to be mostly self 11 + * contained. 12 + * 13 + * Added needed MAJORS for new pairs, {hdi,hdj}, {hdk,hdl} 14 + */ 15 + 16 + #include <linux/slab.h> 17 + #include <linux/ctype.h> 18 + #include <linux/genhd.h> 19 + 20 + #include "check.h" 21 + 22 + #include "acorn.h" 23 + #include "amiga.h" 24 + #include "atari.h" 25 + #include "ldm.h" 26 + #include "mac.h" 27 + #include "msdos.h" 28 + #include "osf.h" 29 + #include "sgi.h" 30 + #include "sun.h" 31 + #include "ibm.h" 32 + #include "ultrix.h" 33 + #include "efi.h" 34 + #include "karma.h" 35 + #include "sysv68.h" 36 + 37 + int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/ 38 + 39 + static int (*check_part[])(struct parsed_partitions *) = { 40 + /* 41 + * Probe partition formats with tables at disk address 0 42 + * that also have an ADFS boot block at 0xdc0. 43 + */ 44 + #ifdef CONFIG_ACORN_PARTITION_ICS 45 + adfspart_check_ICS, 46 + #endif 47 + #ifdef CONFIG_ACORN_PARTITION_POWERTEC 48 + adfspart_check_POWERTEC, 49 + #endif 50 + #ifdef CONFIG_ACORN_PARTITION_EESOX 51 + adfspart_check_EESOX, 52 + #endif 53 + 54 + /* 55 + * Now move on to formats that only have partition info at 56 + * disk address 0xdc0. Since these may also have stale 57 + * PC/BIOS partition tables, they need to come before 58 + * the msdos entry. 59 + */ 60 + #ifdef CONFIG_ACORN_PARTITION_CUMANA 61 + adfspart_check_CUMANA, 62 + #endif 63 + #ifdef CONFIG_ACORN_PARTITION_ADFS 64 + adfspart_check_ADFS, 65 + #endif 66 + 67 + #ifdef CONFIG_EFI_PARTITION 68 + efi_partition, /* this must come before msdos */ 69 + #endif 70 + #ifdef CONFIG_SGI_PARTITION 71 + sgi_partition, 72 + #endif 73 + #ifdef CONFIG_LDM_PARTITION 74 + ldm_partition, /* this must come before msdos */ 75 + #endif 76 + #ifdef CONFIG_MSDOS_PARTITION 77 + msdos_partition, 78 + #endif 79 + #ifdef CONFIG_OSF_PARTITION 80 + osf_partition, 81 + #endif 82 + #ifdef CONFIG_SUN_PARTITION 83 + sun_partition, 84 + #endif 85 + #ifdef CONFIG_AMIGA_PARTITION 86 + amiga_partition, 87 + #endif 88 + #ifdef CONFIG_ATARI_PARTITION 89 + atari_partition, 90 + #endif 91 + #ifdef CONFIG_MAC_PARTITION 92 + mac_partition, 93 + #endif 94 + #ifdef CONFIG_ULTRIX_PARTITION 95 + ultrix_partition, 96 + #endif 97 + #ifdef CONFIG_IBM_PARTITION 98 + ibm_partition, 99 + #endif 100 + #ifdef CONFIG_KARMA_PARTITION 101 + karma_partition, 102 + #endif 103 + #ifdef CONFIG_SYSV68_PARTITION 104 + sysv68_partition, 105 + #endif 106 + NULL 107 + }; 108 + 109 + struct parsed_partitions * 110 + check_partition(struct gendisk *hd, struct block_device *bdev) 111 + { 112 + struct parsed_partitions *state; 113 + int i, res, err; 114 + 115 + state = kzalloc(sizeof(struct parsed_partitions), GFP_KERNEL); 116 + if (!state) 117 + return NULL; 118 + state->pp_buf = (char *)__get_free_page(GFP_KERNEL); 119 + if (!state->pp_buf) { 120 + kfree(state); 121 + return NULL; 122 + } 123 + state->pp_buf[0] = '\0'; 124 + 125 + state->bdev = bdev; 126 + disk_name(hd, 0, state->name); 127 + snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name); 128 + if (isdigit(state->name[strlen(state->name)-1])) 129 + sprintf(state->name, "p"); 130 + 131 + state->limit = disk_max_parts(hd); 132 + i = res = err = 0; 133 + while (!res && check_part[i]) { 134 + memset(&state->parts, 0, sizeof(state->parts)); 135 + res = check_part[i++](state); 136 + if (res < 0) { 137 + /* We have hit an I/O error which we don't report now. 138 + * But record it, and let the others do their job. 139 + */ 140 + err = res; 141 + res = 0; 142 + } 143 + 144 + } 145 + if (res > 0) { 146 + printk(KERN_INFO "%s", state->pp_buf); 147 + 148 + free_page((unsigned long)state->pp_buf); 149 + return state; 150 + } 151 + if (state->access_beyond_eod) 152 + err = -ENOSPC; 153 + if (err) 154 + /* The partition is unrecognized. So report I/O errors if there were any */ 155 + res = err; 156 + if (!res) 157 + strlcat(state->pp_buf, " unknown partition table\n", PAGE_SIZE); 158 + else if (warn_no_part) 159 + strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE); 160 + 161 + printk(KERN_INFO "%s", state->pp_buf); 162 + 163 + free_page((unsigned long)state->pp_buf); 164 + kfree(state); 165 + return ERR_PTR(res); 166 + }
+1 -1
drivers/acpi/battery.c
··· 873 873 874 874 static const struct battery_file { 875 875 struct file_operations ops; 876 - mode_t mode; 876 + umode_t mode; 877 877 const char *name; 878 878 } acpi_battery_file[] = { 879 879 FILE_DESCRIPTION_RO(info),
+1 -1
drivers/acpi/ec_sys.c
··· 105 105 { 106 106 struct dentry *dev_dir; 107 107 char name[64]; 108 - mode_t mode = 0400; 108 + umode_t mode = 0400; 109 109 110 110 if (ec_device_count == 0) { 111 111 acpi_ec_debugfs_dir = debugfs_create_dir("ec", NULL);
+2 -2
drivers/base/core.c
··· 198 198 if (MAJOR(dev->devt)) { 199 199 const char *tmp; 200 200 const char *name; 201 - mode_t mode = 0; 201 + umode_t mode = 0; 202 202 203 203 add_uevent_var(env, "MAJOR=%u", MAJOR(dev->devt)); 204 204 add_uevent_var(env, "MINOR=%u", MINOR(dev->devt)); ··· 1182 1182 * freed by the caller. 1183 1183 */ 1184 1184 const char *device_get_devnode(struct device *dev, 1185 - mode_t *mode, const char **tmp) 1185 + umode_t *mode, const char **tmp) 1186 1186 { 1187 1187 char *s; 1188 1188
+4 -4
drivers/base/devtmpfs.c
··· 40 40 struct completion done; 41 41 int err; 42 42 const char *name; 43 - mode_t mode; /* 0 => delete */ 43 + umode_t mode; /* 0 => delete */ 44 44 struct device *dev; 45 45 } *requests; 46 46 ··· 142 142 return req.err; 143 143 } 144 144 145 - static int dev_mkdir(const char *name, mode_t mode) 145 + static int dev_mkdir(const char *name, umode_t mode) 146 146 { 147 147 struct dentry *dentry; 148 148 struct path path; ··· 189 189 return err; 190 190 } 191 191 192 - static int handle_create(const char *nodename, mode_t mode, struct device *dev) 192 + static int handle_create(const char *nodename, umode_t mode, struct device *dev) 193 193 { 194 194 struct dentry *dentry; 195 195 struct path path; ··· 378 378 379 379 static DECLARE_COMPLETION(setup_done); 380 380 381 - static int handle(const char *name, mode_t mode, struct device *dev) 381 + static int handle(const char *name, umode_t mode, struct device *dev) 382 382 { 383 383 if (mode) 384 384 return handle_create(name, mode, dev);
+1 -1
drivers/block/amiflop.c
··· 63 63 #include <linux/mutex.h> 64 64 #include <linux/amifdreg.h> 65 65 #include <linux/amifd.h> 66 - #include <linux/buffer_head.h> 66 + #include <linux/fs.h> 67 67 #include <linux/blkdev.h> 68 68 #include <linux/elevator.h> 69 69 #include <linux/interrupt.h>
+1 -1
drivers/block/aoe/aoechr.c
··· 270 270 .llseek = noop_llseek, 271 271 }; 272 272 273 - static char *aoe_devnode(struct device *dev, mode_t *mode) 273 + static char *aoe_devnode(struct device *dev, umode_t *mode) 274 274 { 275 275 return kasprintf(GFP_KERNEL, "etherd/%s", dev_name(dev)); 276 276 }
+4 -5
drivers/block/brd.c
··· 17 17 #include <linux/highmem.h> 18 18 #include <linux/mutex.h> 19 19 #include <linux/radix-tree.h> 20 - #include <linux/buffer_head.h> /* invalidate_bh_lrus() */ 20 + #include <linux/fs.h> 21 21 #include <linux/slab.h> 22 22 23 23 #include <asm/uaccess.h> ··· 402 402 error = -EBUSY; 403 403 if (bdev->bd_openers <= 1) { 404 404 /* 405 - * Invalidate the cache first, so it isn't written 406 - * back to the device. 405 + * Kill the cache first, so it isn't written back to the 406 + * device. 407 407 * 408 408 * Another thread might instantiate more buffercache here, 409 409 * but there is not much we can do to close that race. 410 410 */ 411 - invalidate_bh_lrus(); 412 - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); 411 + kill_bdev(bdev); 413 412 brd_free_pages(brd); 414 413 error = 0; 415 414 }
-1
drivers/block/floppy.c
··· 188 188 #include <linux/init.h> 189 189 #include <linux/platform_device.h> 190 190 #include <linux/mod_devicetable.h> 191 - #include <linux/buffer_head.h> /* for invalidate_buffers() */ 192 191 #include <linux/mutex.h> 193 192 #include <linux/io.h> 194 193 #include <linux/uaccess.h>
-1
drivers/block/loop.c
··· 69 69 #include <linux/freezer.h> 70 70 #include <linux/mutex.h> 71 71 #include <linux/writeback.h> 72 - #include <linux/buffer_head.h> /* for invalidate_bdev() */ 73 72 #include <linux/completion.h> 74 73 #include <linux/highmem.h> 75 74 #include <linux/kthread.h>
+1 -1
drivers/block/pktcdvd.c
··· 2817 2817 .check_events = pkt_check_events, 2818 2818 }; 2819 2819 2820 - static char *pktcdvd_devnode(struct gendisk *gd, mode_t *mode) 2820 + static char *pktcdvd_devnode(struct gendisk *gd, umode_t *mode) 2821 2821 { 2822 2822 return kasprintf(GFP_KERNEL, "pktcdvd/%s", gd->disk_name); 2823 2823 }
-1
drivers/cdrom/cdrom.c
··· 267 267 268 268 #include <linux/module.h> 269 269 #include <linux/fs.h> 270 - #include <linux/buffer_head.h> 271 270 #include <linux/major.h> 272 271 #include <linux/types.h> 273 272 #include <linux/errno.h>
+2 -2
drivers/char/mem.c
··· 847 847 848 848 static const struct memdev { 849 849 const char *name; 850 - mode_t mode; 850 + umode_t mode; 851 851 const struct file_operations *fops; 852 852 struct backing_dev_info *dev_info; 853 853 } devlist[] = { ··· 901 901 .llseek = noop_llseek, 902 902 }; 903 903 904 - static char *mem_devnode(struct device *dev, mode_t *mode) 904 + static char *mem_devnode(struct device *dev, umode_t *mode) 905 905 { 906 906 if (mode && devlist[MINOR(dev->devt)].mode) 907 907 *mode = devlist[MINOR(dev->devt)].mode;
+1 -1
drivers/char/misc.c
··· 258 258 EXPORT_SYMBOL(misc_register); 259 259 EXPORT_SYMBOL(misc_deregister); 260 260 261 - static char *misc_devnode(struct device *dev, mode_t *mode) 261 + static char *misc_devnode(struct device *dev, umode_t *mode) 262 262 { 263 263 struct miscdevice *c = dev_get_drvdata(dev); 264 264
+1 -1
drivers/char/raw.c
··· 308 308 309 309 static struct cdev raw_cdev; 310 310 311 - static char *raw_devnode(struct device *dev, mode_t *mode) 311 + static char *raw_devnode(struct device *dev, umode_t *mode) 312 312 { 313 313 return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev)); 314 314 }
+1 -1
drivers/char/tile-srom.c
··· 329 329 __ATTR_NULL 330 330 }; 331 331 332 - static char *srom_devnode(struct device *dev, mode_t *mode) 332 + static char *srom_devnode(struct device *dev, umode_t *mode) 333 333 { 334 334 *mode = S_IRUGO | S_IWUSR; 335 335 return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev));
+6 -6
drivers/firmware/iscsi_ibft.c
··· 433 433 * Helper routiners to check to determine if the entry is valid 434 434 * in the proper iBFT structure. 435 435 */ 436 - static mode_t ibft_check_nic_for(void *data, int type) 436 + static umode_t ibft_check_nic_for(void *data, int type) 437 437 { 438 438 struct ibft_kobject *entry = data; 439 439 struct ibft_nic *nic = entry->nic; 440 - mode_t rc = 0; 440 + umode_t rc = 0; 441 441 442 442 switch (type) { 443 443 case ISCSI_BOOT_ETH_INDEX: ··· 488 488 return rc; 489 489 } 490 490 491 - static mode_t __init ibft_check_tgt_for(void *data, int type) 491 + static umode_t __init ibft_check_tgt_for(void *data, int type) 492 492 { 493 493 struct ibft_kobject *entry = data; 494 494 struct ibft_tgt *tgt = entry->tgt; 495 - mode_t rc = 0; 495 + umode_t rc = 0; 496 496 497 497 switch (type) { 498 498 case ISCSI_BOOT_TGT_INDEX: ··· 524 524 return rc; 525 525 } 526 526 527 - static mode_t __init ibft_check_initiator_for(void *data, int type) 527 + static umode_t __init ibft_check_initiator_for(void *data, int type) 528 528 { 529 529 struct ibft_kobject *entry = data; 530 530 struct ibft_initiator *init = entry->initiator; 531 - mode_t rc = 0; 531 + umode_t rc = 0; 532 532 533 533 switch (type) { 534 534 case ISCSI_BOOT_INI_INDEX:
+1 -1
drivers/gpu/drm/drm_sysfs.c
··· 72 72 return 0; 73 73 } 74 74 75 - static char *drm_devnode(struct device *dev, mode_t *mode) 75 + static char *drm_devnode(struct device *dev, umode_t *mode) 76 76 { 77 77 return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev)); 78 78 }
+1 -1
drivers/hid/usbhid/hiddev.c
··· 859 859 .llseek = noop_llseek, 860 860 }; 861 861 862 - static char *hiddev_devnode(struct device *dev, mode_t *mode) 862 + static char *hiddev_devnode(struct device *dev, umode_t *mode) 863 863 { 864 864 return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); 865 865 }
+3 -3
drivers/hwmon/dme1737.c
··· 1223 1223 } 1224 1224 1225 1225 static struct attribute *dme1737_pwm_chmod_attr[]; 1226 - static void dme1737_chmod_file(struct device*, struct attribute*, mode_t); 1226 + static void dme1737_chmod_file(struct device*, struct attribute*, umode_t); 1227 1227 1228 1228 static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, 1229 1229 const char *buf, size_t count) ··· 1961 1961 static int dme1737_i2c_get_features(int, struct dme1737_data*); 1962 1962 1963 1963 static void dme1737_chmod_file(struct device *dev, 1964 - struct attribute *attr, mode_t mode) 1964 + struct attribute *attr, umode_t mode) 1965 1965 { 1966 1966 if (sysfs_chmod_file(&dev->kobj, attr, mode)) { 1967 1967 dev_warn(dev, "Failed to change permissions of %s.\n", ··· 1971 1971 1972 1972 static void dme1737_chmod_group(struct device *dev, 1973 1973 const struct attribute_group *group, 1974 - mode_t mode) 1974 + umode_t mode) 1975 1975 { 1976 1976 struct attribute **attr; 1977 1977
+1 -1
drivers/hwmon/jc42.c
··· 413 413 NULL 414 414 }; 415 415 416 - static mode_t jc42_attribute_mode(struct kobject *kobj, 416 + static umode_t jc42_attribute_mode(struct kobject *kobj, 417 417 struct attribute *attr, int index) 418 418 { 419 419 struct device *dev = container_of(kobj, struct device, kobj);
+2 -2
drivers/hwmon/max1668.c
··· 335 335 NULL 336 336 }; 337 337 338 - static mode_t max1668_attribute_mode(struct kobject *kobj, 338 + static umode_t max1668_attribute_mode(struct kobject *kobj, 339 339 struct attribute *attr, int index) 340 340 { 341 - int ret = S_IRUGO; 341 + umode_t ret = S_IRUGO; 342 342 if (read_only) 343 343 return ret; 344 344 if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr ||
+1 -1
drivers/hwmon/max6650.c
··· 464 464 static SENSOR_DEVICE_ATTR(gpio2_alarm, S_IRUGO, get_alarm, NULL, 465 465 MAX6650_ALRM_GPIO2); 466 466 467 - static mode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, 467 + static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, 468 468 int n) 469 469 { 470 470 struct device *dev = container_of(kobj, struct device, kobj);
+1 -1
drivers/hwmon/tmp421.c
··· 157 157 return sprintf(buf, "0\n"); 158 158 } 159 159 160 - static mode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, 160 + static umode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, 161 161 int n) 162 162 { 163 163 struct device *dev = container_of(kobj, struct device, kobj);
+1 -1
drivers/infiniband/core/cm.c
··· 3659 3659 .release = cm_release_port_obj 3660 3660 }; 3661 3661 3662 - static char *cm_devnode(struct device *dev, mode_t *mode) 3662 + static char *cm_devnode(struct device *dev, umode_t *mode) 3663 3663 { 3664 3664 if (mode) 3665 3665 *mode = 0666;
+1 -1
drivers/infiniband/core/user_mad.c
··· 1175 1175 kref_put(&umad_dev->ref, ib_umad_release_dev); 1176 1176 } 1177 1177 1178 - static char *umad_devnode(struct device *dev, mode_t *mode) 1178 + static char *umad_devnode(struct device *dev, umode_t *mode) 1179 1179 { 1180 1180 return kasprintf(GFP_KERNEL, "infiniband/%s", dev_name(dev)); 1181 1181 }
+1 -1
drivers/infiniband/core/uverbs_main.c
··· 846 846 kfree(uverbs_dev); 847 847 } 848 848 849 - static char *uverbs_devnode(struct device *dev, mode_t *mode) 849 + static char *uverbs_devnode(struct device *dev, umode_t *mode) 850 850 { 851 851 if (mode) 852 852 *mode = 0666;
+3 -3
drivers/infiniband/hw/ipath/ipath_fs.c
··· 46 46 static struct super_block *ipath_super; 47 47 48 48 static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, 49 - int mode, const struct file_operations *fops, 49 + umode_t mode, const struct file_operations *fops, 50 50 void *data) 51 51 { 52 52 int error; ··· 61 61 inode->i_mode = mode; 62 62 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 63 63 inode->i_private = data; 64 - if ((mode & S_IFMT) == S_IFDIR) { 64 + if (S_ISDIR(mode)) { 65 65 inode->i_op = &simple_dir_inode_operations; 66 66 inc_nlink(inode); 67 67 inc_nlink(dir); ··· 76 76 return error; 77 77 } 78 78 79 - static int create_file(const char *name, mode_t mode, 79 + static int create_file(const char *name, umode_t mode, 80 80 struct dentry *parent, struct dentry **dentry, 81 81 const struct file_operations *fops, void *data) 82 82 {
+3 -3
drivers/infiniband/hw/qib/qib_fs.c
··· 47 47 #define private2dd(file) ((file)->f_dentry->d_inode->i_private) 48 48 49 49 static int qibfs_mknod(struct inode *dir, struct dentry *dentry, 50 - int mode, const struct file_operations *fops, 50 + umode_t mode, const struct file_operations *fops, 51 51 void *data) 52 52 { 53 53 int error; ··· 67 67 inode->i_mtime = inode->i_atime; 68 68 inode->i_ctime = inode->i_atime; 69 69 inode->i_private = data; 70 - if ((mode & S_IFMT) == S_IFDIR) { 70 + if (S_ISDIR(mode)) { 71 71 inode->i_op = &simple_dir_inode_operations; 72 72 inc_nlink(inode); 73 73 inc_nlink(dir); ··· 82 82 return error; 83 83 } 84 84 85 - static int create_file(const char *name, mode_t mode, 85 + static int create_file(const char *name, umode_t mode, 86 86 struct dentry *parent, struct dentry **dentry, 87 87 const struct file_operations *fops, void *data) 88 88 {
+1 -1
drivers/infiniband/ulp/iser/iscsi_iser.c
··· 638 638 iser_conn_terminate(ib_conn); 639 639 } 640 640 641 - static mode_t iser_attr_is_visible(int param_type, int param) 641 + static umode_t iser_attr_is_visible(int param_type, int param) 642 642 { 643 643 switch (param_type) { 644 644 case ISCSI_HOST_PARAM:
+1 -1
drivers/input/input.c
··· 1624 1624 #endif 1625 1625 }; 1626 1626 1627 - static char *input_devnode(struct device *dev, mode_t *mode) 1627 + static char *input_devnode(struct device *dev, umode_t *mode) 1628 1628 { 1629 1629 return kasprintf(GFP_KERNEL, "input/%s", dev_name(dev)); 1630 1630 }
+2 -2
drivers/input/touchscreen/ad7877.c
··· 612 612 NULL 613 613 }; 614 614 615 - static mode_t ad7877_attr_is_visible(struct kobject *kobj, 615 + static umode_t ad7877_attr_is_visible(struct kobject *kobj, 616 616 struct attribute *attr, int n) 617 617 { 618 - mode_t mode = attr->mode; 618 + umode_t mode = attr->mode; 619 619 620 620 if (attr == &dev_attr_aux3.attr) { 621 621 if (gpio3)
+2 -2
drivers/input/touchscreen/tsc2005.c
··· 450 450 NULL 451 451 }; 452 452 453 - static mode_t tsc2005_attr_is_visible(struct kobject *kobj, 453 + static umode_t tsc2005_attr_is_visible(struct kobject *kobj, 454 454 struct attribute *attr, int n) 455 455 { 456 456 struct device *dev = container_of(kobj, struct device, kobj); 457 457 struct spi_device *spi = to_spi_device(dev); 458 458 struct tsc2005 *ts = spi_get_drvdata(spi); 459 - mode_t mode = attr->mode; 459 + umode_t mode = attr->mode; 460 460 461 461 if (attr == &dev_attr_selftest.attr) { 462 462 if (!ts->set_reset)
-1
drivers/md/dm.c
··· 14 14 #include <linux/moduleparam.h> 15 15 #include <linux/blkpg.h> 16 16 #include <linux/bio.h> 17 - #include <linux/buffer_head.h> 18 17 #include <linux/mempool.h> 19 18 #include <linux/slab.h> 20 19 #include <linux/idr.h>
+1 -2
drivers/md/md.c
··· 36 36 #include <linux/blkdev.h> 37 37 #include <linux/sysctl.h> 38 38 #include <linux/seq_file.h> 39 - #include <linux/mutex.h> 40 - #include <linux/buffer_head.h> /* for invalidate_bdev */ 39 + #include <linux/fs.h> 41 40 #include <linux/poll.h> 42 41 #include <linux/ctype.h> 43 42 #include <linux/string.h>
+1 -1
drivers/media/dvb/ddbridge/ddbridge-core.c
··· 1480 1480 .open = ddb_open, 1481 1481 }; 1482 1482 1483 - static char *ddb_devnode(struct device *device, mode_t *mode) 1483 + static char *ddb_devnode(struct device *device, umode_t *mode) 1484 1484 { 1485 1485 struct ddb *dev = dev_get_drvdata(device); 1486 1486
+1 -1
drivers/media/dvb/dvb-core/dvbdev.c
··· 450 450 return 0; 451 451 } 452 452 453 - static char *dvb_devnode(struct device *dev, mode_t *mode) 453 + static char *dvb_devnode(struct device *dev, umode_t *mode) 454 454 { 455 455 struct dvb_device *dvbdev = dev_get_drvdata(dev); 456 456
+1 -1
drivers/media/rc/rc-main.c
··· 715 715 } 716 716 717 717 /* class for /sys/class/rc */ 718 - static char *ir_devnode(struct device *dev, mode_t *mode) 718 + static char *ir_devnode(struct device *dev, umode_t *mode) 719 719 { 720 720 return kasprintf(GFP_KERNEL, "rc/%s", dev_name(dev)); 721 721 }
+1 -1
drivers/message/i2o/i2o_proc.c
··· 56 56 /* Structure used to define /proc entries */ 57 57 typedef struct _i2o_proc_entry_t { 58 58 char *name; /* entry name */ 59 - mode_t mode; /* mode */ 59 + umode_t mode; /* mode */ 60 60 const struct file_operations *fops; /* open function */ 61 61 } i2o_proc_entry; 62 62
+1 -1
drivers/misc/sgi-gru/gruprocfs.c
··· 324 324 325 325 static struct proc_entry { 326 326 char *name; 327 - int mode; 327 + umode_t mode; 328 328 const struct file_operations *fops; 329 329 struct proc_dir_entry *entry; 330 330 } proc_files[] = {
+1 -1
drivers/mmc/card/mmc_test.c
··· 2949 2949 } 2950 2950 2951 2951 static int __mmc_test_register_dbgfs_file(struct mmc_card *card, 2952 - const char *name, mode_t mode, const struct file_operations *fops) 2952 + const char *name, umode_t mode, const struct file_operations *fops) 2953 2953 { 2954 2954 struct dentry *file = NULL; 2955 2955 struct mmc_test_dbgfs_file *df;
-1
drivers/mtd/devices/block2mtd.c
··· 14 14 #include <linux/list.h> 15 15 #include <linux/init.h> 16 16 #include <linux/mtd/mtd.h> 17 - #include <linux/buffer_head.h> 18 17 #include <linux/mutex.h> 19 18 #include <linux/mount.h> 20 19 #include <linux/slab.h>
+1 -1
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
··· 2000 2000 */ 2001 2001 struct cxgb4vf_debugfs_entry { 2002 2002 const char *name; /* name of debugfs node */ 2003 - mode_t mode; /* file system mode */ 2003 + umode_t mode; /* file system mode */ 2004 2004 const struct file_operations *fops; 2005 2005 }; 2006 2006
+1 -1
drivers/net/wireless/ath/carl9170/debug.c
··· 56 56 57 57 struct carl9170_debugfs_fops { 58 58 unsigned int read_bufsize; 59 - mode_t attr; 59 + umode_t attr; 60 60 char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize, 61 61 ssize_t *len); 62 62 ssize_t (*write)(struct ar9170 *aru, const char *buf, size_t size);
+1 -1
drivers/net/wireless/libertas/debugfs.c
··· 704 704 705 705 struct lbs_debugfs_files { 706 706 const char *name; 707 - int perm; 707 + umode_t perm; 708 708 struct file_operations fops; 709 709 }; 710 710
+2 -2
drivers/pci/pci-label.c
··· 89 89 return 0; 90 90 } 91 91 92 - static mode_t 92 + static umode_t 93 93 smbios_instance_string_exist(struct kobject *kobj, struct attribute *attr, 94 94 int n) 95 95 { ··· 275 275 return FALSE; 276 276 } 277 277 278 - static mode_t 278 + static umode_t 279 279 acpi_index_string_exist(struct kobject *kobj, struct attribute *attr, int n) 280 280 { 281 281 struct device *dev;
+1 -1
drivers/platform/x86/asus-laptop.c
··· 1477 1477 NULL 1478 1478 }; 1479 1479 1480 - static mode_t asus_sysfs_is_visible(struct kobject *kobj, 1480 + static umode_t asus_sysfs_is_visible(struct kobject *kobj, 1481 1481 struct attribute *attr, 1482 1482 int idx) 1483 1483 {
+2 -2
drivers/platform/x86/asus-wmi.c
··· 992 992 NULL 993 993 }; 994 994 995 - static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, 995 + static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, 996 996 struct attribute *attr, int idx) 997 997 { 998 998 struct device *dev = container_of(kobj, struct device, kobj); ··· 1357 1357 NULL 1358 1358 }; 1359 1359 1360 - static mode_t asus_sysfs_is_visible(struct kobject *kobj, 1360 + static umode_t asus_sysfs_is_visible(struct kobject *kobj, 1361 1361 struct attribute *attr, int idx) 1362 1362 { 1363 1363 struct device *dev = container_of(kobj, struct device, kobj);
+2 -2
drivers/platform/x86/asus_acpi.c
··· 1053 1053 }; 1054 1054 1055 1055 static int 1056 - asus_proc_add(char *name, const struct file_operations *proc_fops, mode_t mode, 1056 + asus_proc_add(char *name, const struct file_operations *proc_fops, umode_t mode, 1057 1057 struct acpi_device *device) 1058 1058 { 1059 1059 struct proc_dir_entry *proc; ··· 1072 1072 static int asus_hotk_add_fs(struct acpi_device *device) 1073 1073 { 1074 1074 struct proc_dir_entry *proc; 1075 - mode_t mode; 1075 + umode_t mode; 1076 1076 1077 1077 if ((asus_uid == 0) && (asus_gid == 0)) { 1078 1078 mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
+1 -1
drivers/platform/x86/ideapad-laptop.c
··· 368 368 NULL 369 369 }; 370 370 371 - static mode_t ideapad_is_visible(struct kobject *kobj, 371 + static umode_t ideapad_is_visible(struct kobject *kobj, 372 372 struct attribute *attr, 373 373 int idx) 374 374 {
+1 -1
drivers/platform/x86/intel_menlow.c
··· 389 389 return sprintf(buf, "%s\n", bios_enabled ? "enabled" : "disabled"); 390 390 } 391 391 392 - static int intel_menlow_add_one_attribute(char *name, int mode, void *show, 392 + static int intel_menlow_add_one_attribute(char *name, umode_t mode, void *show, 393 393 void *store, struct device *dev, 394 394 acpi_handle handle) 395 395 {
+2 -2
drivers/platform/x86/thinkpad_acpi.c
··· 297 297 char param[32]; 298 298 299 299 int (*init) (struct ibm_init_struct *); 300 - mode_t base_procfs_mode; 300 + umode_t base_procfs_mode; 301 301 struct ibm_struct *data; 302 302 }; 303 303 ··· 8542 8542 "%s installed\n", ibm->name); 8543 8543 8544 8544 if (ibm->read) { 8545 - mode_t mode = iibm->base_procfs_mode; 8545 + umode_t mode = iibm->base_procfs_mode; 8546 8546 8547 8547 if (!mode) 8548 8548 mode = S_IRUGO;
+2 -2
drivers/power/power_supply_sysfs.c
··· 176 176 static struct attribute * 177 177 __power_supply_attrs[ARRAY_SIZE(power_supply_attrs) + 1]; 178 178 179 - static mode_t power_supply_attr_is_visible(struct kobject *kobj, 179 + static umode_t power_supply_attr_is_visible(struct kobject *kobj, 180 180 struct attribute *attr, 181 181 int attrno) 182 182 { 183 183 struct device *dev = container_of(kobj, struct device, kobj); 184 184 struct power_supply *psy = dev_get_drvdata(dev); 185 - mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; 185 + umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; 186 186 int i; 187 187 188 188 if (attrno == POWER_SUPPLY_PROP_TYPE)
+2 -3
drivers/s390/block/dasd.c
··· 17 17 #include <linux/ctype.h> 18 18 #include <linux/major.h> 19 19 #include <linux/slab.h> 20 - #include <linux/buffer_head.h> 21 20 #include <linux/hdreg.h> 22 21 #include <linux/async.h> 23 22 #include <linux/mutex.h> ··· 1072 1073 static void dasd_profile_init(struct dasd_profile *profile, 1073 1074 struct dentry *base_dentry) 1074 1075 { 1075 - mode_t mode; 1076 + umode_t mode; 1076 1077 struct dentry *pde; 1077 1078 1078 1079 if (!base_dentry) ··· 1111 1112 1112 1113 static void dasd_statistics_createroot(void) 1113 1114 { 1114 - mode_t mode; 1115 + umode_t mode; 1115 1116 struct dentry *pde; 1116 1117 1117 1118 dasd_debugfs_root_entry = NULL;
+1 -1
drivers/scsi/be2iscsi/be_iscsi.c
··· 733 733 iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); 734 734 } 735 735 736 - mode_t be2iscsi_attr_is_visible(int param_type, int param) 736 + umode_t be2iscsi_attr_is_visible(int param_type, int param) 737 737 { 738 738 switch (param_type) { 739 739 case ISCSI_HOST_PARAM:
+1 -1
drivers/scsi/be2iscsi/be_iscsi.h
··· 26 26 #define BE2_IPV4 0x1 27 27 #define BE2_IPV6 0x10 28 28 29 - mode_t be2iscsi_attr_is_visible(int param_type, int param); 29 + umode_t be2iscsi_attr_is_visible(int param_type, int param); 30 30 31 31 void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, 32 32 struct beiscsi_offload_params *params);
+6 -6
drivers/scsi/be2iscsi/be_main.c
··· 325 325 } 326 326 327 327 328 - static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) 328 + static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type) 329 329 { 330 - int rc; 330 + umode_t rc; 331 331 332 332 switch (type) { 333 333 case ISCSI_BOOT_TGT_NAME: ··· 348 348 return rc; 349 349 } 350 350 351 - static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) 351 + static umode_t beiscsi_ini_get_attr_visibility(void *data, int type) 352 352 { 353 - int rc; 353 + umode_t rc; 354 354 355 355 switch (type) { 356 356 case ISCSI_BOOT_INI_INITIATOR_NAME: ··· 364 364 } 365 365 366 366 367 - static mode_t beiscsi_eth_get_attr_visibility(void *data, int type) 367 + static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) 368 368 { 369 - int rc; 369 + umode_t rc; 370 370 371 371 switch (type) { 372 372 case ISCSI_BOOT_ETH_FLAGS:
+1 -1
drivers/scsi/bfa/bfad_debugfs.c
··· 472 472 473 473 struct bfad_debugfs_entry { 474 474 const char *name; 475 - mode_t mode; 475 + umode_t mode; 476 476 const struct file_operations *fops; 477 477 }; 478 478
+1 -1
drivers/scsi/bnx2i/bnx2i_iscsi.c
··· 2177 2177 return 0; 2178 2178 } 2179 2179 2180 - static mode_t bnx2i_attr_is_visible(int param_type, int param) 2180 + static umode_t bnx2i_attr_is_visible(int param_type, int param) 2181 2181 { 2182 2182 switch (param_type) { 2183 2183 case ISCSI_HOST_PARAM:
+1 -1
drivers/scsi/cxgbi/libcxgbi.c
··· 2569 2569 } 2570 2570 EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); 2571 2571 2572 - mode_t cxgbi_attr_is_visible(int param_type, int param) 2572 + umode_t cxgbi_attr_is_visible(int param_type, int param) 2573 2573 { 2574 2574 switch (param_type) { 2575 2575 case ISCSI_HOST_PARAM:
+1 -1
drivers/scsi/cxgbi/libcxgbi.h
··· 709 709 710 710 void cxgbi_cleanup_task(struct iscsi_task *task); 711 711 712 - mode_t cxgbi_attr_is_visible(int param_type, int param); 712 + umode_t cxgbi_attr_is_visible(int param_type, int param); 713 713 void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *); 714 714 int cxgbi_set_conn_param(struct iscsi_cls_conn *, 715 715 enum iscsi_param, char *, int);
+7 -7
drivers/scsi/iscsi_boot_sysfs.c
··· 112 112 NULL 113 113 }; 114 114 115 - static mode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, 115 + static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, 116 116 struct attribute *attr, int i) 117 117 { 118 118 struct iscsi_boot_kobj *boot_kobj = ··· 193 193 NULL 194 194 }; 195 195 196 - static mode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, 196 + static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, 197 197 struct attribute *attr, int i) 198 198 { 199 199 struct iscsi_boot_kobj *boot_kobj = ··· 265 265 NULL 266 266 }; 267 267 268 - static mode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, 268 + static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, 269 269 struct attribute *attr, int i) 270 270 { 271 271 struct iscsi_boot_kobj *boot_kobj = ··· 306 306 struct attribute_group *attr_group, 307 307 const char *name, int index, void *data, 308 308 ssize_t (*show) (void *data, int type, char *buf), 309 - mode_t (*is_visible) (void *data, int type), 309 + umode_t (*is_visible) (void *data, int type), 310 310 void (*release) (void *data)) 311 311 { 312 312 struct iscsi_boot_kobj *boot_kobj; ··· 369 369 iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, 370 370 void *data, 371 371 ssize_t (*show) (void *data, int type, char *buf), 372 - mode_t (*is_visible) (void *data, int type), 372 + umode_t (*is_visible) (void *data, int type), 373 373 void (*release) (void *data)) 374 374 { 375 375 return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group, ··· 394 394 iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, 395 395 void *data, 396 396 ssize_t (*show) (void *data, int type, char *buf), 397 - mode_t (*is_visible) (void *data, int type), 397 + umode_t (*is_visible) (void *data, int type), 398 398 void (*release) (void *data)) 399 399 { 400 400 return iscsi_boot_create_kobj(boot_kset, ··· 420 420 iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, 421 421 void *data, 422 422 ssize_t (*show) (void *data, int type, char *buf), 423 - mode_t (*is_visible) (void *data, int type), 423 + umode_t (*is_visible) (void *data, int type), 424 424 void (*release) (void *data)) 425 425 { 426 426 return iscsi_boot_create_kobj(boot_kset,
+1 -1
drivers/scsi/iscsi_tcp.c
··· 873 873 iscsi_host_free(shost); 874 874 } 875 875 876 - static mode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) 876 + static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) 877 877 { 878 878 switch (param_type) { 879 879 case ISCSI_HOST_PARAM:
+5 -5
drivers/scsi/qla4xxx/ql4_os.c
··· 128 128 static int qla4xxx_slave_alloc(struct scsi_device *device); 129 129 static int qla4xxx_slave_configure(struct scsi_device *device); 130 130 static void qla4xxx_slave_destroy(struct scsi_device *sdev); 131 - static mode_t ql4_attr_is_visible(int param_type, int param); 131 + static umode_t ql4_attr_is_visible(int param_type, int param); 132 132 static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); 133 133 134 134 static struct qla4_8xxx_legacy_intr_set legacy_intr[] = ··· 197 197 198 198 static struct scsi_transport_template *qla4xxx_scsi_transport; 199 199 200 - static mode_t ql4_attr_is_visible(int param_type, int param) 200 + static umode_t ql4_attr_is_visible(int param_type, int param) 201 201 { 202 202 switch (param_type) { 203 203 case ISCSI_HOST_PARAM: ··· 3039 3039 return rc; 3040 3040 } 3041 3041 3042 - static mode_t qla4xxx_eth_get_attr_visibility(void *data, int type) 3042 + static umode_t qla4xxx_eth_get_attr_visibility(void *data, int type) 3043 3043 { 3044 3044 int rc; 3045 3045 ··· 3073 3073 return rc; 3074 3074 } 3075 3075 3076 - static mode_t qla4xxx_ini_get_attr_visibility(void *data, int type) 3076 + static umode_t qla4xxx_ini_get_attr_visibility(void *data, int type) 3077 3077 { 3078 3078 int rc; 3079 3079 ··· 3160 3160 return qla4xxx_show_boot_tgt_info(boot_sess, type, buf); 3161 3161 } 3162 3162 3163 - static mode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) 3163 + static umode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) 3164 3164 { 3165 3165 int rc; 3166 3166
+4 -4
drivers/scsi/scsi_transport_iscsi.c
··· 328 328 iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); 329 329 iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT); 330 330 331 - static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, 331 + static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj, 332 332 struct attribute *attr, int i) 333 333 { 334 334 struct device *dev = container_of(kobj, struct device, kobj); ··· 2199 2199 NULL, 2200 2200 }; 2201 2201 2202 - static mode_t iscsi_conn_attr_is_visible(struct kobject *kobj, 2202 + static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, 2203 2203 struct attribute *attr, int i) 2204 2204 { 2205 2205 struct device *cdev = container_of(kobj, struct device, kobj); ··· 2370 2370 NULL, 2371 2371 }; 2372 2372 2373 - static mode_t iscsi_session_attr_is_visible(struct kobject *kobj, 2373 + static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, 2374 2374 struct attribute *attr, int i) 2375 2375 { 2376 2376 struct device *cdev = container_of(kobj, struct device, kobj); ··· 2468 2468 NULL, 2469 2469 }; 2470 2470 2471 - static mode_t iscsi_host_attr_is_visible(struct kobject *kobj, 2471 + static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, 2472 2472 struct attribute *attr, int i) 2473 2473 { 2474 2474 struct device *cdev = container_of(kobj, struct device, kobj);
+1 -1
drivers/scsi/scsi_transport_spi.c
··· 1434 1434 (si->f->show_##name ? S_IRUGO : 0) | \ 1435 1435 (si->f->set_##name ? S_IWUSR : 0) 1436 1436 1437 - static mode_t target_attribute_is_visible(struct kobject *kobj, 1437 + static umode_t target_attribute_is_visible(struct kobject *kobj, 1438 1438 struct attribute *attr, int i) 1439 1439 { 1440 1440 struct device *cdev = container_of(kobj, struct device, kobj);
-1
drivers/scsi/scsicam.c
··· 16 16 #include <linux/genhd.h> 17 17 #include <linux/kernel.h> 18 18 #include <linux/blkdev.h> 19 - #include <linux/buffer_head.h> 20 19 #include <asm/unaligned.h> 21 20 22 21 #include <scsi/scsicam.h>
+3 -4
drivers/scsi/sg.c
··· 2325 2325 static int 2326 2326 sg_proc_init(void) 2327 2327 { 2328 - int k, mask; 2329 2328 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); 2330 - struct sg_proc_leaf * leaf; 2329 + int k; 2331 2330 2332 2331 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); 2333 2332 if (!sg_proc_sgp) 2334 2333 return 1; 2335 2334 for (k = 0; k < num_leaves; ++k) { 2336 - leaf = &sg_proc_leaf_arr[k]; 2337 - mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2335 + struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k]; 2336 + umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2338 2337 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); 2339 2338 } 2340 2339 return 0;
+2 -2
drivers/staging/iio/adc/ad7192.c
··· 838 838 NULL 839 839 }; 840 840 841 - static mode_t ad7192_attr_is_visible(struct kobject *kobj, 841 + static umode_t ad7192_attr_is_visible(struct kobject *kobj, 842 842 struct attribute *attr, int n) 843 843 { 844 844 struct device *dev = container_of(kobj, struct device, kobj); 845 845 struct iio_dev *indio_dev = dev_get_drvdata(dev); 846 846 struct ad7192_state *st = iio_priv(indio_dev); 847 847 848 - mode_t mode = attr->mode; 848 + umode_t mode = attr->mode; 849 849 850 850 if ((st->devid != ID_AD7195) && 851 851 (attr == &iio_dev_attr_ac_excitation_en.dev_attr.attr))
+2 -2
drivers/staging/iio/adc/ad7606_core.c
··· 205 205 NULL, 206 206 }; 207 207 208 - static mode_t ad7606_attr_is_visible(struct kobject *kobj, 208 + static umode_t ad7606_attr_is_visible(struct kobject *kobj, 209 209 struct attribute *attr, int n) 210 210 { 211 211 struct device *dev = container_of(kobj, struct device, kobj); 212 212 struct iio_dev *indio_dev = dev_get_drvdata(dev); 213 213 struct ad7606_state *st = iio_priv(indio_dev); 214 214 215 - mode_t mode = attr->mode; 215 + umode_t mode = attr->mode; 216 216 217 217 if (!(gpio_is_valid(st->pdata->gpio_os0) && 218 218 gpio_is_valid(st->pdata->gpio_os1) &&
+2 -2
drivers/staging/iio/dac/ad5446.c
··· 197 197 NULL, 198 198 }; 199 199 200 - static mode_t ad5446_attr_is_visible(struct kobject *kobj, 200 + static umode_t ad5446_attr_is_visible(struct kobject *kobj, 201 201 struct attribute *attr, int n) 202 202 { 203 203 struct device *dev = container_of(kobj, struct device, kobj); 204 204 struct iio_dev *indio_dev = dev_get_drvdata(dev); 205 205 struct ad5446_state *st = iio_priv(indio_dev); 206 206 207 - mode_t mode = attr->mode; 207 + umode_t mode = attr->mode; 208 208 209 209 if (!st->chip_info->store_pwr_down && 210 210 (attr == &iio_dev_attr_out_voltage0_powerdown.dev_attr.attr ||
+2 -2
drivers/staging/iio/dds/ad9834.c
··· 281 281 NULL, 282 282 }; 283 283 284 - static mode_t ad9834_attr_is_visible(struct kobject *kobj, 284 + static umode_t ad9834_attr_is_visible(struct kobject *kobj, 285 285 struct attribute *attr, int n) 286 286 { 287 287 struct device *dev = container_of(kobj, struct device, kobj); 288 288 struct iio_dev *indio_dev = dev_get_drvdata(dev); 289 289 struct ad9834_state *st = iio_priv(indio_dev); 290 290 291 - mode_t mode = attr->mode; 291 + umode_t mode = attr->mode; 292 292 293 293 if (((st->devid == ID_AD9833) || (st->devid == ID_AD9837)) && 294 294 ((attr == &iio_dev_attr_dds0_out1_enable.dev_attr.attr) ||
+6 -5
drivers/staging/pohmelfs/dir.c
··· 590 590 * during writeback for given inode. 591 591 */ 592 592 struct pohmelfs_inode *pohmelfs_create_entry_local(struct pohmelfs_sb *psb, 593 - struct pohmelfs_inode *parent, struct qstr *str, u64 start, int mode) 593 + struct pohmelfs_inode *parent, struct qstr *str, u64 start, umode_t mode) 594 594 { 595 595 struct pohmelfs_inode *npi; 596 596 int err = -ENOMEM; 597 597 struct netfs_inode_info info; 598 598 599 - dprintk("%s: name: '%s', mode: %o, start: %llu.\n", 599 + dprintk("%s: name: '%s', mode: %ho, start: %llu.\n", 600 600 __func__, str->name, mode, start); 601 601 602 602 info.mode = mode; ··· 630 630 /* 631 631 * Create local object and bind it to dentry. 632 632 */ 633 - static int pohmelfs_create_entry(struct inode *dir, struct dentry *dentry, u64 start, int mode) 633 + static int pohmelfs_create_entry(struct inode *dir, struct dentry *dentry, 634 + u64 start, umode_t mode) 634 635 { 635 636 struct pohmelfs_sb *psb = POHMELFS_SB(dir->i_sb); 636 637 struct pohmelfs_inode *npi, *parent; ··· 662 661 /* 663 662 * VFS create and mkdir callbacks. 664 663 */ 665 - static int pohmelfs_create(struct inode *dir, struct dentry *dentry, int mode, 664 + static int pohmelfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 666 665 struct nameidata *nd) 667 666 { 668 667 return pohmelfs_create_entry(dir, dentry, 0, mode); 669 668 } 670 669 671 - static int pohmelfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 670 + static int pohmelfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 672 671 { 673 672 int err; 674 673
+1 -1
drivers/staging/pohmelfs/netfs.h
··· 776 776 void pohmelfs_inode_del_inode(struct pohmelfs_sb *psb, struct pohmelfs_inode *pi); 777 777 778 778 struct pohmelfs_inode *pohmelfs_create_entry_local(struct pohmelfs_sb *psb, 779 - struct pohmelfs_inode *parent, struct qstr *str, u64 start, int mode); 779 + struct pohmelfs_inode *parent, struct qstr *str, u64 start, umode_t mode); 780 780 781 781 int pohmelfs_write_create_inode(struct pohmelfs_inode *pi); 782 782
+1 -1
drivers/tty/sysrq.c
··· 32 32 #include <linux/module.h> 33 33 #include <linux/suspend.h> 34 34 #include <linux/writeback.h> 35 - #include <linux/buffer_head.h> /* for fsync_bdev() */ 36 35 #include <linux/swap.h> 37 36 #include <linux/spinlock.h> 38 37 #include <linux/vt_kern.h> ··· 40 41 #include <linux/oom.h> 41 42 #include <linux/slab.h> 42 43 #include <linux/input.h> 44 + #include <linux/uaccess.h> 43 45 44 46 #include <asm/ptrace.h> 45 47 #include <asm/irq_regs.h>
+1 -1
drivers/tty/tty_io.c
··· 3267 3267 } 3268 3268 } 3269 3269 3270 - static char *tty_devnode(struct device *dev, mode_t *mode) 3270 + static char *tty_devnode(struct device *dev, umode_t *mode) 3271 3271 { 3272 3272 if (!mode) 3273 3273 return NULL;
+1 -1
drivers/usb/class/usblp.c
··· 1045 1045 .llseek = noop_llseek, 1046 1046 }; 1047 1047 1048 - static char *usblp_devnode(struct device *dev, mode_t *mode) 1048 + static char *usblp_devnode(struct device *dev, umode_t *mode) 1049 1049 { 1050 1050 return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); 1051 1051 }
+1 -1
drivers/usb/core/file.c
··· 66 66 struct class *class; 67 67 } *usb_class; 68 68 69 - static char *usb_devnode(struct device *dev, mode_t *mode) 69 + static char *usb_devnode(struct device *dev, umode_t *mode) 70 70 { 71 71 struct usb_class_driver *drv; 72 72
+8 -10
drivers/usb/core/inode.c
··· 270 270 return 0; 271 271 } 272 272 273 - static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t dev) 273 + static struct inode *usbfs_get_inode (struct super_block *sb, umode_t mode, dev_t dev) 274 274 { 275 275 struct inode *inode = new_inode(sb); 276 276 277 277 if (inode) { 278 278 inode->i_ino = get_next_ino(); 279 - inode->i_mode = mode; 280 - inode->i_uid = current_fsuid(); 281 - inode->i_gid = current_fsgid(); 279 + inode_init_owner(inode, NULL, mode); 282 280 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 283 281 switch (mode & S_IFMT) { 284 282 default: ··· 298 300 } 299 301 300 302 /* SMP-safe */ 301 - static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode, 303 + static int usbfs_mknod (struct inode *dir, struct dentry *dentry, umode_t mode, 302 304 dev_t dev) 303 305 { 304 306 struct inode *inode = usbfs_get_inode(dir->i_sb, mode, dev); ··· 315 317 return error; 316 318 } 317 319 318 - static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, int mode) 320 + static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, umode_t mode) 319 321 { 320 322 int res; 321 323 ··· 326 328 return res; 327 329 } 328 330 329 - static int usbfs_create (struct inode *dir, struct dentry *dentry, int mode) 331 + static int usbfs_create (struct inode *dir, struct dentry *dentry, umode_t mode) 330 332 { 331 333 mode = (mode & S_IALLUGO) | S_IFREG; 332 334 return usbfs_mknod (dir, dentry, mode, 0); ··· 487 489 * 488 490 * This function handles both regular files and directories. 489 491 */ 490 - static int fs_create_by_name (const char *name, mode_t mode, 492 + static int fs_create_by_name (const char *name, umode_t mode, 491 493 struct dentry *parent, struct dentry **dentry) 492 494 { 493 495 int error = 0; ··· 511 513 mutex_lock(&parent->d_inode->i_mutex); 512 514 *dentry = lookup_one_len(name, parent, strlen(name)); 513 515 if (!IS_ERR(*dentry)) { 514 - if ((mode & S_IFMT) == S_IFDIR) 516 + if (S_ISDIR(mode)) 515 517 error = usbfs_mkdir (parent->d_inode, *dentry, mode); 516 518 else 517 519 error = usbfs_create (parent->d_inode, *dentry, mode); ··· 522 524 return error; 523 525 } 524 526 525 - static struct dentry *fs_create_file (const char *name, mode_t mode, 527 + static struct dentry *fs_create_file (const char *name, umode_t mode, 526 528 struct dentry *parent, void *data, 527 529 const struct file_operations *fops, 528 530 uid_t uid, gid_t gid)
+2 -2
drivers/usb/core/sysfs.c
··· 642 642 NULL 643 643 }; 644 644 645 - static mode_t dev_string_attrs_are_visible(struct kobject *kobj, 645 + static umode_t dev_string_attrs_are_visible(struct kobject *kobj, 646 646 struct attribute *a, int n) 647 647 { 648 648 struct device *dev = container_of(kobj, struct device, kobj); ··· 877 877 NULL, 878 878 }; 879 879 880 - static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj, 880 + static umode_t intf_assoc_attrs_are_visible(struct kobject *kobj, 881 881 struct attribute *a, int n) 882 882 { 883 883 struct device *dev = container_of(kobj, struct device, kobj);
+1 -1
drivers/usb/core/usb.c
··· 326 326 #endif /* CONFIG_PM */ 327 327 328 328 329 - static char *usb_devnode(struct device *dev, mode_t *mode) 329 + static char *usb_devnode(struct device *dev, umode_t *mode) 330 330 { 331 331 struct usb_device *usb_dev; 332 332
+1 -1
drivers/usb/misc/iowarrior.c
··· 734 734 .llseek = noop_llseek, 735 735 }; 736 736 737 - static char *iowarrior_devnode(struct device *dev, mode_t *mode) 737 + static char *iowarrior_devnode(struct device *dev, umode_t *mode) 738 738 { 739 739 return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); 740 740 }
+1 -1
drivers/usb/misc/legousbtower.c
··· 269 269 .llseek = tower_llseek, 270 270 }; 271 271 272 - static char *legousbtower_devnode(struct device *dev, mode_t *mode) 272 + static char *legousbtower_devnode(struct device *dev, umode_t *mode) 273 273 { 274 274 return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); 275 275 }
+2 -2
fs/9p/v9fs_vfs.h
··· 54 54 55 55 struct inode *v9fs_alloc_inode(struct super_block *sb); 56 56 void v9fs_destroy_inode(struct inode *inode); 57 - struct inode *v9fs_get_inode(struct super_block *sb, int mode, dev_t); 57 + struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t); 58 58 int v9fs_init_inode(struct v9fs_session_info *v9ses, 59 - struct inode *inode, int mode, dev_t); 59 + struct inode *inode, umode_t mode, dev_t); 60 60 void v9fs_evict_inode(struct inode *inode); 61 61 ino_t v9fs_qid2ino(struct p9_qid *qid); 62 62 void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
+21 -24
fs/9p/vfs_inode.c
··· 59 59 * 60 60 */ 61 61 62 - static int unixmode2p9mode(struct v9fs_session_info *v9ses, int mode) 62 + static u32 unixmode2p9mode(struct v9fs_session_info *v9ses, umode_t mode) 63 63 { 64 64 int res; 65 65 res = mode & 0777; 66 66 if (S_ISDIR(mode)) 67 67 res |= P9_DMDIR; 68 68 if (v9fs_proto_dotu(v9ses)) { 69 - if (S_ISLNK(mode)) 70 - res |= P9_DMSYMLINK; 71 69 if (v9ses->nodev == 0) { 72 70 if (S_ISSOCK(mode)) 73 71 res |= P9_DMSOCKET; ··· 83 85 res |= P9_DMSETGID; 84 86 if ((mode & S_ISVTX) == S_ISVTX) 85 87 res |= P9_DMSETVTX; 86 - if ((mode & P9_DMLINK)) 87 - res |= P9_DMLINK; 88 88 } 89 - 90 89 return res; 91 90 } 92 91 ··· 94 99 * @rdev: major number, minor number in case of device files. 95 100 * 96 101 */ 97 - static int p9mode2unixmode(struct v9fs_session_info *v9ses, 98 - struct p9_wstat *stat, dev_t *rdev) 102 + static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses, 103 + struct p9_wstat *stat, dev_t *rdev) 99 104 { 100 105 int res; 101 - int mode = stat->mode; 106 + u32 mode = stat->mode; 102 107 103 108 res = mode & S_IALLUGO; 104 109 *rdev = 0; ··· 255 260 } 256 261 257 262 int v9fs_init_inode(struct v9fs_session_info *v9ses, 258 - struct inode *inode, int mode, dev_t rdev) 263 + struct inode *inode, umode_t mode, dev_t rdev) 259 264 { 260 265 int err = 0; 261 266 ··· 329 334 330 335 break; 331 336 default: 332 - P9_DPRINTK(P9_DEBUG_ERROR, "BAD mode 0x%x S_IFMT 0x%x\n", 337 + P9_DPRINTK(P9_DEBUG_ERROR, "BAD mode 0x%hx S_IFMT 0x%x\n", 333 338 mode, mode & S_IFMT); 334 339 err = -EINVAL; 335 340 goto error; ··· 346 351 * 347 352 */ 348 353 349 - struct inode *v9fs_get_inode(struct super_block *sb, int mode, dev_t rdev) 354 + struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev) 350 355 { 351 356 int err; 352 357 struct inode *inode; 353 358 struct v9fs_session_info *v9ses = sb->s_fs_info; 354 359 355 - P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode); 360 + P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %ho\n", sb, mode); 356 361 357 362 inode = new_inode(sb); 358 363 if (!inode) { ··· 486 491 int new) 487 492 { 488 493 dev_t rdev; 489 - int retval, umode; 494 + int retval; 495 + umode_t umode; 490 496 unsigned long i_ino; 491 497 struct inode *inode; 492 498 struct v9fs_session_info *v9ses = sb->s_fs_info; ··· 698 702 */ 699 703 700 704 static int 701 - v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode, 705 + v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 702 706 struct nameidata *nd) 703 707 { 704 708 int err; ··· 781 785 * 782 786 */ 783 787 784 - static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 788 + static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 785 789 { 786 790 int err; 787 791 u32 perm; ··· 1126 1130 v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode, 1127 1131 struct super_block *sb) 1128 1132 { 1129 - mode_t mode; 1133 + umode_t mode; 1130 1134 char ext[32]; 1131 1135 char tag_name[14]; 1132 1136 unsigned int i_nlink; ··· 1299 1303 */ 1300 1304 1301 1305 static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry, 1302 - int mode, const char *extension) 1306 + u32 perm, const char *extension) 1303 1307 { 1304 - u32 perm; 1305 1308 struct p9_fid *fid; 1306 1309 struct v9fs_session_info *v9ses; 1307 1310 ··· 1310 1315 return -EPERM; 1311 1316 } 1312 1317 1313 - perm = unixmode2p9mode(v9ses, mode); 1314 1318 fid = v9fs_create(v9ses, dir, dentry, (char *) extension, perm, 1315 1319 P9_OREAD); 1316 1320 if (IS_ERR(fid)) ··· 1336 1342 P9_DPRINTK(P9_DEBUG_VFS, " %lu,%s,%s\n", dir->i_ino, 1337 1343 dentry->d_name.name, symname); 1338 1344 1339 - return v9fs_vfs_mkspecial(dir, dentry, S_IFLNK, symname); 1345 + return v9fs_vfs_mkspecial(dir, dentry, P9_DMSYMLINK, symname); 1340 1346 } 1341 1347 1342 1348 /** ··· 1391 1397 */ 1392 1398 1393 1399 static int 1394 - v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 1400 + v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 1395 1401 { 1402 + struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir); 1396 1403 int retval; 1397 1404 char *name; 1405 + u32 perm; 1398 1406 1399 1407 P9_DPRINTK(P9_DEBUG_VFS, 1400 - " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", dir->i_ino, 1408 + " %lu,%s mode: %hx MAJOR: %u MINOR: %u\n", dir->i_ino, 1401 1409 dentry->d_name.name, mode, MAJOR(rdev), MINOR(rdev)); 1402 1410 1403 1411 if (!new_valid_dev(rdev)) ··· 1422 1426 return -EINVAL; 1423 1427 } 1424 1428 1425 - retval = v9fs_vfs_mkspecial(dir, dentry, mode, name); 1429 + perm = unixmode2p9mode(v9ses, mode); 1430 + retval = v9fs_vfs_mkspecial(dir, dentry, perm, name); 1426 1431 __putname(name); 1427 1432 1428 1433 return retval;
+7 -7
fs/9p/vfs_inode_dotl.c
··· 48 48 #include "acl.h" 49 49 50 50 static int 51 - v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, 51 + v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, 52 52 dev_t rdev); 53 53 54 54 /** ··· 253 253 */ 254 254 255 255 static int 256 - v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, 256 + v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, 257 257 struct nameidata *nd) 258 258 { 259 259 int err = 0; ··· 284 284 285 285 name = (char *) dentry->d_name.name; 286 286 P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x " 287 - "mode:0x%x\n", name, flags, omode); 287 + "mode:0x%hx\n", name, flags, omode); 288 288 289 289 dfid = v9fs_fid_lookup(dentry->d_parent); 290 290 if (IS_ERR(dfid)) { ··· 395 395 */ 396 396 397 397 static int v9fs_vfs_mkdir_dotl(struct inode *dir, 398 - struct dentry *dentry, int omode) 398 + struct dentry *dentry, umode_t omode) 399 399 { 400 400 int err; 401 401 struct v9fs_session_info *v9ses; ··· 594 594 void 595 595 v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode) 596 596 { 597 - mode_t mode; 597 + umode_t mode; 598 598 struct v9fs_inode *v9inode = V9FS_I(inode); 599 599 600 600 if ((stat->st_result_mask & P9_STATS_BASIC) == P9_STATS_BASIC) { ··· 799 799 * 800 800 */ 801 801 static int 802 - v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, 802 + v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, 803 803 dev_t rdev) 804 804 { 805 805 int err; ··· 814 814 struct posix_acl *dacl = NULL, *pacl = NULL; 815 815 816 816 P9_DPRINTK(P9_DEBUG_VFS, 817 - " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", dir->i_ino, 817 + " %lu,%s mode: %hx MAJOR: %u MINOR: %u\n", dir->i_ino, 818 818 dentry->d_name.name, omode, MAJOR(rdev), MINOR(rdev)); 819 819 820 820 if (!new_valid_dev(rdev))
+1 -1
fs/9p/vfs_super.c
··· 117 117 struct inode *inode = NULL; 118 118 struct dentry *root = NULL; 119 119 struct v9fs_session_info *v9ses = NULL; 120 - int mode = S_IRWXUGO | S_ISVTX; 120 + umode_t mode = S_IRWXUGO | S_ISVTX; 121 121 struct p9_fid *fid; 122 122 int retval = 0; 123 123
-8
fs/Kconfig
··· 266 266 267 267 endif # NETWORK_FILESYSTEMS 268 268 269 - if BLOCK 270 - menu "Partition Types" 271 - 272 - source "fs/partitions/Kconfig" 273 - 274 - endmenu 275 - endif 276 - 277 269 source "fs/nls/Kconfig" 278 270 source "fs/dlm/Kconfig" 279 271
-1
fs/Makefile
··· 54 54 obj-y += quota/ 55 55 56 56 obj-$(CONFIG_PROC_FS) += proc/ 57 - obj-y += partitions/ 58 57 obj-$(CONFIG_SYSFS) += sysfs/ 59 58 obj-$(CONFIG_CONFIGFS_FS) += configfs/ 60 59 obj-y += devpts/
+3 -3
fs/affs/affs.h
··· 136 136 extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh); 137 137 extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh); 138 138 extern void secs_to_datestamp(time_t secs, struct affs_date *ds); 139 - extern mode_t prot_to_mode(u32 prot); 139 + extern umode_t prot_to_mode(u32 prot); 140 140 extern void mode_to_prot(struct inode *inode); 141 141 extern void affs_error(struct super_block *sb, const char *function, const char *fmt, ...); 142 142 extern void affs_warning(struct super_block *sb, const char *function, const char *fmt, ...); ··· 156 156 extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); 157 157 extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *); 158 158 extern int affs_unlink(struct inode *dir, struct dentry *dentry); 159 - extern int affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *); 160 - extern int affs_mkdir(struct inode *dir, struct dentry *dentry, int mode); 159 + extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *); 160 + extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 161 161 extern int affs_rmdir(struct inode *dir, struct dentry *dentry); 162 162 extern int affs_link(struct dentry *olddentry, struct inode *dir, 163 163 struct dentry *dentry);
+3 -3
fs/affs/amigaffs.c
··· 390 390 ds->ticks = cpu_to_be32(secs * 50); 391 391 } 392 392 393 - mode_t 393 + umode_t 394 394 prot_to_mode(u32 prot) 395 395 { 396 - int mode = 0; 396 + umode_t mode = 0; 397 397 398 398 if (!(prot & FIBF_NOWRITE)) 399 399 mode |= S_IWUSR; ··· 421 421 mode_to_prot(struct inode *inode) 422 422 { 423 423 u32 prot = AFFS_I(inode)->i_protect; 424 - mode_t mode = inode->i_mode; 424 + umode_t mode = inode->i_mode; 425 425 426 426 if (!(mode & S_IXUSR)) 427 427 prot |= FIBF_NOEXECUTE;
+4 -4
fs/affs/namei.c
··· 255 255 } 256 256 257 257 int 258 - affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) 258 + affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) 259 259 { 260 260 struct super_block *sb = dir->i_sb; 261 261 struct inode *inode; 262 262 int error; 263 263 264 - pr_debug("AFFS: create(%lu,\"%.*s\",0%o)\n",dir->i_ino,(int)dentry->d_name.len, 264 + pr_debug("AFFS: create(%lu,\"%.*s\",0%ho)\n",dir->i_ino,(int)dentry->d_name.len, 265 265 dentry->d_name.name,mode); 266 266 267 267 inode = affs_new_inode(dir); ··· 285 285 } 286 286 287 287 int 288 - affs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 288 + affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 289 289 { 290 290 struct inode *inode; 291 291 int error; 292 292 293 - pr_debug("AFFS: mkdir(%lu,\"%.*s\",0%o)\n",dir->i_ino, 293 + pr_debug("AFFS: mkdir(%lu,\"%.*s\",0%ho)\n",dir->i_ino, 294 294 (int)dentry->d_name.len,dentry->d_name.name,mode); 295 295 296 296 inode = affs_new_inode(dir);
+6 -6
fs/afs/dir.c
··· 28 28 static void afs_d_release(struct dentry *dentry); 29 29 static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, 30 30 loff_t fpos, u64 ino, unsigned dtype); 31 - static int afs_create(struct inode *dir, struct dentry *dentry, int mode, 31 + static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 32 32 struct nameidata *nd); 33 - static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode); 33 + static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 34 34 static int afs_rmdir(struct inode *dir, struct dentry *dentry); 35 35 static int afs_unlink(struct inode *dir, struct dentry *dentry); 36 36 static int afs_link(struct dentry *from, struct inode *dir, ··· 764 764 /* 765 765 * create a directory on an AFS filesystem 766 766 */ 767 - static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 767 + static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 768 768 { 769 769 struct afs_file_status status; 770 770 struct afs_callback cb; ··· 777 777 778 778 dvnode = AFS_FS_I(dir); 779 779 780 - _enter("{%x:%u},{%s},%o", 780 + _enter("{%x:%u},{%s},%ho", 781 781 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); 782 782 783 783 ret = -ENAMETOOLONG; ··· 948 948 /* 949 949 * create a regular file on an AFS filesystem 950 950 */ 951 - static int afs_create(struct inode *dir, struct dentry *dentry, int mode, 951 + static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 952 952 struct nameidata *nd) 953 953 { 954 954 struct afs_file_status status; ··· 962 962 963 963 dvnode = AFS_FS_I(dir); 964 964 965 - _enter("{%x:%u},{%s},%o,", 965 + _enter("{%x:%u},{%s},%ho,", 966 966 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); 967 967 968 968 ret = -ENAMETOOLONG;
+2 -2
fs/attr.c
··· 166 166 int notify_change(struct dentry * dentry, struct iattr * attr) 167 167 { 168 168 struct inode *inode = dentry->d_inode; 169 - mode_t mode = inode->i_mode; 169 + umode_t mode = inode->i_mode; 170 170 int error; 171 171 struct timespec now; 172 172 unsigned int ia_valid = attr->ia_valid; ··· 177 177 } 178 178 179 179 if ((ia_valid & ATTR_MODE)) { 180 - mode_t amode = attr->ia_mode; 180 + umode_t amode = attr->ia_mode; 181 181 /* Flag setting protected by i_mutex */ 182 182 if (is_sxid(amode)) 183 183 inode->i_flags &= ~S_NOSEC;
+1 -1
fs/autofs4/autofs_i.h
··· 155 155 return 0; 156 156 } 157 157 158 - struct inode *autofs4_get_inode(struct super_block *, mode_t); 158 + struct inode *autofs4_get_inode(struct super_block *, umode_t); 159 159 void autofs4_free_ino(struct autofs_info *); 160 160 161 161 /* Expiration */
+1 -1
fs/autofs4/inode.c
··· 326 326 return -EINVAL; 327 327 } 328 328 329 - struct inode *autofs4_get_inode(struct super_block *sb, mode_t mode) 329 + struct inode *autofs4_get_inode(struct super_block *sb, umode_t mode) 330 330 { 331 331 struct inode *inode = new_inode(sb); 332 332
+2 -2
fs/autofs4/root.c
··· 26 26 static int autofs4_dir_symlink(struct inode *,struct dentry *,const char *); 27 27 static int autofs4_dir_unlink(struct inode *,struct dentry *); 28 28 static int autofs4_dir_rmdir(struct inode *,struct dentry *); 29 - static int autofs4_dir_mkdir(struct inode *,struct dentry *,int); 29 + static int autofs4_dir_mkdir(struct inode *,struct dentry *,umode_t); 30 30 static long autofs4_root_ioctl(struct file *,unsigned int,unsigned long); 31 31 #ifdef CONFIG_COMPAT 32 32 static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long); ··· 699 699 return 0; 700 700 } 701 701 702 - static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode) 702 + static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 703 703 { 704 704 struct autofs_sb_info *sbi = autofs4_sbi(dir->i_sb); 705 705 struct autofs_info *ino = autofs4_dentry_ino(dentry);
+3 -3
fs/bad_inode.c
··· 173 173 }; 174 174 175 175 static int bad_inode_create (struct inode *dir, struct dentry *dentry, 176 - int mode, struct nameidata *nd) 176 + umode_t mode, struct nameidata *nd) 177 177 { 178 178 return -EIO; 179 179 } ··· 202 202 } 203 203 204 204 static int bad_inode_mkdir(struct inode *dir, struct dentry *dentry, 205 - int mode) 205 + umode_t mode) 206 206 { 207 207 return -EIO; 208 208 } ··· 213 213 } 214 214 215 215 static int bad_inode_mknod (struct inode *dir, struct dentry *dentry, 216 - int mode, dev_t rdev) 216 + umode_t mode, dev_t rdev) 217 217 { 218 218 return -EIO; 219 219 }
+1 -1
fs/bfs/dir.c
··· 84 84 85 85 extern void dump_imap(const char *, struct super_block *); 86 86 87 - static int bfs_create(struct inode *dir, struct dentry *dentry, int mode, 87 + static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 88 88 struct nameidata *nd) 89 89 { 90 90 int err;
+27 -3
fs/block_dev.c
··· 17 17 #include <linux/module.h> 18 18 #include <linux/blkpg.h> 19 19 #include <linux/buffer_head.h> 20 + #include <linux/swap.h> 20 21 #include <linux/pagevec.h> 21 22 #include <linux/writeback.h> 22 23 #include <linux/mpage.h> ··· 26 25 #include <linux/namei.h> 27 26 #include <linux/log2.h> 28 27 #include <linux/kmemleak.h> 28 + #include <linux/cleancache.h> 29 29 #include <asm/uaccess.h> 30 30 #include "internal.h" 31 31 ··· 84 82 } 85 83 86 84 /* Kill _all_ buffers and pagecache , dirty or not.. */ 87 - static void kill_bdev(struct block_device *bdev) 85 + void kill_bdev(struct block_device *bdev) 88 86 { 89 - if (bdev->bd_inode->i_mapping->nrpages == 0) 87 + struct address_space *mapping = bdev->bd_inode->i_mapping; 88 + 89 + if (mapping->nrpages == 0) 90 90 return; 91 + 91 92 invalidate_bh_lrus(); 92 - truncate_inode_pages(bdev->bd_inode->i_mapping, 0); 93 + truncate_inode_pages(mapping, 0); 93 94 } 95 + EXPORT_SYMBOL(kill_bdev); 96 + 97 + /* Invalidate clean unused buffers and pagecache. */ 98 + void invalidate_bdev(struct block_device *bdev) 99 + { 100 + struct address_space *mapping = bdev->bd_inode->i_mapping; 101 + 102 + if (mapping->nrpages == 0) 103 + return; 104 + 105 + invalidate_bh_lrus(); 106 + lru_add_drain_all(); /* make sure all lru add caches are flushed */ 107 + invalidate_mapping_pages(mapping, 0, -1); 108 + /* 99% of the time, we don't need to flush the cleancache on the bdev. 109 + * But, for the strange corners, lets be cautious 110 + */ 111 + cleancache_flush_inode(mapping); 112 + } 113 + EXPORT_SYMBOL(invalidate_bdev); 94 114 95 115 int set_blocksize(struct block_device *bdev, int size) 96 116 {
+5 -5
fs/btrfs/inode.c
··· 4412 4412 struct btrfs_root *root, 4413 4413 struct inode *dir, 4414 4414 const char *name, int name_len, 4415 - u64 ref_objectid, u64 objectid, int mode, 4416 - u64 *index) 4415 + u64 ref_objectid, u64 objectid, 4416 + umode_t mode, u64 *index) 4417 4417 { 4418 4418 struct inode *inode; 4419 4419 struct btrfs_inode_item *inode_item; ··· 4596 4596 } 4597 4597 4598 4598 static int btrfs_mknod(struct inode *dir, struct dentry *dentry, 4599 - int mode, dev_t rdev) 4599 + umode_t mode, dev_t rdev) 4600 4600 { 4601 4601 struct btrfs_trans_handle *trans; 4602 4602 struct btrfs_root *root = BTRFS_I(dir)->root; ··· 4665 4665 } 4666 4666 4667 4667 static int btrfs_create(struct inode *dir, struct dentry *dentry, 4668 - int mode, struct nameidata *nd) 4668 + umode_t mode, struct nameidata *nd) 4669 4669 { 4670 4670 struct btrfs_trans_handle *trans; 4671 4671 struct btrfs_root *root = BTRFS_I(dir)->root; ··· 4792 4792 return err; 4793 4793 } 4794 4794 4795 - static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 4795 + static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 4796 4796 { 4797 4797 struct inode *inode = NULL; 4798 4798 struct btrfs_trans_handle *trans;
-50
fs/buffer.c
··· 41 41 #include <linux/bitops.h> 42 42 #include <linux/mpage.h> 43 43 #include <linux/bit_spinlock.h> 44 - #include <linux/cleancache.h> 45 44 46 45 static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); 47 46 ··· 229 230 out: 230 231 return ret; 231 232 } 232 - 233 - /* If invalidate_buffers() will trash dirty buffers, it means some kind 234 - of fs corruption is going on. Trashing dirty data always imply losing 235 - information that was supposed to be just stored on the physical layer 236 - by the user. 237 - 238 - Thus invalidate_buffers in general usage is not allwowed to trash 239 - dirty buffers. For example ioctl(FLSBLKBUF) expects dirty data to 240 - be preserved. These buffers are simply skipped. 241 - 242 - We also skip buffers which are still in use. For example this can 243 - happen if a userspace program is reading the block device. 244 - 245 - NOTE: In the case where the user removed a removable-media-disk even if 246 - there's still dirty data not synced on disk (due a bug in the device driver 247 - or due an error of the user), by not destroying the dirty buffers we could 248 - generate corruption also on the next media inserted, thus a parameter is 249 - necessary to handle this case in the most safe way possible (trying 250 - to not corrupt also the new disk inserted with the data belonging to 251 - the old now corrupted disk). Also for the ramdisk the natural thing 252 - to do in order to release the ramdisk memory is to destroy dirty buffers. 253 - 254 - These are two special cases. Normal usage imply the device driver 255 - to issue a sync on the device (without waiting I/O completion) and 256 - then an invalidate_buffers call that doesn't trash dirty buffers. 257 - 258 - For handling cache coherency with the blkdev pagecache the 'update' case 259 - is been introduced. It is needed to re-read from disk any pinned 260 - buffer. NOTE: re-reading from disk is destructive so we can do it only 261 - when we assume nobody is changing the buffercache under our I/O and when 262 - we think the disk contains more recent information than the buffercache. 263 - The update == 1 pass marks the buffers we need to update, the update == 2 264 - pass does the actual I/O. */ 265 - void invalidate_bdev(struct block_device *bdev) 266 - { 267 - struct address_space *mapping = bdev->bd_inode->i_mapping; 268 - 269 - if (mapping->nrpages == 0) 270 - return; 271 - 272 - invalidate_bh_lrus(); 273 - lru_add_drain_all(); /* make sure all lru add caches are flushed */ 274 - invalidate_mapping_pages(mapping, 0, -1); 275 - /* 99% of the time, we don't need to flush the cleancache on the bdev. 276 - * But, for the strange corners, lets be cautious 277 - */ 278 - cleancache_flush_inode(mapping); 279 - } 280 - EXPORT_SYMBOL(invalidate_bdev); 281 233 282 234 /* 283 235 * Kick the writeback threads then try to free up some ZONE_NORMAL memory.
-1
fs/cachefiles/interface.c
··· 11 11 12 12 #include <linux/slab.h> 13 13 #include <linux/mount.h> 14 - #include <linux/buffer_head.h> 15 14 #include "internal.h" 16 15 17 16 #define list_to_page(head) (list_entry((head)->prev, struct page, lru))
+2 -2
fs/ceph/caps.c
··· 928 928 u64 size, u64 max_size, 929 929 struct timespec *mtime, struct timespec *atime, 930 930 u64 time_warp_seq, 931 - uid_t uid, gid_t gid, mode_t mode, 931 + uid_t uid, gid_t gid, umode_t mode, 932 932 u64 xattr_version, 933 933 struct ceph_buffer *xattrs_buf, 934 934 u64 follows) ··· 1078 1078 u64 size, max_size; 1079 1079 struct timespec mtime, atime; 1080 1080 int wake = 0; 1081 - mode_t mode; 1081 + umode_t mode; 1082 1082 uid_t uid; 1083 1083 gid_t gid; 1084 1084 struct ceph_mds_session *session;
+6 -6
fs/ceph/dir.c
··· 666 666 } 667 667 668 668 static int ceph_mknod(struct inode *dir, struct dentry *dentry, 669 - int mode, dev_t rdev) 669 + umode_t mode, dev_t rdev) 670 670 { 671 671 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); 672 672 struct ceph_mds_client *mdsc = fsc->mdsc; ··· 676 676 if (ceph_snap(dir) != CEPH_NOSNAP) 677 677 return -EROFS; 678 678 679 - dout("mknod in dir %p dentry %p mode 0%o rdev %d\n", 679 + dout("mknod in dir %p dentry %p mode 0%ho rdev %d\n", 680 680 dir, dentry, mode, rdev); 681 681 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); 682 682 if (IS_ERR(req)) { ··· 699 699 return err; 700 700 } 701 701 702 - static int ceph_create(struct inode *dir, struct dentry *dentry, int mode, 702 + static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, 703 703 struct nameidata *nd) 704 704 { 705 705 dout("create in dir %p dentry %p name '%.*s'\n", ··· 753 753 return err; 754 754 } 755 755 756 - static int ceph_mkdir(struct inode *dir, struct dentry *dentry, int mode) 756 + static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 757 757 { 758 758 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); 759 759 struct ceph_mds_client *mdsc = fsc->mdsc; ··· 767 767 dout("mksnap dir %p snap '%.*s' dn %p\n", dir, 768 768 dentry->d_name.len, dentry->d_name.name, dentry); 769 769 } else if (ceph_snap(dir) == CEPH_NOSNAP) { 770 - dout("mkdir dir %p dn %p mode 0%o\n", dir, dentry, mode); 770 + dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode); 771 771 op = CEPH_MDS_OP_MKDIR; 772 772 } else { 773 773 goto out; ··· 870 870 } else if (ceph_snap(dir) == CEPH_NOSNAP) { 871 871 dout("unlink/rmdir dir %p dn %p inode %p\n", 872 872 dir, dentry, inode); 873 - op = ((dentry->d_inode->i_mode & S_IFMT) == S_IFDIR) ? 873 + op = S_ISDIR(dentry->d_inode->i_mode) ? 874 874 CEPH_MDS_OP_RMDIR : CEPH_MDS_OP_UNLINK; 875 875 } else 876 876 goto out;
+1 -1
fs/ceph/super.h
··· 136 136 int issued, dirty; 137 137 struct ceph_snap_context *context; 138 138 139 - mode_t mode; 139 + umode_t mode; 140 140 uid_t uid; 141 141 gid_t gid; 142 142
+2 -2
fs/cifs/cifs_fs_sb.h
··· 59 59 gid_t mnt_gid; 60 60 uid_t mnt_backupuid; 61 61 gid_t mnt_backupgid; 62 - mode_t mnt_file_mode; 63 - mode_t mnt_dir_mode; 62 + umode_t mnt_file_mode; 63 + umode_t mnt_dir_mode; 64 64 unsigned int mnt_cifs_flags; 65 65 char *mountdata; /* options received at mount time or via DFS refs */ 66 66 struct backing_dev_info bdi;
+1 -1
fs/cifs/cifsfs.c
··· 393 393 cifs_show_address(s, tcon->ses->server); 394 394 395 395 if (!tcon->unix_ext) 396 - seq_printf(s, ",file_mode=0%o,dir_mode=0%o", 396 + seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho", 397 397 cifs_sb->mnt_file_mode, 398 398 cifs_sb->mnt_dir_mode); 399 399 if (tcon->seal)
+3 -3
fs/cifs/cifsfs.h
··· 44 44 /* Functions related to inodes */ 45 45 extern const struct inode_operations cifs_dir_inode_ops; 46 46 extern struct inode *cifs_root_iget(struct super_block *); 47 - extern int cifs_create(struct inode *, struct dentry *, int, 47 + extern int cifs_create(struct inode *, struct dentry *, umode_t, 48 48 struct nameidata *); 49 49 extern struct dentry *cifs_lookup(struct inode *, struct dentry *, 50 50 struct nameidata *); 51 51 extern int cifs_unlink(struct inode *dir, struct dentry *dentry); 52 52 extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); 53 - extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); 54 - extern int cifs_mkdir(struct inode *, struct dentry *, int); 53 + extern int cifs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 54 + extern int cifs_mkdir(struct inode *, struct dentry *, umode_t); 55 55 extern int cifs_rmdir(struct inode *, struct dentry *); 56 56 extern int cifs_rename(struct inode *, struct dentry *, struct inode *, 57 57 struct dentry *);
+2 -2
fs/cifs/cifsglob.h
··· 169 169 gid_t linux_gid; 170 170 uid_t backupuid; 171 171 gid_t backupgid; 172 - mode_t file_mode; 173 - mode_t dir_mode; 172 + umode_t file_mode; 173 + umode_t dir_mode; 174 174 unsigned secFlg; 175 175 bool retry:1; 176 176 bool intr:1;
+1 -1
fs/cifs/connect.c
··· 2819 2819 cifs_sb->mnt_backupgid = pvolume_info->backupgid; 2820 2820 cifs_sb->mnt_file_mode = pvolume_info->file_mode; 2821 2821 cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; 2822 - cFYI(1, "file mode: 0x%x dir mode: 0x%x", 2822 + cFYI(1, "file mode: 0x%hx dir mode: 0x%hx", 2823 2823 cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); 2824 2824 2825 2825 cifs_sb->actimeo = pvolume_info->actimeo;
+2 -2
fs/cifs/dir.c
··· 136 136 /* Inode operations in similar order to how they appear in Linux file fs.h */ 137 137 138 138 int 139 - cifs_create(struct inode *inode, struct dentry *direntry, int mode, 139 + cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode, 140 140 struct nameidata *nd) 141 141 { 142 142 int rc = -ENOENT; ··· 355 355 return rc; 356 356 } 357 357 358 - int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, 358 + int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode, 359 359 dev_t device_number) 360 360 { 361 361 int rc = -EPERM;
+2 -2
fs/cifs/inode.c
··· 1264 1264 return rc; 1265 1265 } 1266 1266 1267 - int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) 1267 + int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode) 1268 1268 { 1269 1269 int rc = 0, tmprc; 1270 1270 int xid; ··· 1275 1275 struct inode *newinode = NULL; 1276 1276 struct cifs_fattr fattr; 1277 1277 1278 - cFYI(1, "In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode); 1278 + cFYI(1, "In cifs_mkdir, mode = 0x%hx inode = 0x%p", mode, inode); 1279 1279 1280 1280 cifs_sb = CIFS_SB(inode->i_sb); 1281 1281 tlink = cifs_sb_tlink(cifs_sb);
+4 -4
fs/coda/dir.c
··· 30 30 #include "coda_int.h" 31 31 32 32 /* dir inode-ops */ 33 - static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd); 33 + static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd); 34 34 static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); 35 35 static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, 36 36 struct dentry *entry); 37 37 static int coda_unlink(struct inode *dir_inode, struct dentry *entry); 38 38 static int coda_symlink(struct inode *dir_inode, struct dentry *entry, 39 39 const char *symname); 40 - static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, int mode); 40 + static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, umode_t mode); 41 41 static int coda_rmdir(struct inode *dir_inode, struct dentry *entry); 42 42 static int coda_rename(struct inode *old_inode, struct dentry *old_dentry, 43 43 struct inode *new_inode, struct dentry *new_dentry); ··· 191 191 } 192 192 193 193 /* creation routines: create, mknod, mkdir, link, symlink */ 194 - static int coda_create(struct inode *dir, struct dentry *de, int mode, struct nameidata *nd) 194 + static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd) 195 195 { 196 196 int error; 197 197 const char *name=de->d_name.name; ··· 223 223 return error; 224 224 } 225 225 226 - static int coda_mkdir(struct inode *dir, struct dentry *de, int mode) 226 + static int coda_mkdir(struct inode *dir, struct dentry *de, umode_t mode) 227 227 { 228 228 struct inode *inode; 229 229 struct coda_vattr attrs;
+2 -2
fs/compat.c
··· 1281 1281 * O_LARGEFILE flag. 1282 1282 */ 1283 1283 asmlinkage long 1284 - compat_sys_open(const char __user *filename, int flags, int mode) 1284 + compat_sys_open(const char __user *filename, int flags, umode_t mode) 1285 1285 { 1286 1286 return do_sys_open(AT_FDCWD, filename, flags, mode); 1287 1287 } ··· 1291 1291 * O_LARGEFILE flag. 1292 1292 */ 1293 1293 asmlinkage long 1294 - compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, int mode) 1294 + compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, umode_t mode) 1295 1295 { 1296 1296 return do_sys_open(dfd, filename, flags, mode); 1297 1297 }
+2 -2
fs/configfs/configfs_internal.h
··· 63 63 64 64 extern int configfs_is_root(struct config_item *item); 65 65 66 - extern struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent *); 67 - extern int configfs_create(struct dentry *, int mode, int (*init)(struct inode *)); 66 + extern struct inode * configfs_new_inode(umode_t mode, struct configfs_dirent *); 67 + extern int configfs_create(struct dentry *, umode_t mode, int (*init)(struct inode *)); 68 68 extern int configfs_inode_init(void); 69 69 extern void configfs_inode_exit(void); 70 70
+1 -1
fs/configfs/dir.c
··· 1170 1170 } 1171 1171 EXPORT_SYMBOL(configfs_undepend_item); 1172 1172 1173 - static int configfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1173 + static int configfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 1174 1174 { 1175 1175 int ret = 0; 1176 1176 int module_got = 0;
+3 -3
fs/configfs/inode.c
··· 116 116 return error; 117 117 } 118 118 119 - static inline void set_default_inode_attr(struct inode * inode, mode_t mode) 119 + static inline void set_default_inode_attr(struct inode * inode, umode_t mode) 120 120 { 121 121 inode->i_mode = mode; 122 122 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; ··· 132 132 inode->i_ctime = iattr->ia_ctime; 133 133 } 134 134 135 - struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent * sd) 135 + struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent * sd) 136 136 { 137 137 struct inode * inode = new_inode(configfs_sb); 138 138 if (inode) { ··· 185 185 186 186 #endif /* CONFIG_LOCKDEP */ 187 187 188 - int configfs_create(struct dentry * dentry, int mode, int (*init)(struct inode *)) 188 + int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct inode *)) 189 189 { 190 190 int error = 0; 191 191 struct inode * inode = NULL;
+1 -2
fs/cramfs/inode.c
··· 20 20 #include <linux/cramfs_fs.h> 21 21 #include <linux/slab.h> 22 22 #include <linux/cramfs_fs_sb.h> 23 - #include <linux/buffer_head.h> 24 23 #include <linux/vfs.h> 25 24 #include <linux/mutex.h> 26 25 ··· 377 378 unsigned long nextoffset; 378 379 char *name; 379 380 ino_t ino; 380 - mode_t mode; 381 + umode_t mode; 381 382 int namelen, error; 382 383 383 384 mutex_lock(&read_mutex);
+11 -11
fs/debugfs/file.c
··· 95 95 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 96 96 * code. 97 97 */ 98 - struct dentry *debugfs_create_u8(const char *name, mode_t mode, 98 + struct dentry *debugfs_create_u8(const char *name, umode_t mode, 99 99 struct dentry *parent, u8 *value) 100 100 { 101 101 /* if there are no write bits set, make read only */ ··· 147 147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 148 148 * code. 149 149 */ 150 - struct dentry *debugfs_create_u16(const char *name, mode_t mode, 150 + struct dentry *debugfs_create_u16(const char *name, umode_t mode, 151 151 struct dentry *parent, u16 *value) 152 152 { 153 153 /* if there are no write bits set, make read only */ ··· 199 199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 200 200 * code. 201 201 */ 202 - struct dentry *debugfs_create_u32(const char *name, mode_t mode, 202 + struct dentry *debugfs_create_u32(const char *name, umode_t mode, 203 203 struct dentry *parent, u32 *value) 204 204 { 205 205 /* if there are no write bits set, make read only */ ··· 252 252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 253 253 * code. 254 254 */ 255 - struct dentry *debugfs_create_u64(const char *name, mode_t mode, 255 + struct dentry *debugfs_create_u64(const char *name, umode_t mode, 256 256 struct dentry *parent, u64 *value) 257 257 { 258 258 /* if there are no write bits set, make read only */ ··· 298 298 * @value: a pointer to the variable that the file should read to and write 299 299 * from. 300 300 */ 301 - struct dentry *debugfs_create_x8(const char *name, mode_t mode, 301 + struct dentry *debugfs_create_x8(const char *name, umode_t mode, 302 302 struct dentry *parent, u8 *value) 303 303 { 304 304 /* if there are no write bits set, make read only */ ··· 322 322 * @value: a pointer to the variable that the file should read to and write 323 323 * from. 324 324 */ 325 - struct dentry *debugfs_create_x16(const char *name, mode_t mode, 325 + struct dentry *debugfs_create_x16(const char *name, umode_t mode, 326 326 struct dentry *parent, u16 *value) 327 327 { 328 328 /* if there are no write bits set, make read only */ ··· 346 346 * @value: a pointer to the variable that the file should read to and write 347 347 * from. 348 348 */ 349 - struct dentry *debugfs_create_x32(const char *name, mode_t mode, 349 + struct dentry *debugfs_create_x32(const char *name, umode_t mode, 350 350 struct dentry *parent, u32 *value) 351 351 { 352 352 /* if there are no write bits set, make read only */ ··· 370 370 * @value: a pointer to the variable that the file should read to and write 371 371 * from. 372 372 */ 373 - struct dentry *debugfs_create_x64(const char *name, mode_t mode, 373 + struct dentry *debugfs_create_x64(const char *name, umode_t mode, 374 374 struct dentry *parent, u64 *value) 375 375 { 376 376 return debugfs_create_file(name, mode, parent, value, &fops_x64); ··· 401 401 * @value: a pointer to the variable that the file should read to and write 402 402 * from. 403 403 */ 404 - struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 404 + struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 405 405 struct dentry *parent, size_t *value) 406 406 { 407 407 return debugfs_create_file(name, mode, parent, value, &fops_size_t); ··· 473 473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 474 474 * code. 475 475 */ 476 - struct dentry *debugfs_create_bool(const char *name, mode_t mode, 476 + struct dentry *debugfs_create_bool(const char *name, umode_t mode, 477 477 struct dentry *parent, u32 *value) 478 478 { 479 479 return debugfs_create_file(name, mode, parent, value, &fops_bool); ··· 518 518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 519 519 * code. 520 520 */ 521 - struct dentry *debugfs_create_blob(const char *name, mode_t mode, 521 + struct dentry *debugfs_create_blob(const char *name, umode_t mode, 522 522 struct dentry *parent, 523 523 struct debugfs_blob_wrapper *blob) 524 524 {
+7 -7
fs/debugfs/inode.c
··· 30 30 static int debugfs_mount_count; 31 31 static bool debugfs_registered; 32 32 33 - static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev, 33 + static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev_t dev, 34 34 void *data, const struct file_operations *fops) 35 35 36 36 { ··· 69 69 70 70 /* SMP-safe */ 71 71 static int debugfs_mknod(struct inode *dir, struct dentry *dentry, 72 - int mode, dev_t dev, void *data, 72 + umode_t mode, dev_t dev, void *data, 73 73 const struct file_operations *fops) 74 74 { 75 75 struct inode *inode; ··· 87 87 return error; 88 88 } 89 89 90 - static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode, 90 + static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode, 91 91 void *data, const struct file_operations *fops) 92 92 { 93 93 int res; ··· 101 101 return res; 102 102 } 103 103 104 - static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode, 104 + static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode, 105 105 void *data, const struct file_operations *fops) 106 106 { 107 107 mode = (mode & S_IALLUGO) | S_IFLNK; 108 108 return debugfs_mknod(dir, dentry, mode, 0, data, fops); 109 109 } 110 110 111 - static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode, 111 + static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 112 112 void *data, const struct file_operations *fops) 113 113 { 114 114 int res; ··· 146 146 .kill_sb = kill_litter_super, 147 147 }; 148 148 149 - static int debugfs_create_by_name(const char *name, mode_t mode, 149 + static int debugfs_create_by_name(const char *name, umode_t mode, 150 150 struct dentry *parent, 151 151 struct dentry **dentry, 152 152 void *data, ··· 214 214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be 215 215 * returned. 216 216 */ 217 - struct dentry *debugfs_create_file(const char *name, mode_t mode, 217 + struct dentry *debugfs_create_file(const char *name, umode_t mode, 218 218 struct dentry *parent, void *data, 219 219 const struct file_operations *fops) 220 220 {
+5 -24
fs/ecryptfs/inode.c
··· 144 144 } 145 145 146 146 /** 147 - * ecryptfs_create_underlying_file 148 - * @lower_dir_inode: inode of the parent in the lower fs of the new file 149 - * @dentry: New file's dentry 150 - * @mode: The mode of the new file 151 - * 152 - * Creates the file in the lower file system. 153 - * 154 - * Returns zero on success; non-zero on error condition 155 - */ 156 - static int 157 - ecryptfs_create_underlying_file(struct inode *lower_dir_inode, 158 - struct dentry *dentry, int mode) 159 - { 160 - struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); 161 - return vfs_create(lower_dir_inode, lower_dentry, mode, NULL); 162 - } 163 - 164 - /** 165 147 * ecryptfs_do_create 166 148 * @directory_inode: inode of the new file's dentry's parent in ecryptfs 167 149 * @ecryptfs_dentry: New file's dentry in ecryptfs ··· 158 176 */ 159 177 static struct inode * 160 178 ecryptfs_do_create(struct inode *directory_inode, 161 - struct dentry *ecryptfs_dentry, int mode) 179 + struct dentry *ecryptfs_dentry, umode_t mode) 162 180 { 163 181 int rc; 164 182 struct dentry *lower_dentry; ··· 173 191 inode = ERR_CAST(lower_dir_dentry); 174 192 goto out; 175 193 } 176 - rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode, 177 - ecryptfs_dentry, mode); 194 + rc = vfs_create(lower_dir_dentry->d_inode, lower_dentry, mode, NULL); 178 195 if (rc) { 179 196 printk(KERN_ERR "%s: Failure to create dentry in lower fs; " 180 197 "rc = [%d]\n", __func__, rc); ··· 248 267 */ 249 268 static int 250 269 ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, 251 - int mode, struct nameidata *nd) 270 + umode_t mode, struct nameidata *nd) 252 271 { 253 272 struct inode *ecryptfs_inode; 254 273 int rc; ··· 540 559 return rc; 541 560 } 542 561 543 - static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 562 + static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 544 563 { 545 564 int rc; 546 565 struct dentry *lower_dentry; ··· 588 607 } 589 608 590 609 static int 591 - ecryptfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 610 + ecryptfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 592 611 { 593 612 int rc; 594 613 struct dentry *lower_dentry;
+1 -1
fs/exofs/dir.c
··· 234 234 static inline 235 235 void exofs_set_de_type(struct exofs_dir_entry *de, struct inode *inode) 236 236 { 237 - mode_t mode = inode->i_mode; 237 + umode_t mode = inode->i_mode; 238 238 de->file_type = exofs_type_by_mode[(mode & S_IFMT) >> S_SHIFT]; 239 239 } 240 240
+1 -1
fs/exofs/exofs.h
··· 154 154 loff_t pos, unsigned len, unsigned flags, 155 155 struct page **pagep, void **fsdata); 156 156 extern struct inode *exofs_iget(struct super_block *, unsigned long); 157 - struct inode *exofs_new_inode(struct inode *, int); 157 + struct inode *exofs_new_inode(struct inode *, umode_t); 158 158 extern int exofs_write_inode(struct inode *, struct writeback_control *wbc); 159 159 extern void exofs_evict_inode(struct inode *); 160 160
+1 -1
fs/exofs/inode.c
··· 1276 1276 /* 1277 1277 * Set up a new inode and create an object for it on the OSD 1278 1278 */ 1279 - struct inode *exofs_new_inode(struct inode *dir, int mode) 1279 + struct inode *exofs_new_inode(struct inode *dir, umode_t mode) 1280 1280 { 1281 1281 struct super_block *sb = dir->i_sb; 1282 1282 struct exofs_sb_info *sbi = sb->s_fs_info;
+3 -3
fs/exofs/namei.c
··· 59 59 return d_splice_alias(inode, dentry); 60 60 } 61 61 62 - static int exofs_create(struct inode *dir, struct dentry *dentry, int mode, 62 + static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 63 63 struct nameidata *nd) 64 64 { 65 65 struct inode *inode = exofs_new_inode(dir, mode); ··· 74 74 return err; 75 75 } 76 76 77 - static int exofs_mknod(struct inode *dir, struct dentry *dentry, int mode, 77 + static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 78 78 dev_t rdev) 79 79 { 80 80 struct inode *inode; ··· 153 153 return exofs_add_nondir(dentry, inode); 154 154 } 155 155 156 - static int exofs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 156 + static int exofs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 157 157 { 158 158 struct inode *inode; 159 159 int err = -EMLINK;
+1 -1
fs/ext2/dir.c
··· 279 279 280 280 static inline void ext2_set_de_type(ext2_dirent *de, struct inode *inode) 281 281 { 282 - mode_t mode = inode->i_mode; 282 + umode_t mode = inode->i_mode; 283 283 if (EXT2_HAS_INCOMPAT_FEATURE(inode->i_sb, EXT2_FEATURE_INCOMPAT_FILETYPE)) 284 284 de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; 285 285 else
+1 -1
fs/ext2/ext2.h
··· 110 110 extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *, int); 111 111 112 112 /* ialloc.c */ 113 - extern struct inode * ext2_new_inode (struct inode *, int, const struct qstr *); 113 + extern struct inode * ext2_new_inode (struct inode *, umode_t, const struct qstr *); 114 114 extern void ext2_free_inode (struct inode *); 115 115 extern unsigned long ext2_count_free_inodes (struct super_block *); 116 116 extern void ext2_check_inodes_bitmap (struct super_block *);
+1 -1
fs/ext2/ialloc.c
··· 429 429 return group; 430 430 } 431 431 432 - struct inode *ext2_new_inode(struct inode *dir, int mode, 432 + struct inode *ext2_new_inode(struct inode *dir, umode_t mode, 433 433 const struct qstr *qstr) 434 434 { 435 435 struct super_block *sb;
+3 -3
fs/ext2/namei.c
··· 94 94 * If the create succeeds, we fill in the inode information 95 95 * with d_instantiate(). 96 96 */ 97 - static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) 97 + static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) 98 98 { 99 99 struct inode *inode; 100 100 ··· 119 119 return ext2_add_nondir(dentry, inode); 120 120 } 121 121 122 - static int ext2_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 122 + static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) 123 123 { 124 124 struct inode * inode; 125 125 int err; ··· 214 214 return err; 215 215 } 216 216 217 - static int ext2_mkdir(struct inode * dir, struct dentry * dentry, int mode) 217 + static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) 218 218 { 219 219 struct inode * inode; 220 220 int err = -EMLINK;
+1 -1
fs/ext3/ialloc.c
··· 371 371 * group to find a free inode. 372 372 */ 373 373 struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, 374 - const struct qstr *qstr, int mode) 374 + const struct qstr *qstr, umode_t mode) 375 375 { 376 376 struct super_block *sb; 377 377 struct buffer_head *bitmap_bh = NULL;
+3 -3
fs/ext3/namei.c
··· 1698 1698 * If the create succeeds, we fill in the inode information 1699 1699 * with d_instantiate(). 1700 1700 */ 1701 - static int ext3_create (struct inode * dir, struct dentry * dentry, int mode, 1701 + static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode, 1702 1702 struct nameidata *nd) 1703 1703 { 1704 1704 handle_t *handle; ··· 1732 1732 } 1733 1733 1734 1734 static int ext3_mknod (struct inode * dir, struct dentry *dentry, 1735 - int mode, dev_t rdev) 1735 + umode_t mode, dev_t rdev) 1736 1736 { 1737 1737 handle_t *handle; 1738 1738 struct inode *inode; ··· 1768 1768 return err; 1769 1769 } 1770 1770 1771 - static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode) 1771 + static int ext3_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) 1772 1772 { 1773 1773 handle_t *handle; 1774 1774 struct inode * inode;
+1 -1
fs/ext4/ext4.h
··· 1819 1819 dx_hash_info *hinfo); 1820 1820 1821 1821 /* ialloc.c */ 1822 - extern struct inode *ext4_new_inode(handle_t *, struct inode *, int, 1822 + extern struct inode *ext4_new_inode(handle_t *, struct inode *, umode_t, 1823 1823 const struct qstr *qstr, __u32 goal, 1824 1824 uid_t *owner); 1825 1825 extern void ext4_free_inode(handle_t *, struct inode *);
+4 -4
fs/ext4/ialloc.c
··· 351 351 */ 352 352 353 353 static int find_group_orlov(struct super_block *sb, struct inode *parent, 354 - ext4_group_t *group, int mode, 354 + ext4_group_t *group, umode_t mode, 355 355 const struct qstr *qstr) 356 356 { 357 357 ext4_group_t parent_group = EXT4_I(parent)->i_block_group; ··· 497 497 } 498 498 499 499 static int find_group_other(struct super_block *sb, struct inode *parent, 500 - ext4_group_t *group, int mode) 500 + ext4_group_t *group, umode_t mode) 501 501 { 502 502 ext4_group_t parent_group = EXT4_I(parent)->i_block_group; 503 503 ext4_group_t i, last, ngroups = ext4_get_groups_count(sb); ··· 602 602 */ 603 603 static int ext4_claim_inode(struct super_block *sb, 604 604 struct buffer_head *inode_bitmap_bh, 605 - unsigned long ino, ext4_group_t group, int mode) 605 + unsigned long ino, ext4_group_t group, umode_t mode) 606 606 { 607 607 int free = 0, retval = 0, count; 608 608 struct ext4_sb_info *sbi = EXT4_SB(sb); ··· 690 690 * For other inodes, search forward from the parent directory's block 691 691 * group to find a free inode. 692 692 */ 693 - struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, 693 + struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, umode_t mode, 694 694 const struct qstr *qstr, __u32 goal, uid_t *owner) 695 695 { 696 696 struct super_block *sb;
+3 -3
fs/ext4/namei.c
··· 1736 1736 * If the create succeeds, we fill in the inode information 1737 1737 * with d_instantiate(). 1738 1738 */ 1739 - static int ext4_create(struct inode *dir, struct dentry *dentry, int mode, 1739 + static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode, 1740 1740 struct nameidata *nd) 1741 1741 { 1742 1742 handle_t *handle; ··· 1770 1770 } 1771 1771 1772 1772 static int ext4_mknod(struct inode *dir, struct dentry *dentry, 1773 - int mode, dev_t rdev) 1773 + umode_t mode, dev_t rdev) 1774 1774 { 1775 1775 handle_t *handle; 1776 1776 struct inode *inode; ··· 1806 1806 return err; 1807 1807 } 1808 1808 1809 - static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1809 + static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 1810 1810 { 1811 1811 handle_t *handle; 1812 1812 struct inode *inode;
+3 -3
fs/fat/fat.h
··· 141 141 static inline int fat_mode_can_hold_ro(struct inode *inode) 142 142 { 143 143 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); 144 - mode_t mask; 144 + umode_t mask; 145 145 146 146 if (S_ISDIR(inode->i_mode)) { 147 147 if (!sbi->options.rodir) ··· 156 156 } 157 157 158 158 /* Convert attribute bits and a mask to the UNIX mode. */ 159 - static inline mode_t fat_make_mode(struct msdos_sb_info *sbi, 160 - u8 attrs, mode_t mode) 159 + static inline umode_t fat_make_mode(struct msdos_sb_info *sbi, 160 + u8 attrs, umode_t mode) 161 161 { 162 162 if (attrs & ATTR_RO && !((attrs & ATTR_DIR) && !sbi->options.rodir)) 163 163 mode &= ~S_IWUGO;
+2 -2
fs/fat/file.c
··· 314 314 static int fat_sanitize_mode(const struct msdos_sb_info *sbi, 315 315 struct inode *inode, umode_t *mode_ptr) 316 316 { 317 - mode_t mask, perm; 317 + umode_t mask, perm; 318 318 319 319 /* 320 320 * Note, the basic check is already done by a caller of ··· 351 351 352 352 static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode) 353 353 { 354 - mode_t allow_utime = sbi->options.allow_utime; 354 + umode_t allow_utime = sbi->options.allow_utime; 355 355 356 356 if (current_fsuid() != inode->i_uid) { 357 357 if (in_group_p(inode->i_gid))
+2 -2
fs/fat/namei_msdos.c
··· 264 264 } 265 265 266 266 /***** Create a file */ 267 - static int msdos_create(struct inode *dir, struct dentry *dentry, int mode, 267 + static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, 268 268 struct nameidata *nd) 269 269 { 270 270 struct super_block *sb = dir->i_sb; ··· 346 346 } 347 347 348 348 /***** Make a directory */ 349 - static int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode) 349 + static int msdos_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 350 350 { 351 351 struct super_block *sb = dir->i_sb; 352 352 struct fat_slot_info sinfo;
+2 -2
fs/fat/namei_vfat.c
··· 781 781 return ERR_PTR(err); 782 782 } 783 783 784 - static int vfat_create(struct inode *dir, struct dentry *dentry, int mode, 784 + static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, 785 785 struct nameidata *nd) 786 786 { 787 787 struct super_block *sb = dir->i_sb; ··· 870 870 return err; 871 871 } 872 872 873 - static int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode) 873 + static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 874 874 { 875 875 struct super_block *sb = dir->i_sb; 876 876 struct inode *inode;
+2 -2
fs/freevxfs/vxfs_inode.c
··· 187 187 * vxfs_transmod returns a Linux mode_t for a given 188 188 * VxFS inode structure. 189 189 */ 190 - static __inline__ mode_t 190 + static __inline__ umode_t 191 191 vxfs_transmod(struct vxfs_inode_info *vip) 192 192 { 193 - mode_t ret = vip->vii_mode & ~VXFS_TYPE_MASK; 193 + umode_t ret = vip->vii_mode & ~VXFS_TYPE_MASK; 194 194 195 195 if (VXFS_ISFIFO(vip)) 196 196 ret |= S_IFIFO;
-1
fs/fs-writeback.c
··· 25 25 #include <linux/writeback.h> 26 26 #include <linux/blkdev.h> 27 27 #include <linux/backing-dev.h> 28 - #include <linux/buffer_head.h> 29 28 #include <linux/tracepoint.h> 30 29 #include "internal.h" 31 30
+6 -6
fs/fuse/dir.c
··· 369 369 * If the filesystem doesn't support this, then fall back to separate 370 370 * 'mknod' + 'open' requests. 371 371 */ 372 - static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, 373 - struct nameidata *nd) 372 + static int fuse_create_open(struct inode *dir, struct dentry *entry, 373 + umode_t mode, struct nameidata *nd) 374 374 { 375 375 int err; 376 376 struct inode *inode; ··· 480 480 */ 481 481 static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, 482 482 struct inode *dir, struct dentry *entry, 483 - int mode) 483 + umode_t mode) 484 484 { 485 485 struct fuse_entry_out outarg; 486 486 struct inode *inode; ··· 547 547 return err; 548 548 } 549 549 550 - static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode, 550 + static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode, 551 551 dev_t rdev) 552 552 { 553 553 struct fuse_mknod_in inarg; ··· 573 573 return create_new_entry(fc, req, dir, entry, mode); 574 574 } 575 575 576 - static int fuse_create(struct inode *dir, struct dentry *entry, int mode, 576 + static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, 577 577 struct nameidata *nd) 578 578 { 579 579 if (nd) { ··· 585 585 return fuse_mknod(dir, entry, mode, 0); 586 586 } 587 587 588 - static int fuse_mkdir(struct inode *dir, struct dentry *entry, int mode) 588 + static int fuse_mkdir(struct inode *dir, struct dentry *entry, umode_t mode) 589 589 { 590 590 struct fuse_mkdir_in inarg; 591 591 struct fuse_conn *fc = get_fuse_conn(dir);
+1 -1
fs/fuse/fuse_i.h
··· 80 80 81 81 /** The sticky bit in inode->i_mode may have been removed, so 82 82 preserve the original mode */ 83 - mode_t orig_i_mode; 83 + umode_t orig_i_mode; 84 84 85 85 /** Version of last attribute change */ 86 86 u64 attr_version;
+8 -8
fs/gfs2/inode.c
··· 333 333 */ 334 334 335 335 static int create_ok(struct gfs2_inode *dip, const struct qstr *name, 336 - unsigned int mode) 336 + umode_t mode) 337 337 { 338 338 int error; 339 339 ··· 364 364 return 0; 365 365 } 366 366 367 - static void munge_mode_uid_gid(struct gfs2_inode *dip, unsigned int *mode, 367 + static void munge_mode_uid_gid(struct gfs2_inode *dip, umode_t *mode, 368 368 unsigned int *uid, unsigned int *gid) 369 369 { 370 370 if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir && ··· 447 447 */ 448 448 449 449 static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, 450 - const struct gfs2_inum_host *inum, unsigned int mode, 450 + const struct gfs2_inum_host *inum, umode_t mode, 451 451 unsigned int uid, unsigned int gid, 452 452 const u64 *generation, dev_t dev, const char *symname, 453 453 unsigned size, struct buffer_head **bhp) ··· 516 516 } 517 517 518 518 static int make_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, 519 - unsigned int mode, const struct gfs2_inum_host *inum, 519 + umode_t mode, const struct gfs2_inum_host *inum, 520 520 const u64 *generation, dev_t dev, const char *symname, 521 521 unsigned int size, struct buffer_head **bhp) 522 522 { ··· 659 659 */ 660 660 661 661 static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, 662 - unsigned int mode, dev_t dev, const char *symname, 662 + umode_t mode, dev_t dev, const char *symname, 663 663 unsigned int size, int excl) 664 664 { 665 665 const struct qstr *name = &dentry->d_name; ··· 760 760 */ 761 761 762 762 static int gfs2_create(struct inode *dir, struct dentry *dentry, 763 - int mode, struct nameidata *nd) 763 + umode_t mode, struct nameidata *nd) 764 764 { 765 765 int excl = 0; 766 766 if (nd && (nd->flags & LOOKUP_EXCL)) ··· 1129 1129 * Returns: errno 1130 1130 */ 1131 1131 1132 - static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1132 + static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 1133 1133 { 1134 1134 return gfs2_create_inode(dir, dentry, S_IFDIR | mode, 0, NULL, 0, 0); 1135 1135 } ··· 1143 1143 * 1144 1144 */ 1145 1145 1146 - static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, 1146 + static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 1147 1147 dev_t dev) 1148 1148 { 1149 1149 return gfs2_create_inode(dir, dentry, mode, dev, NULL, 0, 0);
+2 -2
fs/hfs/dir.c
··· 186 186 * a directory and return a corresponding inode, given the inode for 187 187 * the directory and the name (and its length) of the new file. 188 188 */ 189 - static int hfs_create(struct inode *dir, struct dentry *dentry, int mode, 189 + static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 190 190 struct nameidata *nd) 191 191 { 192 192 struct inode *inode; ··· 216 216 * in a directory, given the inode for the parent directory and the 217 217 * name (and its length) of the new directory. 218 218 */ 219 - static int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 219 + static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 220 220 { 221 221 struct inode *inode; 222 222 int res;
+1 -1
fs/hfs/hfs_fs.h
··· 184 184 extern const struct address_space_operations hfs_aops; 185 185 extern const struct address_space_operations hfs_btree_aops; 186 186 187 - extern struct inode *hfs_new_inode(struct inode *, struct qstr *, int); 187 + extern struct inode *hfs_new_inode(struct inode *, struct qstr *, umode_t); 188 188 extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *); 189 189 extern int hfs_write_inode(struct inode *, struct writeback_control *); 190 190 extern int hfs_inode_setattr(struct dentry *, struct iattr *);
+1 -1
fs/hfs/inode.c
··· 169 169 /* 170 170 * hfs_new_inode 171 171 */ 172 - struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode) 172 + struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, umode_t mode) 173 173 { 174 174 struct super_block *sb = dir->i_sb; 175 175 struct inode *inode = new_inode(sb);
+3 -3
fs/hfsplus/dir.c
··· 424 424 } 425 425 426 426 static int hfsplus_mknod(struct inode *dir, struct dentry *dentry, 427 - int mode, dev_t rdev) 427 + umode_t mode, dev_t rdev) 428 428 { 429 429 struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); 430 430 struct inode *inode; ··· 453 453 return res; 454 454 } 455 455 456 - static int hfsplus_create(struct inode *dir, struct dentry *dentry, int mode, 456 + static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode, 457 457 struct nameidata *nd) 458 458 { 459 459 return hfsplus_mknod(dir, dentry, mode, 0); 460 460 } 461 461 462 - static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, int mode) 462 + static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 463 463 { 464 464 return hfsplus_mknod(dir, dentry, mode | S_IFDIR, 0); 465 465 }
+1 -1
fs/hfsplus/hfsplus_fs.h
··· 402 402 void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *); 403 403 int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *); 404 404 int hfsplus_cat_write_inode(struct inode *); 405 - struct inode *hfsplus_new_inode(struct super_block *, int); 405 + struct inode *hfsplus_new_inode(struct super_block *, umode_t); 406 406 void hfsplus_delete_inode(struct inode *); 407 407 int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, 408 408 int datasync);
+1 -1
fs/hfsplus/inode.c
··· 378 378 .unlocked_ioctl = hfsplus_ioctl, 379 379 }; 380 380 381 - struct inode *hfsplus_new_inode(struct super_block *sb, int mode) 381 + struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode) 382 382 { 383 383 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); 384 384 struct inode *inode = new_inode(sb);
+1 -1
fs/hostfs/hostfs.h
··· 39 39 40 40 struct hostfs_iattr { 41 41 unsigned int ia_valid; 42 - mode_t ia_mode; 42 + unsigned short ia_mode; 43 43 uid_t ia_uid; 44 44 gid_t ia_gid; 45 45 loff_t ia_size;
+3 -3
fs/hostfs/hostfs_kern.c
··· 551 551 return 0; 552 552 } 553 553 554 - int hostfs_create(struct inode *dir, struct dentry *dentry, int mode, 554 + int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 555 555 struct nameidata *nd) 556 556 { 557 557 struct inode *inode; ··· 676 676 return err; 677 677 } 678 678 679 - int hostfs_mkdir(struct inode *ino, struct dentry *dentry, int mode) 679 + int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode) 680 680 { 681 681 char *file; 682 682 int err; ··· 700 700 return err; 701 701 } 702 702 703 - int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 703 + static int hostfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 704 704 { 705 705 struct inode *inode; 706 706 char *name;
+3 -3
fs/hpfs/namei.c
··· 8 8 #include <linux/sched.h> 9 9 #include "hpfs_fn.h" 10 10 11 - static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 11 + static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 12 12 { 13 13 const unsigned char *name = dentry->d_name.name; 14 14 unsigned len = dentry->d_name.len; ··· 115 115 return err; 116 116 } 117 117 118 - static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) 118 + static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) 119 119 { 120 120 const unsigned char *name = dentry->d_name.name; 121 121 unsigned len = dentry->d_name.len; ··· 201 201 return err; 202 202 } 203 203 204 - static int hpfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 204 + static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 205 205 { 206 206 const unsigned char *name = dentry->d_name.name; 207 207 unsigned len = dentry->d_name.len;
+34 -29
fs/hugetlbfs/inode.c
··· 447 447 return 0; 448 448 } 449 449 450 - static struct inode *hugetlbfs_get_inode(struct super_block *sb, uid_t uid, 451 - gid_t gid, int mode, dev_t dev) 450 + static struct inode *hugetlbfs_get_root(struct super_block *sb, 451 + struct hugetlbfs_config *config) 452 452 { 453 453 struct inode *inode; 454 454 ··· 456 456 if (inode) { 457 457 struct hugetlbfs_inode_info *info; 458 458 inode->i_ino = get_next_ino(); 459 - inode->i_mode = mode; 460 - inode->i_uid = uid; 461 - inode->i_gid = gid; 459 + inode->i_mode = S_IFDIR | config->mode; 460 + inode->i_uid = config->uid; 461 + inode->i_gid = config->gid; 462 + inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 463 + info = HUGETLBFS_I(inode); 464 + mpol_shared_policy_init(&info->policy, NULL); 465 + inode->i_op = &hugetlbfs_dir_inode_operations; 466 + inode->i_fop = &simple_dir_operations; 467 + /* directory inodes start off with i_nlink == 2 (for "." entry) */ 468 + inc_nlink(inode); 469 + } 470 + return inode; 471 + } 472 + 473 + static struct inode *hugetlbfs_get_inode(struct super_block *sb, 474 + struct inode *dir, 475 + umode_t mode, dev_t dev) 476 + { 477 + struct inode *inode; 478 + 479 + inode = new_inode(sb); 480 + if (inode) { 481 + struct hugetlbfs_inode_info *info; 482 + inode->i_ino = get_next_ino(); 483 + inode_init_owner(inode, dir, mode); 462 484 inode->i_mapping->a_ops = &hugetlbfs_aops; 463 485 inode->i_mapping->backing_dev_info =&hugetlbfs_backing_dev_info; 464 486 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; ··· 522 500 * File creation. Allocate an inode, and we're done.. 523 501 */ 524 502 static int hugetlbfs_mknod(struct inode *dir, 525 - struct dentry *dentry, int mode, dev_t dev) 503 + struct dentry *dentry, umode_t mode, dev_t dev) 526 504 { 527 505 struct inode *inode; 528 506 int error = -ENOSPC; 529 - gid_t gid; 530 507 531 - if (dir->i_mode & S_ISGID) { 532 - gid = dir->i_gid; 533 - if (S_ISDIR(mode)) 534 - mode |= S_ISGID; 535 - } else { 536 - gid = current_fsgid(); 537 - } 538 - inode = hugetlbfs_get_inode(dir->i_sb, current_fsuid(), gid, mode, dev); 508 + inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev); 539 509 if (inode) { 540 510 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 541 511 d_instantiate(dentry, inode); ··· 537 523 return error; 538 524 } 539 525 540 - static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 526 + static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 541 527 { 542 528 int retval = hugetlbfs_mknod(dir, dentry, mode | S_IFDIR, 0); 543 529 if (!retval) ··· 545 531 return retval; 546 532 } 547 533 548 - static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) 534 + static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) 549 535 { 550 536 return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0); 551 537 } ··· 555 541 { 556 542 struct inode *inode; 557 543 int error = -ENOSPC; 558 - gid_t gid; 559 544 560 - if (dir->i_mode & S_ISGID) 561 - gid = dir->i_gid; 562 - else 563 - gid = current_fsgid(); 564 - 565 - inode = hugetlbfs_get_inode(dir->i_sb, current_fsuid(), 566 - gid, S_IFLNK|S_IRWXUGO, 0); 545 + inode = hugetlbfs_get_inode(dir->i_sb, dir, S_IFLNK|S_IRWXUGO, 0); 567 546 if (inode) { 568 547 int l = strlen(symname)+1; 569 548 error = page_symlink(inode, symname, l); ··· 864 857 sb->s_magic = HUGETLBFS_MAGIC; 865 858 sb->s_op = &hugetlbfs_ops; 866 859 sb->s_time_gran = 1; 867 - inode = hugetlbfs_get_inode(sb, config.uid, config.gid, 868 - S_IFDIR | config.mode, 0); 860 + inode = hugetlbfs_get_root(sb, &config); 869 861 if (!inode) 870 862 goto out_free; 871 863 ··· 962 956 963 957 path.mnt = mntget(hugetlbfs_vfsmount); 964 958 error = -ENOSPC; 965 - inode = hugetlbfs_get_inode(root->d_sb, current_fsuid(), 966 - current_fsgid(), S_IFREG | S_IRWXUGO, 0); 959 + inode = hugetlbfs_get_inode(root->d_sb, NULL, S_IFREG | S_IRWXUGO, 0); 967 960 if (!inode) 968 961 goto out_dentry; 969 962
+1 -1
fs/inode.c
··· 1646 1646 * @mode: mode of the new inode 1647 1647 */ 1648 1648 void inode_init_owner(struct inode *inode, const struct inode *dir, 1649 - mode_t mode) 1649 + umode_t mode) 1650 1650 { 1651 1651 inode->i_uid = current_fsuid(); 1652 1652 if (dir && dir->i_mode & S_ISGID) {
+1 -1
fs/internal.h
··· 88 88 extern void release_open_intent(struct nameidata *); 89 89 struct open_flags { 90 90 int open_flag; 91 - int mode; 91 + umode_t mode; 92 92 int acc_mode; 93 93 int intent; 94 94 };
+2 -2
fs/isofs/inode.c
··· 169 169 unsigned char map; 170 170 unsigned char check; 171 171 unsigned int blocksize; 172 - mode_t fmode; 173 - mode_t dmode; 172 + umode_t fmode; 173 + umode_t dmode; 174 174 gid_t gid; 175 175 uid_t uid; 176 176 char *iocharset;
+3 -3
fs/isofs/isofs.h
··· 50 50 unsigned int s_uid_set:1; 51 51 unsigned int s_gid_set:1; 52 52 53 - mode_t s_fmode; 54 - mode_t s_dmode; 53 + umode_t s_fmode; 54 + umode_t s_dmode; 55 55 gid_t s_gid; 56 56 uid_t s_uid; 57 57 struct nls_table *s_nls_iocharset; /* Native language support table */ 58 58 }; 59 59 60 - #define ISOFS_INVALID_MODE ((mode_t) -1) 60 + #define ISOFS_INVALID_MODE ((umode_t) -1) 61 61 62 62 static inline struct isofs_sb_info *ISOFS_SB(struct super_block *sb) 63 63 {
+7 -7
fs/jffs2/dir.c
··· 22 22 23 23 static int jffs2_readdir (struct file *, void *, filldir_t); 24 24 25 - static int jffs2_create (struct inode *,struct dentry *,int, 25 + static int jffs2_create (struct inode *,struct dentry *,umode_t, 26 26 struct nameidata *); 27 27 static struct dentry *jffs2_lookup (struct inode *,struct dentry *, 28 28 struct nameidata *); 29 29 static int jffs2_link (struct dentry *,struct inode *,struct dentry *); 30 30 static int jffs2_unlink (struct inode *,struct dentry *); 31 31 static int jffs2_symlink (struct inode *,struct dentry *,const char *); 32 - static int jffs2_mkdir (struct inode *,struct dentry *,int); 32 + static int jffs2_mkdir (struct inode *,struct dentry *,umode_t); 33 33 static int jffs2_rmdir (struct inode *,struct dentry *); 34 - static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t); 34 + static int jffs2_mknod (struct inode *,struct dentry *,umode_t,dev_t); 35 35 static int jffs2_rename (struct inode *, struct dentry *, 36 36 struct inode *, struct dentry *); 37 37 ··· 169 169 /***********************************************************************/ 170 170 171 171 172 - static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, 173 - struct nameidata *nd) 172 + static int jffs2_create(struct inode *dir_i, struct dentry *dentry, 173 + umode_t mode, struct nameidata *nd) 174 174 { 175 175 struct jffs2_raw_inode *ri; 176 176 struct jffs2_inode_info *f, *dir_f; ··· 450 450 } 451 451 452 452 453 - static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) 453 + static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, umode_t mode) 454 454 { 455 455 struct jffs2_inode_info *f, *dir_f; 456 456 struct jffs2_sb_info *c; ··· 618 618 return ret; 619 619 } 620 620 621 - static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, dev_t rdev) 621 + static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode, dev_t rdev) 622 622 { 623 623 struct jffs2_inode_info *f, *dir_f; 624 624 struct jffs2_sb_info *c;
+3 -3
fs/jfs/namei.c
··· 72 72 * RETURN: Errors from subroutines 73 73 * 74 74 */ 75 - static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, 75 + static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, 76 76 struct nameidata *nd) 77 77 { 78 78 int rc = 0; ··· 205 205 * note: 206 206 * EACCESS: user needs search+write permission on the parent directory 207 207 */ 208 - static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) 208 + static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode) 209 209 { 210 210 int rc = 0; 211 211 tid_t tid; /* transaction id */ ··· 1353 1353 * FUNCTION: Create a special file (device) 1354 1354 */ 1355 1355 static int jfs_mknod(struct inode *dir, struct dentry *dentry, 1356 - int mode, dev_t rdev) 1356 + umode_t mode, dev_t rdev) 1357 1357 { 1358 1358 struct jfs_inode_info *jfs_ip; 1359 1359 struct btstack btstack;
+1 -1
fs/libfs.c
··· 12 12 #include <linux/mutex.h> 13 13 #include <linux/exportfs.h> 14 14 #include <linux/writeback.h> 15 - #include <linux/buffer_head.h> 15 + #include <linux/buffer_head.h> /* sync_mapping_buffers */ 16 16 17 17 #include <asm/uaccess.h> 18 18
+3 -3
fs/logfs/dir.c
··· 482 482 return ret; 483 483 } 484 484 485 - static int logfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 485 + static int logfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 486 486 { 487 487 struct inode *inode; 488 488 ··· 501 501 return __logfs_create(dir, dentry, inode, NULL, 0); 502 502 } 503 503 504 - static int logfs_create(struct inode *dir, struct dentry *dentry, int mode, 504 + static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 505 505 struct nameidata *nd) 506 506 { 507 507 struct inode *inode; ··· 517 517 return __logfs_create(dir, dentry, inode, NULL, 0); 518 518 } 519 519 520 - static int logfs_mknod(struct inode *dir, struct dentry *dentry, int mode, 520 + static int logfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 521 521 dev_t rdev) 522 522 { 523 523 struct inode *inode;
+1 -1
fs/logfs/inode.c
··· 323 323 mutex_unlock(&super->s_journal_mutex); 324 324 } 325 325 326 - struct inode *logfs_new_inode(struct inode *dir, int mode) 326 + struct inode *logfs_new_inode(struct inode *dir, umode_t mode) 327 327 { 328 328 struct super_block *sb = dir->i_sb; 329 329 struct inode *inode;
+1 -1
fs/logfs/logfs.h
··· 520 520 struct inode *logfs_iget(struct super_block *sb, ino_t ino); 521 521 struct inode *logfs_safe_iget(struct super_block *sb, ino_t ino, int *cookie); 522 522 void logfs_safe_iput(struct inode *inode, int cookie); 523 - struct inode *logfs_new_inode(struct inode *dir, int mode); 523 + struct inode *logfs_new_inode(struct inode *dir, umode_t mode); 524 524 struct inode *logfs_new_meta_inode(struct super_block *sb, u64 ino); 525 525 struct inode *logfs_read_meta_inode(struct super_block *sb, u64 ino); 526 526 int logfs_init_inode_cache(void);
+1 -1
fs/minix/bitmap.c
··· 209 209 mark_buffer_dirty(bh); 210 210 } 211 211 212 - struct inode *minix_new_inode(const struct inode *dir, int mode, int *error) 212 + struct inode *minix_new_inode(const struct inode *dir, umode_t mode, int *error) 213 213 { 214 214 struct super_block *sb = dir->i_sb; 215 215 struct minix_sb_info *sbi = minix_sb(sb);
+1 -1
fs/minix/minix.h
··· 46 46 extern struct inode *minix_iget(struct super_block *, unsigned long); 47 47 extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, struct buffer_head **); 48 48 extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **); 49 - extern struct inode * minix_new_inode(const struct inode *, int, int *); 49 + extern struct inode * minix_new_inode(const struct inode *, umode_t, int *); 50 50 extern void minix_free_inode(struct inode * inode); 51 51 extern unsigned long minix_count_free_inodes(struct super_block *sb); 52 52 extern int minix_new_block(struct inode * inode);
+3 -3
fs/minix/namei.c
··· 36 36 return NULL; 37 37 } 38 38 39 - static int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 39 + static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) 40 40 { 41 41 int error; 42 42 struct inode *inode; ··· 54 54 return error; 55 55 } 56 56 57 - static int minix_create(struct inode * dir, struct dentry *dentry, int mode, 57 + static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, 58 58 struct nameidata *nd) 59 59 { 60 60 return minix_mknod(dir, dentry, mode, 0); ··· 103 103 return add_nondir(dentry, inode); 104 104 } 105 105 106 - static int minix_mkdir(struct inode * dir, struct dentry *dentry, int mode) 106 + static int minix_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode) 107 107 { 108 108 struct inode * inode; 109 109 int err = -EMLINK;
+9 -9
fs/namei.c
··· 1979 1979 } 1980 1980 } 1981 1981 1982 - int vfs_create(struct inode *dir, struct dentry *dentry, int mode, 1982 + int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 1983 1983 struct nameidata *nd) 1984 1984 { 1985 1985 int error = may_create(dir, dentry); ··· 2180 2180 2181 2181 /* Negative dentry, just create the file */ 2182 2182 if (!dentry->d_inode) { 2183 - int mode = op->mode; 2183 + umode_t mode = op->mode; 2184 2184 if (!IS_POSIXACL(dir->d_inode)) 2185 2185 mode &= ~current_umask(); 2186 2186 /* ··· 2447 2447 } 2448 2448 EXPORT_SYMBOL(user_path_create); 2449 2449 2450 - int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 2450 + int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 2451 2451 { 2452 2452 int error = may_create(dir, dentry); 2453 2453 ··· 2475 2475 return error; 2476 2476 } 2477 2477 2478 - static int may_mknod(mode_t mode) 2478 + static int may_mknod(umode_t mode) 2479 2479 { 2480 2480 switch (mode & S_IFMT) { 2481 2481 case S_IFREG: ··· 2492 2492 } 2493 2493 } 2494 2494 2495 - SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode, 2495 + SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, 2496 2496 unsigned, dev) 2497 2497 { 2498 2498 struct dentry *dentry; ··· 2539 2539 return error; 2540 2540 } 2541 2541 2542 - SYSCALL_DEFINE3(mknod, const char __user *, filename, int, mode, unsigned, dev) 2542 + SYSCALL_DEFINE3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev) 2543 2543 { 2544 2544 return sys_mknodat(AT_FDCWD, filename, mode, dev); 2545 2545 } 2546 2546 2547 - int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 2547 + int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 2548 2548 { 2549 2549 int error = may_create(dir, dentry); 2550 2550 ··· 2565 2565 return error; 2566 2566 } 2567 2567 2568 - SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode) 2568 + SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode) 2569 2569 { 2570 2570 struct dentry *dentry; 2571 2571 struct path path; ··· 2593 2593 return error; 2594 2594 } 2595 2595 2596 - SYSCALL_DEFINE2(mkdir, const char __user *, pathname, int, mode) 2596 + SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode) 2597 2597 { 2598 2598 return sys_mkdirat(AT_FDCWD, pathname, mode); 2599 2599 }
+9 -9
fs/ncpfs/dir.c
··· 30 30 31 31 static int ncp_readdir(struct file *, void *, filldir_t); 32 32 33 - static int ncp_create(struct inode *, struct dentry *, int, struct nameidata *); 33 + static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 34 34 static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *); 35 35 static int ncp_unlink(struct inode *, struct dentry *); 36 - static int ncp_mkdir(struct inode *, struct dentry *, int); 36 + static int ncp_mkdir(struct inode *, struct dentry *, umode_t); 37 37 static int ncp_rmdir(struct inode *, struct dentry *); 38 38 static int ncp_rename(struct inode *, struct dentry *, 39 39 struct inode *, struct dentry *); 40 40 static int ncp_mknod(struct inode * dir, struct dentry *dentry, 41 - int mode, dev_t rdev); 41 + umode_t mode, dev_t rdev); 42 42 #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) 43 43 extern int ncp_symlink(struct inode *, struct dentry *, const char *); 44 44 #else ··· 919 919 goto out; 920 920 } 921 921 922 - int ncp_create_new(struct inode *dir, struct dentry *dentry, int mode, 922 + int ncp_create_new(struct inode *dir, struct dentry *dentry, umode_t mode, 923 923 dev_t rdev, __le32 attributes) 924 924 { 925 925 struct ncp_server *server = NCP_SERVER(dir); ··· 928 928 int opmode; 929 929 __u8 __name[NCP_MAXPATHLEN + 1]; 930 930 931 - PPRINTK("ncp_create_new: creating %s/%s, mode=%x\n", 931 + PPRINTK("ncp_create_new: creating %s/%s, mode=%hx\n", 932 932 dentry->d_parent->d_name.name, dentry->d_name.name, mode); 933 933 934 934 ncp_age_dentry(server, dentry); ··· 979 979 return error; 980 980 } 981 981 982 - static int ncp_create(struct inode *dir, struct dentry *dentry, int mode, 982 + static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode, 983 983 struct nameidata *nd) 984 984 { 985 985 return ncp_create_new(dir, dentry, mode, 0, 0); 986 986 } 987 987 988 - static int ncp_mkdir(struct inode *dir, struct dentry *dentry, int mode) 988 + static int ncp_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 989 989 { 990 990 struct ncp_entry_info finfo; 991 991 struct ncp_server *server = NCP_SERVER(dir); ··· 1201 1201 } 1202 1202 1203 1203 static int ncp_mknod(struct inode * dir, struct dentry *dentry, 1204 - int mode, dev_t rdev) 1204 + umode_t mode, dev_t rdev) 1205 1205 { 1206 1206 if (!new_valid_dev(rdev)) 1207 1207 return -EINVAL; 1208 1208 if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) { 1209 - DPRINTK(KERN_DEBUG "ncp_mknod: mode = 0%o\n", mode); 1209 + DPRINTK(KERN_DEBUG "ncp_mknod: mode = 0%ho\n", mode); 1210 1210 return ncp_create_new(dir, dentry, mode, rdev, 0); 1211 1211 } 1212 1212 return -EPERM; /* Strange, but true */
+1 -1
fs/ncpfs/ncplib_kernel.h
··· 114 114 int ncp_dirhandle_free(struct ncp_server *, __u8 dirhandle); 115 115 116 116 int ncp_create_new(struct inode *dir, struct dentry *dentry, 117 - int mode, dev_t rdev, __le32 attributes); 117 + umode_t mode, dev_t rdev, __le32 attributes); 118 118 119 119 static inline int ncp_is_nfs_extras(struct ncp_server* server, unsigned int volnum) { 120 120 #ifdef CONFIG_NCPFS_NFS_NS
+1 -1
fs/ncpfs/symlink.c
··· 108 108 char *rawlink; 109 109 int length, err, i, outlen; 110 110 int kludge; 111 - int mode; 111 + umode_t mode; 112 112 __le32 attr; 113 113 unsigned int hdr; 114 114
+10 -10
fs/nfs/dir.c
··· 47 47 static int nfs_closedir(struct inode *, struct file *); 48 48 static int nfs_readdir(struct file *, void *, filldir_t); 49 49 static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *); 50 - static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *); 51 - static int nfs_mkdir(struct inode *, struct dentry *, int); 50 + static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 51 + static int nfs_mkdir(struct inode *, struct dentry *, umode_t); 52 52 static int nfs_rmdir(struct inode *, struct dentry *); 53 53 static int nfs_unlink(struct inode *, struct dentry *); 54 54 static int nfs_symlink(struct inode *, struct dentry *, const char *); 55 55 static int nfs_link(struct dentry *, struct inode *, struct dentry *); 56 - static int nfs_mknod(struct inode *, struct dentry *, int, dev_t); 56 + static int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 57 57 static int nfs_rename(struct inode *, struct dentry *, 58 58 struct inode *, struct dentry *); 59 59 static int nfs_fsync_dir(struct file *, loff_t, loff_t, int); ··· 112 112 #ifdef CONFIG_NFS_V4 113 113 114 114 static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *); 115 - static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd); 115 + static int nfs_open_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd); 116 116 const struct inode_operations nfs4_dir_inode_operations = { 117 117 .create = nfs_open_create, 118 118 .lookup = nfs_atomic_lookup, ··· 1573 1573 return nfs_lookup_revalidate(dentry, nd); 1574 1574 } 1575 1575 1576 - static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, 1577 - struct nameidata *nd) 1576 + static int nfs_open_create(struct inode *dir, struct dentry *dentry, 1577 + umode_t mode, struct nameidata *nd) 1578 1578 { 1579 1579 struct nfs_open_context *ctx = NULL; 1580 1580 struct iattr attr; ··· 1664 1664 * that the operation succeeded on the server, but an error in the 1665 1665 * reply path made it appear to have failed. 1666 1666 */ 1667 - static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, 1668 - struct nameidata *nd) 1667 + static int nfs_create(struct inode *dir, struct dentry *dentry, 1668 + umode_t mode, struct nameidata *nd) 1669 1669 { 1670 1670 struct iattr attr; 1671 1671 int error; ··· 1693 1693 * See comments for nfs_proc_create regarding failed operations. 1694 1694 */ 1695 1695 static int 1696 - nfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 1696 + nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 1697 1697 { 1698 1698 struct iattr attr; 1699 1699 int status; ··· 1719 1719 /* 1720 1720 * See comments for nfs_proc_create regarding failed operations. 1721 1721 */ 1722 - static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1722 + static int nfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 1723 1723 { 1724 1724 struct iattr attr; 1725 1725 int error;
+2 -2
fs/nfsd/nfsfh.c
··· 59 59 * the write call). 60 60 */ 61 61 static inline __be32 62 - nfsd_mode_check(struct svc_rqst *rqstp, umode_t mode, int requested) 62 + nfsd_mode_check(struct svc_rqst *rqstp, umode_t mode, umode_t requested) 63 63 { 64 64 mode &= S_IFMT; 65 65 ··· 293 293 * include/linux/nfsd/nfsd.h. 294 294 */ 295 295 __be32 296 - fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) 296 + fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access) 297 297 { 298 298 struct svc_export *exp; 299 299 struct dentry *dentry;
+1 -1
fs/nfsd/nfsfh.h
··· 102 102 /* 103 103 * Function prototypes 104 104 */ 105 - __be32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int); 105 + __be32 fh_verify(struct svc_rqst *, struct svc_fh *, umode_t, int); 106 106 __be32 fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *); 107 107 __be32 fh_update(struct svc_fh *); 108 108 void fh_put(struct svc_fh *);
+2 -2
fs/nfsd/vfs.c
··· 307 307 struct dentry *dentry; 308 308 struct inode *inode; 309 309 int accmode = NFSD_MAY_SATTR; 310 - int ftype = 0; 310 + umode_t ftype = 0; 311 311 __be32 err; 312 312 int host_err; 313 313 int size_change = 0; ··· 730 730 * N.B. After this call fhp needs an fh_put 731 731 */ 732 732 __be32 733 - nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, 733 + nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, 734 734 int access, struct file **filp) 735 735 { 736 736 struct dentry *dentry;
+1 -1
fs/nfsd/vfs.h
··· 66 66 __be32 nfsd_commit(struct svc_rqst *, struct svc_fh *, 67 67 loff_t, unsigned long); 68 68 #endif /* CONFIG_NFSD_V3 */ 69 - __be32 nfsd_open(struct svc_rqst *, struct svc_fh *, int, 69 + __be32 nfsd_open(struct svc_rqst *, struct svc_fh *, umode_t, 70 70 int, struct file **); 71 71 void nfsd_close(struct file *); 72 72 __be32 nfsd_read(struct svc_rqst *, struct svc_fh *,
+1 -1
fs/nilfs2/dir.c
··· 251 251 252 252 static void nilfs_set_de_type(struct nilfs_dir_entry *de, struct inode *inode) 253 253 { 254 - mode_t mode = inode->i_mode; 254 + umode_t mode = inode->i_mode; 255 255 256 256 de->file_type = nilfs_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; 257 257 }
+1 -1
fs/nilfs2/inode.c
··· 291 291 .is_partially_uptodate = block_is_partially_uptodate, 292 292 }; 293 293 294 - struct inode *nilfs_new_inode(struct inode *dir, int mode) 294 + struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) 295 295 { 296 296 struct super_block *sb = dir->i_sb; 297 297 struct the_nilfs *nilfs = sb->s_fs_info;
+3 -3
fs/nilfs2/namei.c
··· 84 84 * If the create succeeds, we fill in the inode information 85 85 * with d_instantiate(). 86 86 */ 87 - static int nilfs_create(struct inode *dir, struct dentry *dentry, int mode, 87 + static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 88 88 struct nameidata *nd) 89 89 { 90 90 struct inode *inode; ··· 112 112 } 113 113 114 114 static int 115 - nilfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 115 + nilfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 116 116 { 117 117 struct inode *inode; 118 118 struct nilfs_transaction_info ti; ··· 213 213 return err; 214 214 } 215 215 216 - static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 216 + static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 217 217 { 218 218 struct inode *inode; 219 219 struct nilfs_transaction_info ti;
+1 -1
fs/nilfs2/nilfs.h
··· 246 246 /* inode.c */ 247 247 void nilfs_inode_add_blocks(struct inode *inode, int n); 248 248 void nilfs_inode_sub_blocks(struct inode *inode, int n); 249 - extern struct inode *nilfs_new_inode(struct inode *, int); 249 + extern struct inode *nilfs_new_inode(struct inode *, umode_t); 250 250 extern void nilfs_free_inode(struct inode *); 251 251 extern int nilfs_get_block(struct inode *, sector_t, struct buffer_head *, int); 252 252 extern void nilfs_set_inode_flags(struct inode *);
+3 -3
fs/ntfs/super.c
··· 104 104 int errors = 0, sloppy = 0; 105 105 uid_t uid = (uid_t)-1; 106 106 gid_t gid = (gid_t)-1; 107 - mode_t fmask = (mode_t)-1, dmask = (mode_t)-1; 107 + umode_t fmask = (umode_t)-1, dmask = (umode_t)-1; 108 108 int mft_zone_multiplier = -1, on_errors = -1; 109 109 int show_sys_files = -1, case_sensitive = -1, disable_sparse = -1; 110 110 struct nls_table *nls_map = NULL, *old_nls; ··· 287 287 vol->uid = uid; 288 288 if (gid != (gid_t)-1) 289 289 vol->gid = gid; 290 - if (fmask != (mode_t)-1) 290 + if (fmask != (umode_t)-1) 291 291 vol->fmask = fmask; 292 - if (dmask != (mode_t)-1) 292 + if (dmask != (umode_t)-1) 293 293 vol->dmask = dmask; 294 294 if (show_sys_files != -1) { 295 295 if (show_sys_files)
+2 -2
fs/ntfs/volume.h
··· 48 48 unsigned long flags; /* Miscellaneous flags, see below. */ 49 49 uid_t uid; /* uid that files will be mounted as. */ 50 50 gid_t gid; /* gid that files will be mounted as. */ 51 - mode_t fmask; /* The mask for file permissions. */ 52 - mode_t dmask; /* The mask for directory 51 + umode_t fmask; /* The mask for file permissions. */ 52 + umode_t dmask; /* The mask for directory 53 53 permissions. */ 54 54 u8 mft_zone_multiplier; /* Initial mft zone multiplier. */ 55 55 u8 on_errors; /* What to do on filesystem errors. */
+1 -1
fs/ocfs2/cluster/netdebug.c
··· 553 553 554 554 int o2net_debugfs_init(void) 555 555 { 556 - mode_t mode = S_IFREG|S_IRUSR; 556 + umode_t mode = S_IFREG|S_IRUSR; 557 557 558 558 o2net_dentry = debugfs_create_dir(O2NET_DEBUG_DIR, NULL); 559 559 if (o2net_dentry)
+6 -17
fs/ocfs2/dlmfs/dlmfs.c
··· 400 400 static struct inode *dlmfs_get_root_inode(struct super_block *sb) 401 401 { 402 402 struct inode *inode = new_inode(sb); 403 - int mode = S_IFDIR | 0755; 403 + umode_t mode = S_IFDIR | 0755; 404 404 struct dlmfs_inode_private *ip; 405 405 406 406 if (inode) { 407 407 ip = DLMFS_I(inode); 408 408 409 409 inode->i_ino = get_next_ino(); 410 - inode->i_mode = mode; 411 - inode->i_uid = current_fsuid(); 412 - inode->i_gid = current_fsgid(); 410 + inode_init_owner(inode, NULL, mode); 413 411 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; 414 412 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 415 413 inc_nlink(inode); ··· 421 423 422 424 static struct inode *dlmfs_get_inode(struct inode *parent, 423 425 struct dentry *dentry, 424 - int mode) 426 + umode_t mode) 425 427 { 426 428 struct super_block *sb = parent->i_sb; 427 429 struct inode * inode = new_inode(sb); ··· 431 433 return NULL; 432 434 433 435 inode->i_ino = get_next_ino(); 434 - inode->i_mode = mode; 435 - inode->i_uid = current_fsuid(); 436 - inode->i_gid = current_fsgid(); 436 + inode_init_owner(inode, parent, mode); 437 437 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; 438 438 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 439 439 ··· 468 472 inc_nlink(inode); 469 473 break; 470 474 } 471 - 472 - if (parent->i_mode & S_ISGID) { 473 - inode->i_gid = parent->i_gid; 474 - if (S_ISDIR(mode)) 475 - inode->i_mode |= S_ISGID; 476 - } 477 - 478 475 return inode; 479 476 } 480 477 ··· 477 488 /* SMP-safe */ 478 489 static int dlmfs_mkdir(struct inode * dir, 479 490 struct dentry * dentry, 480 - int mode) 491 + umode_t mode) 481 492 { 482 493 int status; 483 494 struct inode *inode = NULL; ··· 525 536 526 537 static int dlmfs_create(struct inode *dir, 527 538 struct dentry *dentry, 528 - int mode, 539 + umode_t mode, 529 540 struct nameidata *nd) 530 541 { 531 542 int status = 0;
+4 -4
fs/ocfs2/namei.c
··· 185 185 return ret; 186 186 } 187 187 188 - static struct inode *ocfs2_get_init_inode(struct inode *dir, int mode) 188 + static struct inode *ocfs2_get_init_inode(struct inode *dir, umode_t mode) 189 189 { 190 190 struct inode *inode; 191 191 ··· 207 207 208 208 static int ocfs2_mknod(struct inode *dir, 209 209 struct dentry *dentry, 210 - int mode, 210 + umode_t mode, 211 211 dev_t dev) 212 212 { 213 213 int status = 0; ··· 602 602 603 603 static int ocfs2_mkdir(struct inode *dir, 604 604 struct dentry *dentry, 605 - int mode) 605 + umode_t mode) 606 606 { 607 607 int ret; 608 608 ··· 617 617 618 618 static int ocfs2_create(struct inode *dir, 619 619 struct dentry *dentry, 620 - int mode, 620 + umode_t mode, 621 621 struct nameidata *nd) 622 622 { 623 623 int ret;
+1 -1
fs/ocfs2/xattr.c
··· 623 623 624 624 int ocfs2_calc_xattr_init(struct inode *dir, 625 625 struct buffer_head *dir_bh, 626 - int mode, 626 + umode_t mode, 627 627 struct ocfs2_security_xattr_info *si, 628 628 int *want_clusters, 629 629 int *xattr_credits,
+1 -1
fs/ocfs2/xattr.h
··· 68 68 struct ocfs2_security_xattr_info *, 69 69 int *, int *, struct ocfs2_alloc_context **); 70 70 int ocfs2_calc_xattr_init(struct inode *, struct buffer_head *, 71 - int, struct ocfs2_security_xattr_info *, 71 + umode_t, struct ocfs2_security_xattr_info *, 72 72 int *, int *, int *); 73 73 74 74 /*
+3 -3
fs/omfs/dir.c
··· 255 255 return 0; 256 256 } 257 257 258 - static int omfs_add_node(struct inode *dir, struct dentry *dentry, int mode) 258 + static int omfs_add_node(struct inode *dir, struct dentry *dentry, umode_t mode) 259 259 { 260 260 int err; 261 261 struct inode *inode = omfs_new_inode(dir, mode); ··· 279 279 return err; 280 280 } 281 281 282 - static int omfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 282 + static int omfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 283 283 { 284 284 return omfs_add_node(dir, dentry, mode | S_IFDIR); 285 285 } 286 286 287 - static int omfs_create(struct inode *dir, struct dentry *dentry, int mode, 287 + static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 288 288 struct nameidata *nd) 289 289 { 290 290 return omfs_add_node(dir, dentry, mode | S_IFREG);
+1 -1
fs/omfs/inode.c
··· 28 28 return sb_bread(sb, clus_to_blk(sbi, block)); 29 29 } 30 30 31 - struct inode *omfs_new_inode(struct inode *dir, int mode) 31 + struct inode *omfs_new_inode(struct inode *dir, umode_t mode) 32 32 { 33 33 struct inode *inode; 34 34 u64 new_block;
+1 -1
fs/omfs/omfs.h
··· 60 60 /* inode.c */ 61 61 extern struct buffer_head *omfs_bread(struct super_block *sb, sector_t block); 62 62 extern struct inode *omfs_iget(struct super_block *sb, ino_t inode); 63 - extern struct inode *omfs_new_inode(struct inode *dir, int mode); 63 + extern struct inode *omfs_new_inode(struct inode *dir, umode_t mode); 64 64 extern int omfs_reserve_block(struct super_block *sb, sector_t block); 65 65 extern int omfs_find_empty_block(struct super_block *sb, int mode, ino_t *ino); 66 66 extern int omfs_sync_inode(struct inode *inode);
+9 -9
fs/open.c
··· 468 468 return error; 469 469 } 470 470 471 - SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) 471 + SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode) 472 472 { 473 473 struct file * file; 474 474 int err = -EBADF; ··· 482 482 return err; 483 483 } 484 484 485 - SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) 485 + SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode) 486 486 { 487 487 struct path path; 488 488 int error; ··· 495 495 return error; 496 496 } 497 497 498 - SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode) 498 + SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode) 499 499 { 500 500 return sys_fchmodat(AT_FDCWD, filename, mode); 501 501 } ··· 877 877 878 878 EXPORT_SYMBOL(fd_install); 879 879 880 - static inline int build_open_flags(int flags, int mode, struct open_flags *op) 880 + static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) 881 881 { 882 882 int lookup_flags = 0; 883 883 int acc_mode; ··· 948 948 * have to. But in generally you should not do this, so please move 949 949 * along, nothing to see here.. 950 950 */ 951 - struct file *filp_open(const char *filename, int flags, int mode) 951 + struct file *filp_open(const char *filename, int flags, umode_t mode) 952 952 { 953 953 struct open_flags op; 954 954 int lookup = build_open_flags(flags, mode, &op); ··· 970 970 } 971 971 EXPORT_SYMBOL(file_open_root); 972 972 973 - long do_sys_open(int dfd, const char __user *filename, int flags, int mode) 973 + long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) 974 974 { 975 975 struct open_flags op; 976 976 int lookup = build_open_flags(flags, mode, &op); ··· 994 994 return fd; 995 995 } 996 996 997 - SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) 997 + SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) 998 998 { 999 999 long ret; 1000 1000 ··· 1008 1008 } 1009 1009 1010 1010 SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, 1011 - int, mode) 1011 + umode_t, mode) 1012 1012 { 1013 1013 long ret; 1014 1014 ··· 1027 1027 * For backward compatibility? Maybe this should be moved 1028 1028 * into arch/i386 instead? 1029 1029 */ 1030 - SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode) 1030 + SYSCALL_DEFINE2(creat, const char __user *, pathname, umode_t, mode) 1031 1031 { 1032 1032 return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); 1033 1033 }
fs/partitions/Kconfig block/partitions/Kconfig
fs/partitions/Makefile block/partitions/Makefile
fs/partitions/acorn.c block/partitions/acorn.c
fs/partitions/acorn.h block/partitions/acorn.h
fs/partitions/amiga.c block/partitions/amiga.c
fs/partitions/amiga.h block/partitions/amiga.h
fs/partitions/atari.c block/partitions/atari.c
fs/partitions/atari.h block/partitions/atari.h
+1 -151
fs/partitions/check.c block/partition-generic.c
··· 1 1 /* 2 - * fs/partitions/check.c 3 - * 4 2 * Code extracted from drivers/block/genhd.c 5 3 * Copyright (C) 1991-1998 Linus Torvalds 6 4 * Re-organised Feb 1998 Russell King ··· 7 9 * block drivers, which allows all the partition code to 8 10 * be grouped in one location, and it to be mostly self 9 11 * contained. 10 - * 11 - * Added needed MAJORS for new pairs, {hdi,hdj}, {hdk,hdl} 12 12 */ 13 13 14 14 #include <linux/init.h> ··· 18 22 #include <linux/genhd.h> 19 23 #include <linux/blktrace_api.h> 20 24 21 - #include "check.h" 22 - 23 - #include "acorn.h" 24 - #include "amiga.h" 25 - #include "atari.h" 26 - #include "ldm.h" 27 - #include "mac.h" 28 - #include "msdos.h" 29 - #include "osf.h" 30 - #include "sgi.h" 31 - #include "sun.h" 32 - #include "ibm.h" 33 - #include "ultrix.h" 34 - #include "efi.h" 35 - #include "karma.h" 36 - #include "sysv68.h" 25 + #include "partitions/check.h" 37 26 38 27 #ifdef CONFIG_BLK_DEV_MD 39 28 extern void md_autodetect_dev(dev_t dev); 40 29 #endif 41 - 42 - int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/ 43 - 44 - static int (*check_part[])(struct parsed_partitions *) = { 45 - /* 46 - * Probe partition formats with tables at disk address 0 47 - * that also have an ADFS boot block at 0xdc0. 48 - */ 49 - #ifdef CONFIG_ACORN_PARTITION_ICS 50 - adfspart_check_ICS, 51 - #endif 52 - #ifdef CONFIG_ACORN_PARTITION_POWERTEC 53 - adfspart_check_POWERTEC, 54 - #endif 55 - #ifdef CONFIG_ACORN_PARTITION_EESOX 56 - adfspart_check_EESOX, 57 - #endif 58 - 59 - /* 60 - * Now move on to formats that only have partition info at 61 - * disk address 0xdc0. Since these may also have stale 62 - * PC/BIOS partition tables, they need to come before 63 - * the msdos entry. 64 - */ 65 - #ifdef CONFIG_ACORN_PARTITION_CUMANA 66 - adfspart_check_CUMANA, 67 - #endif 68 - #ifdef CONFIG_ACORN_PARTITION_ADFS 69 - adfspart_check_ADFS, 70 - #endif 71 - 72 - #ifdef CONFIG_EFI_PARTITION 73 - efi_partition, /* this must come before msdos */ 74 - #endif 75 - #ifdef CONFIG_SGI_PARTITION 76 - sgi_partition, 77 - #endif 78 - #ifdef CONFIG_LDM_PARTITION 79 - ldm_partition, /* this must come before msdos */ 80 - #endif 81 - #ifdef CONFIG_MSDOS_PARTITION 82 - msdos_partition, 83 - #endif 84 - #ifdef CONFIG_OSF_PARTITION 85 - osf_partition, 86 - #endif 87 - #ifdef CONFIG_SUN_PARTITION 88 - sun_partition, 89 - #endif 90 - #ifdef CONFIG_AMIGA_PARTITION 91 - amiga_partition, 92 - #endif 93 - #ifdef CONFIG_ATARI_PARTITION 94 - atari_partition, 95 - #endif 96 - #ifdef CONFIG_MAC_PARTITION 97 - mac_partition, 98 - #endif 99 - #ifdef CONFIG_ULTRIX_PARTITION 100 - ultrix_partition, 101 - #endif 102 - #ifdef CONFIG_IBM_PARTITION 103 - ibm_partition, 104 - #endif 105 - #ifdef CONFIG_KARMA_PARTITION 106 - karma_partition, 107 - #endif 108 - #ifdef CONFIG_SYSV68_PARTITION 109 - sysv68_partition, 110 - #endif 111 - NULL 112 - }; 113 30 114 31 /* 115 32 * disk_name() is used by partition check code and the genhd driver. ··· 63 154 } 64 155 65 156 EXPORT_SYMBOL(__bdevname); 66 - 67 - static struct parsed_partitions * 68 - check_partition(struct gendisk *hd, struct block_device *bdev) 69 - { 70 - struct parsed_partitions *state; 71 - int i, res, err; 72 - 73 - state = kzalloc(sizeof(struct parsed_partitions), GFP_KERNEL); 74 - if (!state) 75 - return NULL; 76 - state->pp_buf = (char *)__get_free_page(GFP_KERNEL); 77 - if (!state->pp_buf) { 78 - kfree(state); 79 - return NULL; 80 - } 81 - state->pp_buf[0] = '\0'; 82 - 83 - state->bdev = bdev; 84 - disk_name(hd, 0, state->name); 85 - snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name); 86 - if (isdigit(state->name[strlen(state->name)-1])) 87 - sprintf(state->name, "p"); 88 - 89 - state->limit = disk_max_parts(hd); 90 - i = res = err = 0; 91 - while (!res && check_part[i]) { 92 - memset(&state->parts, 0, sizeof(state->parts)); 93 - res = check_part[i++](state); 94 - if (res < 0) { 95 - /* We have hit an I/O error which we don't report now. 96 - * But record it, and let the others do their job. 97 - */ 98 - err = res; 99 - res = 0; 100 - } 101 - 102 - } 103 - if (res > 0) { 104 - printk(KERN_INFO "%s", state->pp_buf); 105 - 106 - free_page((unsigned long)state->pp_buf); 107 - return state; 108 - } 109 - if (state->access_beyond_eod) 110 - err = -ENOSPC; 111 - if (err) 112 - /* The partition is unrecognized. So report I/O errors if there were any */ 113 - res = err; 114 - if (!res) 115 - strlcat(state->pp_buf, " unknown partition table\n", PAGE_SIZE); 116 - else if (warn_no_part) 117 - strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE); 118 - 119 - printk(KERN_INFO "%s", state->pp_buf); 120 - 121 - free_page((unsigned long)state->pp_buf); 122 - kfree(state); 123 - return ERR_PTR(res); 124 - } 125 157 126 158 static ssize_t part_partition_show(struct device *dev, 127 159 struct device_attribute *attr, char *buf)
+3
fs/partitions/check.h block/partitions/check.h
··· 22 22 char *pp_buf; 23 23 }; 24 24 25 + struct parsed_partitions * 26 + check_partition(struct gendisk *, struct block_device *); 27 + 25 28 static inline void *read_part_sector(struct parsed_partitions *state, 26 29 sector_t n, Sector *p) 27 30 {
fs/partitions/efi.c block/partitions/efi.c
fs/partitions/efi.h block/partitions/efi.h
fs/partitions/ibm.c block/partitions/ibm.c
fs/partitions/ibm.h block/partitions/ibm.h
fs/partitions/karma.c block/partitions/karma.c
fs/partitions/karma.h block/partitions/karma.h
fs/partitions/ldm.c block/partitions/ldm.c
fs/partitions/ldm.h block/partitions/ldm.h
fs/partitions/mac.c block/partitions/mac.c
fs/partitions/mac.h block/partitions/mac.h
fs/partitions/msdos.c block/partitions/msdos.c
fs/partitions/msdos.h block/partitions/msdos.h
fs/partitions/osf.c block/partitions/osf.c
fs/partitions/osf.h block/partitions/osf.h
fs/partitions/sgi.c block/partitions/sgi.c
fs/partitions/sgi.h block/partitions/sgi.h
fs/partitions/sun.c block/partitions/sun.c
fs/partitions/sun.h block/partitions/sun.h
fs/partitions/sysv68.c block/partitions/sysv68.c
fs/partitions/sysv68.h block/partitions/sysv68.h
fs/partitions/ultrix.c block/partitions/ultrix.c
fs/partitions/ultrix.h block/partitions/ultrix.h
+1 -1
fs/proc/base.c
··· 101 101 struct pid_entry { 102 102 char *name; 103 103 int len; 104 - mode_t mode; 104 + umode_t mode; 105 105 const struct inode_operations *iop; 106 106 const struct file_operations *fop; 107 107 union proc_op op;
+4 -4
fs/proc/generic.c
··· 597 597 598 598 static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, 599 599 const char *name, 600 - mode_t mode, 600 + umode_t mode, 601 601 nlink_t nlink) 602 602 { 603 603 struct proc_dir_entry *ent = NULL; ··· 659 659 } 660 660 EXPORT_SYMBOL(proc_symlink); 661 661 662 - struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, 662 + struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, 663 663 struct proc_dir_entry *parent) 664 664 { 665 665 struct proc_dir_entry *ent; ··· 699 699 } 700 700 EXPORT_SYMBOL(proc_mkdir); 701 701 702 - struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, 702 + struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, 703 703 struct proc_dir_entry *parent) 704 704 { 705 705 struct proc_dir_entry *ent; ··· 728 728 } 729 729 EXPORT_SYMBOL(create_proc_entry); 730 730 731 - struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, 731 + struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, 732 732 struct proc_dir_entry *parent, 733 733 const struct file_operations *proc_fops, 734 734 void *data)
+1 -1
fs/proc/proc_net.c
··· 179 179 180 180 181 181 struct proc_dir_entry *proc_net_fops_create(struct net *net, 182 - const char *name, mode_t mode, const struct file_operations *fops) 182 + const char *name, umode_t mode, const struct file_operations *fops) 183 183 { 184 184 return proc_create(name, mode, net->proc_net, fops); 185 185 }
-1
fs/quota/dquot.c
··· 73 73 #include <linux/security.h> 74 74 #include <linux/kmod.h> 75 75 #include <linux/namei.h> 76 - #include <linux/buffer_head.h> 77 76 #include <linux/capability.h> 78 77 #include <linux/quotaops.h> 79 78 #include "../internal.h" /* ugh */
-1
fs/quota/quota.c
··· 13 13 #include <linux/kernel.h> 14 14 #include <linux/security.h> 15 15 #include <linux/syscalls.h> 16 - #include <linux/buffer_head.h> 17 16 #include <linux/capability.h> 18 17 #include <linux/quotaops.h> 19 18 #include <linux/types.h>
+4 -4
fs/ramfs/inode.c
··· 52 52 }; 53 53 54 54 struct inode *ramfs_get_inode(struct super_block *sb, 55 - const struct inode *dir, int mode, dev_t dev) 55 + const struct inode *dir, umode_t mode, dev_t dev) 56 56 { 57 57 struct inode * inode = new_inode(sb); 58 58 ··· 92 92 */ 93 93 /* SMP-safe */ 94 94 static int 95 - ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 95 + ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 96 96 { 97 97 struct inode * inode = ramfs_get_inode(dir->i_sb, dir, mode, dev); 98 98 int error = -ENOSPC; ··· 106 106 return error; 107 107 } 108 108 109 - static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, int mode) 109 + static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) 110 110 { 111 111 int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); 112 112 if (!retval) ··· 114 114 return retval; 115 115 } 116 116 117 - static int ramfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) 117 + static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) 118 118 { 119 119 return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); 120 120 }
+1 -1
fs/reiserfs/inode.c
··· 1766 1766 for the fresh inode. This can only be done outside a transaction, so 1767 1767 if we return non-zero, we also end the transaction. */ 1768 1768 int reiserfs_new_inode(struct reiserfs_transaction_handle *th, 1769 - struct inode *dir, int mode, const char *symname, 1769 + struct inode *dir, umode_t mode, const char *symname, 1770 1770 /* 0 for regular, EMTRY_DIR_SIZE for dirs, 1771 1771 strlen (symname) for symlinks) */ 1772 1772 loff_t i_size, struct dentry *dentry,
+4 -4
fs/reiserfs/namei.c
··· 559 559 ** outside of a transaction, so we had to pull some bits of 560 560 ** reiserfs_new_inode out into this func. 561 561 */ 562 - static int new_inode_init(struct inode *inode, struct inode *dir, int mode) 562 + static int new_inode_init(struct inode *inode, struct inode *dir, umode_t mode) 563 563 { 564 564 /* Make inode invalid - just in case we are going to drop it before 565 565 * the initialization happens */ ··· 572 572 return 0; 573 573 } 574 574 575 - static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode, 575 + static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 576 576 struct nameidata *nd) 577 577 { 578 578 int retval; ··· 643 643 return retval; 644 644 } 645 645 646 - static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode, 646 + static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 647 647 dev_t rdev) 648 648 { 649 649 int retval; ··· 721 721 return retval; 722 722 } 723 723 724 - static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 724 + static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 725 725 { 726 726 int retval; 727 727 struct inode *inode;
+1 -1
fs/reiserfs/xattr.c
··· 66 66 } 67 67 #endif 68 68 69 - static int xattr_mkdir(struct inode *dir, struct dentry *dentry, int mode) 69 + static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 70 70 { 71 71 BUG_ON(!mutex_is_locked(&dir->i_mutex)); 72 72 return dir->i_op->mkdir(dir, dentry, mode);
-1
fs/splice.c
··· 25 25 #include <linux/mm_inline.h> 26 26 #include <linux/swap.h> 27 27 #include <linux/writeback.h> 28 - #include <linux/buffer_head.h> 29 28 #include <linux/module.h> 30 29 #include <linux/syscalls.h> 31 30 #include <linux/uio.h>
-1
fs/sync.c
··· 14 14 #include <linux/linkage.h> 15 15 #include <linux/pagemap.h> 16 16 #include <linux/quotaops.h> 17 - #include <linux/buffer_head.h> 18 17 #include <linux/backing-dev.h> 19 18 #include "internal.h" 20 19
+2 -2
fs/sysfs/file.c
··· 518 518 } 519 519 520 520 int sysfs_add_file_mode(struct sysfs_dirent *dir_sd, 521 - const struct attribute *attr, int type, mode_t amode) 521 + const struct attribute *attr, int type, umode_t amode) 522 522 { 523 523 umode_t mode = (amode & S_IALLUGO) | S_IFREG; 524 524 struct sysfs_addrm_cxt acxt; ··· 618 618 * 619 619 */ 620 620 int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, 621 - mode_t mode) 621 + umode_t mode) 622 622 { 623 623 struct sysfs_dirent *sd; 624 624 struct iattr newattrs;
+1 -1
fs/sysfs/group.c
··· 33 33 int error = 0, i; 34 34 35 35 for (i = 0, attr = grp->attrs; *attr && !error; i++, attr++) { 36 - mode_t mode = 0; 36 + umode_t mode = 0; 37 37 38 38 /* in update mode, we're changing the permissions or 39 39 * visibility. Do this by first removing then
+1 -1
fs/sysfs/inode.c
··· 187 187 return error; 188 188 } 189 189 190 - static inline void set_default_inode_attr(struct inode * inode, mode_t mode) 190 + static inline void set_default_inode_attr(struct inode * inode, umode_t mode) 191 191 { 192 192 inode->i_mode = mode; 193 193 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+2 -2
fs/sysfs/sysfs.h
··· 79 79 }; 80 80 81 81 unsigned int s_flags; 82 - unsigned short s_mode; 82 + umode_t s_mode; 83 83 ino_t s_ino; 84 84 struct sysfs_inode_attrs *s_iattr; 85 85 }; ··· 229 229 const struct attribute *attr, int type); 230 230 231 231 int sysfs_add_file_mode(struct sysfs_dirent *dir_sd, 232 - const struct attribute *attr, int type, mode_t amode); 232 + const struct attribute *attr, int type, umode_t amode); 233 233 /* 234 234 * bin.c 235 235 */
+1 -1
fs/sysv/ialloc.c
··· 132 132 brelse(bh); 133 133 } 134 134 135 - struct inode * sysv_new_inode(const struct inode * dir, mode_t mode) 135 + struct inode * sysv_new_inode(const struct inode * dir, umode_t mode) 136 136 { 137 137 struct super_block *sb = dir->i_sb; 138 138 struct sysv_sb_info *sbi = SYSV_SB(sb);
+3 -3
fs/sysv/namei.c
··· 61 61 return NULL; 62 62 } 63 63 64 - static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, dev_t rdev) 64 + static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, dev_t rdev) 65 65 { 66 66 struct inode * inode; 67 67 int err; ··· 80 80 return err; 81 81 } 82 82 83 - static int sysv_create(struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) 83 + static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) 84 84 { 85 85 return sysv_mknod(dir, dentry, mode, 0); 86 86 } ··· 131 131 return add_nondir(dentry, inode); 132 132 } 133 133 134 - static int sysv_mkdir(struct inode * dir, struct dentry *dentry, int mode) 134 + static int sysv_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode) 135 135 { 136 136 struct inode * inode; 137 137 int err = -EMLINK;
+1 -1
fs/sysv/sysv.h
··· 125 125 /* ialloc.c */ 126 126 extern struct sysv_inode *sysv_raw_inode(struct super_block *, unsigned, 127 127 struct buffer_head **); 128 - extern struct inode * sysv_new_inode(const struct inode *, mode_t); 128 + extern struct inode * sysv_new_inode(const struct inode *, umode_t); 129 129 extern void sysv_free_inode(struct inode *); 130 130 extern unsigned long sysv_count_free_inodes(struct super_block *); 131 131
+7 -7
fs/ubifs/dir.c
··· 56 56 * 57 57 * This function returns the inherited flags. 58 58 */ 59 - static int inherit_flags(const struct inode *dir, int mode) 59 + static int inherit_flags(const struct inode *dir, umode_t mode) 60 60 { 61 61 int flags; 62 62 const struct ubifs_inode *ui = ubifs_inode(dir); ··· 86 86 * case of failure. 87 87 */ 88 88 struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir, 89 - int mode) 89 + umode_t mode) 90 90 { 91 91 struct inode *inode; 92 92 struct ubifs_inode *ui; ··· 253 253 return ERR_PTR(err); 254 254 } 255 255 256 - static int ubifs_create(struct inode *dir, struct dentry *dentry, int mode, 256 + static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 257 257 struct nameidata *nd) 258 258 { 259 259 struct inode *inode; ··· 268 268 * parent directory inode. 269 269 */ 270 270 271 - dbg_gen("dent '%.*s', mode %#x in dir ino %lu", 271 + dbg_gen("dent '%.*s', mode %#hx in dir ino %lu", 272 272 dentry->d_name.len, dentry->d_name.name, mode, dir->i_ino); 273 273 274 274 err = ubifs_budget_space(c, &req); ··· 712 712 return err; 713 713 } 714 714 715 - static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, int mode) 715 + static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 716 716 { 717 717 struct inode *inode; 718 718 struct ubifs_inode *dir_ui = ubifs_inode(dir); ··· 725 725 * directory inode. 726 726 */ 727 727 728 - dbg_gen("dent '%.*s', mode %#x in dir ino %lu", 728 + dbg_gen("dent '%.*s', mode %#hx in dir ino %lu", 729 729 dentry->d_name.len, dentry->d_name.name, mode, dir->i_ino); 730 730 731 731 err = ubifs_budget_space(c, &req); ··· 769 769 } 770 770 771 771 static int ubifs_mknod(struct inode *dir, struct dentry *dentry, 772 - int mode, dev_t rdev) 772 + umode_t mode, dev_t rdev) 773 773 { 774 774 struct inode *inode; 775 775 struct ubifs_inode *ui;
+1 -1
fs/ubifs/ubifs.h
··· 1734 1734 1735 1735 /* dir.c */ 1736 1736 struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir, 1737 - int mode); 1737 + umode_t mode); 1738 1738 int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry, 1739 1739 struct kstat *stat); 1740 1740
+1 -1
fs/udf/ialloc.c
··· 46 46 udf_free_blocks(sb, NULL, &UDF_I(inode)->i_location, 0, 1); 47 47 } 48 48 49 - struct inode *udf_new_inode(struct inode *dir, int mode, int *err) 49 + struct inode *udf_new_inode(struct inode *dir, umode_t mode, int *err) 50 50 { 51 51 struct super_block *sb = dir->i_sb; 52 52 struct udf_sb_info *sbi = UDF_SB(sb);
+3 -3
fs/udf/inode.c
··· 48 48 49 49 #define EXTENT_MERGE_SIZE 5 50 50 51 - static mode_t udf_convert_permissions(struct fileEntry *); 51 + static umode_t udf_convert_permissions(struct fileEntry *); 52 52 static int udf_update_inode(struct inode *, int); 53 53 static void udf_fill_inode(struct inode *, struct buffer_head *); 54 54 static int udf_sync_inode(struct inode *inode); ··· 1452 1452 return 0; 1453 1453 } 1454 1454 1455 - static mode_t udf_convert_permissions(struct fileEntry *fe) 1455 + static umode_t udf_convert_permissions(struct fileEntry *fe) 1456 1456 { 1457 - mode_t mode; 1457 + umode_t mode; 1458 1458 uint32_t permissions; 1459 1459 uint32_t flags; 1460 1460
+3 -3
fs/udf/namei.c
··· 552 552 return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); 553 553 } 554 554 555 - static int udf_create(struct inode *dir, struct dentry *dentry, int mode, 555 + static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, 556 556 struct nameidata *nd) 557 557 { 558 558 struct udf_fileident_bh fibh; ··· 596 596 return 0; 597 597 } 598 598 599 - static int udf_mknod(struct inode *dir, struct dentry *dentry, int mode, 599 + static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 600 600 dev_t rdev) 601 601 { 602 602 struct inode *inode; ··· 640 640 return err; 641 641 } 642 642 643 - static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode) 643 + static int udf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 644 644 { 645 645 struct inode *inode; 646 646 struct udf_fileident_bh fibh;
+6 -6
fs/udf/super.c
··· 195 195 unsigned int fileset; 196 196 unsigned int rootdir; 197 197 unsigned int flags; 198 - mode_t umask; 198 + umode_t umask; 199 199 gid_t gid; 200 200 uid_t uid; 201 - mode_t fmode; 202 - mode_t dmode; 201 + umode_t fmode; 202 + umode_t dmode; 203 203 struct nls_table *nls_map; 204 204 }; 205 205 ··· 279 279 if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_SET)) 280 280 seq_printf(seq, ",gid=%u", sbi->s_gid); 281 281 if (sbi->s_umask != 0) 282 - seq_printf(seq, ",umask=%o", sbi->s_umask); 282 + seq_printf(seq, ",umask=%ho", sbi->s_umask); 283 283 if (sbi->s_fmode != UDF_INVALID_MODE) 284 - seq_printf(seq, ",mode=%o", sbi->s_fmode); 284 + seq_printf(seq, ",mode=%ho", sbi->s_fmode); 285 285 if (sbi->s_dmode != UDF_INVALID_MODE) 286 - seq_printf(seq, ",dmode=%o", sbi->s_dmode); 286 + seq_printf(seq, ",dmode=%ho", sbi->s_dmode); 287 287 if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET)) 288 288 seq_printf(seq, ",session=%u", sbi->s_session); 289 289 if (UDF_QUERY_FLAG(sb, UDF_FLAG_LASTBLOCK_SET))
+4 -4
fs/udf/udf_sb.h
··· 50 50 #define UDF_SPARABLE_MAP15 0x1522U 51 51 #define UDF_METADATA_MAP25 0x2511U 52 52 53 - #define UDF_INVALID_MODE ((mode_t)-1) 53 + #define UDF_INVALID_MODE ((umode_t)-1) 54 54 55 55 #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ 56 56 ··· 127 127 struct buffer_head *s_lvid_bh; 128 128 129 129 /* Default permissions */ 130 - mode_t s_umask; 130 + umode_t s_umask; 131 131 gid_t s_gid; 132 132 uid_t s_uid; 133 - mode_t s_fmode; 134 - mode_t s_dmode; 133 + umode_t s_fmode; 134 + umode_t s_dmode; 135 135 /* Lock protecting consistency of above permission settings */ 136 136 rwlock_t s_cred_lock; 137 137
+1 -1
fs/udf/udfdecl.h
··· 215 215 216 216 /* ialloc.c */ 217 217 extern void udf_free_inode(struct inode *); 218 - extern struct inode *udf_new_inode(struct inode *, int, int *); 218 + extern struct inode *udf_new_inode(struct inode *, umode_t, int *); 219 219 220 220 /* truncate.c */ 221 221 extern void udf_truncate_tail_extent(struct inode *);
+1 -1
fs/ufs/ialloc.c
··· 170 170 * For other inodes, search forward from the parent directory's block 171 171 * group to find a free inode. 172 172 */ 173 - struct inode * ufs_new_inode(struct inode * dir, int mode) 173 + struct inode *ufs_new_inode(struct inode *dir, umode_t mode) 174 174 { 175 175 struct super_block * sb; 176 176 struct ufs_sb_info * sbi;
+2 -2
fs/ufs/inode.c
··· 583 583 { 584 584 struct ufs_inode_info *ufsi = UFS_I(inode); 585 585 struct super_block *sb = inode->i_sb; 586 - mode_t mode; 586 + umode_t mode; 587 587 588 588 /* 589 589 * Copy data to the in-core inode. ··· 630 630 { 631 631 struct ufs_inode_info *ufsi = UFS_I(inode); 632 632 struct super_block *sb = inode->i_sb; 633 - mode_t mode; 633 + umode_t mode; 634 634 635 635 UFSD("Reading ufs2 inode, ino %lu\n", inode->i_ino); 636 636 /*
+3 -3
fs/ufs/namei.c
··· 70 70 * If the create succeeds, we fill in the inode information 71 71 * with d_instantiate(). 72 72 */ 73 - static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, 73 + static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, 74 74 struct nameidata *nd) 75 75 { 76 76 struct inode *inode; ··· 94 94 return err; 95 95 } 96 96 97 - static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 97 + static int ufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 98 98 { 99 99 struct inode *inode; 100 100 int err; ··· 180 180 return error; 181 181 } 182 182 183 - static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode) 183 + static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) 184 184 { 185 185 struct inode * inode; 186 186 int err = -EMLINK;
+1 -1
fs/ufs/ufs.h
··· 104 104 105 105 /* ialloc.c */ 106 106 extern void ufs_free_inode (struct inode *inode); 107 - extern struct inode * ufs_new_inode (struct inode *, int); 107 + extern struct inode * ufs_new_inode (struct inode *, umode_t); 108 108 109 109 /* inode.c */ 110 110 extern struct inode *ufs_iget(struct super_block *, unsigned long);
+2 -2
fs/xfs/xfs_ialloc.c
··· 447 447 xfs_ialloc_ag_select( 448 448 xfs_trans_t *tp, /* transaction pointer */ 449 449 xfs_ino_t parent, /* parent directory inode number */ 450 - mode_t mode, /* bits set to indicate file type */ 450 + umode_t mode, /* bits set to indicate file type */ 451 451 int okalloc) /* ok to allocate more space */ 452 452 { 453 453 xfs_buf_t *agbp; /* allocation group header buffer */ ··· 640 640 xfs_dialloc( 641 641 xfs_trans_t *tp, /* transaction pointer */ 642 642 xfs_ino_t parent, /* parent inode (directory) */ 643 - mode_t mode, /* mode bits for new inode */ 643 + umode_t mode, /* mode bits for new inode */ 644 644 int okalloc, /* ok to allocate more space */ 645 645 xfs_buf_t **IO_agbp, /* in/out ag header's buffer */ 646 646 boolean_t *alloc_done, /* true if we needed to replenish
+1 -1
fs/xfs/xfs_ialloc.h
··· 81 81 xfs_dialloc( 82 82 struct xfs_trans *tp, /* transaction pointer */ 83 83 xfs_ino_t parent, /* parent inode (directory) */ 84 - mode_t mode, /* mode bits for new inode */ 84 + umode_t mode, /* mode bits for new inode */ 85 85 int okalloc, /* ok to allocate more space */ 86 86 struct xfs_buf **agbp, /* buf for a.g. inode header */ 87 87 boolean_t *alloc_done, /* an allocation was done to replenish
+2 -2
fs/xfs/xfs_inode.c
··· 961 961 xfs_ialloc( 962 962 xfs_trans_t *tp, 963 963 xfs_inode_t *pip, 964 - mode_t mode, 964 + umode_t mode, 965 965 xfs_nlink_t nlink, 966 966 xfs_dev_t rdev, 967 967 prid_t prid, ··· 1002 1002 return error; 1003 1003 ASSERT(ip != NULL); 1004 1004 1005 - ip->i_d.di_mode = (__uint16_t)mode; 1005 + ip->i_d.di_mode = mode; 1006 1006 ip->i_d.di_onlink = 0; 1007 1007 ip->i_d.di_nlink = nlink; 1008 1008 ASSERT(ip->i_d.di_nlink == nlink);
+1 -1
fs/xfs/xfs_inode.h
··· 481 481 /* 482 482 * xfs_inode.c prototypes. 483 483 */ 484 - int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, 484 + int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, umode_t, 485 485 xfs_nlink_t, xfs_dev_t, prid_t, int, 486 486 struct xfs_buf **, boolean_t *, xfs_inode_t **); 487 487
+4 -4
fs/xfs/xfs_iops.c
··· 168 168 xfs_vn_mknod( 169 169 struct inode *dir, 170 170 struct dentry *dentry, 171 - int mode, 171 + umode_t mode, 172 172 dev_t rdev) 173 173 { 174 174 struct inode *inode; ··· 231 231 xfs_vn_create( 232 232 struct inode *dir, 233 233 struct dentry *dentry, 234 - int mode, 234 + umode_t mode, 235 235 struct nameidata *nd) 236 236 { 237 237 return xfs_vn_mknod(dir, dentry, mode, 0); ··· 241 241 xfs_vn_mkdir( 242 242 struct inode *dir, 243 243 struct dentry *dentry, 244 - int mode) 244 + umode_t mode) 245 245 { 246 246 return xfs_vn_mknod(dir, dentry, mode|S_IFDIR, 0); 247 247 } ··· 366 366 struct xfs_inode *cip = NULL; 367 367 struct xfs_name name; 368 368 int error; 369 - mode_t mode; 369 + umode_t mode; 370 370 371 371 mode = S_IFLNK | 372 372 (irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO);
+1 -1
fs/xfs/xfs_utils.c
··· 53 53 output: may be a new transaction. */ 54 54 xfs_inode_t *dp, /* directory within whose allocate 55 55 the inode. */ 56 - mode_t mode, 56 + umode_t mode, 57 57 xfs_nlink_t nlink, 58 58 xfs_dev_t rdev, 59 59 prid_t prid, /* project id */
+1 -1
fs/xfs/xfs_utils.h
··· 18 18 #ifndef __XFS_UTILS_H__ 19 19 #define __XFS_UTILS_H__ 20 20 21 - extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t, 21 + extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, umode_t, xfs_nlink_t, 22 22 xfs_dev_t, prid_t, int, xfs_inode_t **, int *); 23 23 extern int xfs_droplink(xfs_trans_t *, xfs_inode_t *); 24 24 extern int xfs_bumplink(xfs_trans_t *, xfs_inode_t *);
+2 -2
fs/xfs/xfs_vnodeops.c
··· 822 822 xfs_create( 823 823 xfs_inode_t *dp, 824 824 struct xfs_name *name, 825 - mode_t mode, 825 + umode_t mode, 826 826 xfs_dev_t rdev, 827 827 xfs_inode_t **ipp) 828 828 { ··· 1481 1481 xfs_inode_t *dp, 1482 1482 struct xfs_name *link_name, 1483 1483 const char *target_path, 1484 - mode_t mode, 1484 + umode_t mode, 1485 1485 xfs_inode_t **ipp) 1486 1486 { 1487 1487 xfs_mount_t *mp = dp->i_mount;
+2 -2
fs/xfs/xfs_vnodeops.h
··· 26 26 int xfs_inactive(struct xfs_inode *ip); 27 27 int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name, 28 28 struct xfs_inode **ipp, struct xfs_name *ci_name); 29 - int xfs_create(struct xfs_inode *dp, struct xfs_name *name, mode_t mode, 29 + int xfs_create(struct xfs_inode *dp, struct xfs_name *name, umode_t mode, 30 30 xfs_dev_t rdev, struct xfs_inode **ipp); 31 31 int xfs_remove(struct xfs_inode *dp, struct xfs_name *name, 32 32 struct xfs_inode *ip); ··· 35 35 int xfs_readdir(struct xfs_inode *dp, void *dirent, size_t bufsize, 36 36 xfs_off_t *offset, filldir_t filldir); 37 37 int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name, 38 - const char *target_path, mode_t mode, struct xfs_inode **ipp); 38 + const char *target_path, umode_t mode, struct xfs_inode **ipp); 39 39 int xfs_set_dmattrs(struct xfs_inode *ip, u_int evmask, u_int16_t state); 40 40 int xfs_change_file_space(struct xfs_inode *ip, int cmd, 41 41 xfs_flock64_t *bf, xfs_off_t offset, int attr_flags);
-6
include/asm-generic/types.h
··· 6 6 */ 7 7 #include <asm-generic/int-ll64.h> 8 8 9 - #ifndef __ASSEMBLY__ 10 - 11 - typedef unsigned short umode_t; 12 - 13 - #endif /* __ASSEMBLY__ */ 14 - 15 9 #endif /* _ASM_GENERIC_TYPES_H */
+4 -4
include/linux/audit.h
··· 468 468 #define audit_get_sessionid(t) ((t)->sessionid) 469 469 extern void audit_log_task_context(struct audit_buffer *ab); 470 470 extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 471 - extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); 471 + extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); 472 472 extern int audit_bprm(struct linux_binprm *bprm); 473 473 extern void audit_socketcall(int nargs, unsigned long *args); 474 474 extern int audit_sockaddr(int len, void *addr); 475 475 extern void __audit_fd_pair(int fd1, int fd2); 476 476 extern int audit_set_macxattr(const char *name); 477 - extern void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr); 477 + extern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr); 478 478 extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout); 479 479 extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification); 480 480 extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); ··· 494 494 if (unlikely(!audit_dummy_context())) 495 495 __audit_fd_pair(fd1, fd2); 496 496 } 497 - static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) 497 + static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) 498 498 { 499 499 if (unlikely(!audit_dummy_context())) 500 500 __audit_ipc_set_perm(qbytes, uid, gid, mode); 501 501 } 502 - static inline void audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr) 502 + static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) 503 503 { 504 504 if (unlikely(!audit_dummy_context())) 505 505 __audit_mq_open(oflag, mode, attr);
+1 -1
include/linux/cgroup.h
··· 319 319 * If not 0, file mode is set to this value, otherwise it will 320 320 * be figured out automatically 321 321 */ 322 - mode_t mode; 322 + umode_t mode; 323 323 324 324 /* 325 325 * If non-zero, defines the maximum length of string that can
+2 -2
include/linux/compat.h
··· 422 422 asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, 423 423 unsigned int nr_segs, unsigned int flags); 424 424 asmlinkage long compat_sys_open(const char __user *filename, int flags, 425 - int mode); 425 + umode_t mode); 426 426 asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, 427 - int flags, int mode); 427 + int flags, umode_t mode); 428 428 asmlinkage long compat_sys_open_by_handle_at(int mountdirfd, 429 429 struct file_handle __user *handle, 430 430 int flags);
+1 -1
include/linux/configfs.h
··· 124 124 struct configfs_attribute { 125 125 const char *ca_name; 126 126 struct module *ca_owner; 127 - mode_t ca_mode; 127 + umode_t ca_mode; 128 128 }; 129 129 130 130 /*
+23 -23
include/linux/debugfs.h
··· 34 34 extern const struct file_operations debugfs_file_operations; 35 35 extern const struct inode_operations debugfs_link_operations; 36 36 37 - struct dentry *debugfs_create_file(const char *name, mode_t mode, 37 + struct dentry *debugfs_create_file(const char *name, umode_t mode, 38 38 struct dentry *parent, void *data, 39 39 const struct file_operations *fops); 40 40 ··· 49 49 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, 50 50 struct dentry *new_dir, const char *new_name); 51 51 52 - struct dentry *debugfs_create_u8(const char *name, mode_t mode, 52 + struct dentry *debugfs_create_u8(const char *name, umode_t mode, 53 53 struct dentry *parent, u8 *value); 54 - struct dentry *debugfs_create_u16(const char *name, mode_t mode, 54 + struct dentry *debugfs_create_u16(const char *name, umode_t mode, 55 55 struct dentry *parent, u16 *value); 56 - struct dentry *debugfs_create_u32(const char *name, mode_t mode, 56 + struct dentry *debugfs_create_u32(const char *name, umode_t mode, 57 57 struct dentry *parent, u32 *value); 58 - struct dentry *debugfs_create_u64(const char *name, mode_t mode, 58 + struct dentry *debugfs_create_u64(const char *name, umode_t mode, 59 59 struct dentry *parent, u64 *value); 60 - struct dentry *debugfs_create_x8(const char *name, mode_t mode, 60 + struct dentry *debugfs_create_x8(const char *name, umode_t mode, 61 61 struct dentry *parent, u8 *value); 62 - struct dentry *debugfs_create_x16(const char *name, mode_t mode, 62 + struct dentry *debugfs_create_x16(const char *name, umode_t mode, 63 63 struct dentry *parent, u16 *value); 64 - struct dentry *debugfs_create_x32(const char *name, mode_t mode, 64 + struct dentry *debugfs_create_x32(const char *name, umode_t mode, 65 65 struct dentry *parent, u32 *value); 66 - struct dentry *debugfs_create_x64(const char *name, mode_t mode, 66 + struct dentry *debugfs_create_x64(const char *name, umode_t mode, 67 67 struct dentry *parent, u64 *value); 68 - struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 68 + struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 69 69 struct dentry *parent, size_t *value); 70 - struct dentry *debugfs_create_bool(const char *name, mode_t mode, 70 + struct dentry *debugfs_create_bool(const char *name, umode_t mode, 71 71 struct dentry *parent, u32 *value); 72 72 73 - struct dentry *debugfs_create_blob(const char *name, mode_t mode, 73 + struct dentry *debugfs_create_blob(const char *name, umode_t mode, 74 74 struct dentry *parent, 75 75 struct debugfs_blob_wrapper *blob); 76 76 ··· 86 86 * want to duplicate the design decision mistakes of procfs and devfs again. 87 87 */ 88 88 89 - static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, 89 + static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, 90 90 struct dentry *parent, void *data, 91 91 const struct file_operations *fops) 92 92 { ··· 118 118 return ERR_PTR(-ENODEV); 119 119 } 120 120 121 - static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, 121 + static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, 122 122 struct dentry *parent, 123 123 u8 *value) 124 124 { 125 125 return ERR_PTR(-ENODEV); 126 126 } 127 127 128 - static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode, 128 + static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, 129 129 struct dentry *parent, 130 130 u16 *value) 131 131 { 132 132 return ERR_PTR(-ENODEV); 133 133 } 134 134 135 - static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode, 135 + static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, 136 136 struct dentry *parent, 137 137 u32 *value) 138 138 { 139 139 return ERR_PTR(-ENODEV); 140 140 } 141 141 142 - static inline struct dentry *debugfs_create_u64(const char *name, mode_t mode, 142 + static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, 143 143 struct dentry *parent, 144 144 u64 *value) 145 145 { 146 146 return ERR_PTR(-ENODEV); 147 147 } 148 148 149 - static inline struct dentry *debugfs_create_x8(const char *name, mode_t mode, 149 + static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, 150 150 struct dentry *parent, 151 151 u8 *value) 152 152 { 153 153 return ERR_PTR(-ENODEV); 154 154 } 155 155 156 - static inline struct dentry *debugfs_create_x16(const char *name, mode_t mode, 156 + static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, 157 157 struct dentry *parent, 158 158 u16 *value) 159 159 { 160 160 return ERR_PTR(-ENODEV); 161 161 } 162 162 163 - static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode, 163 + static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, 164 164 struct dentry *parent, 165 165 u32 *value) 166 166 { 167 167 return ERR_PTR(-ENODEV); 168 168 } 169 169 170 - static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 170 + static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 171 171 struct dentry *parent, 172 172 size_t *value) 173 173 { 174 174 return ERR_PTR(-ENODEV); 175 175 } 176 176 177 - static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, 177 + static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, 178 178 struct dentry *parent, 179 179 u32 *value) 180 180 { 181 181 return ERR_PTR(-ENODEV); 182 182 } 183 183 184 - static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode, 184 + static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, 185 185 struct dentry *parent, 186 186 struct debugfs_blob_wrapper *blob) 187 187 {
+3 -3
include/linux/device.h
··· 294 294 struct kobject *dev_kobj; 295 295 296 296 int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); 297 - char *(*devnode)(struct device *dev, mode_t *mode); 297 + char *(*devnode)(struct device *dev, umode_t *mode); 298 298 299 299 void (*class_release)(struct class *class); 300 300 void (*dev_release)(struct device *dev); ··· 423 423 const char *name; 424 424 const struct attribute_group **groups; 425 425 int (*uevent)(struct device *dev, struct kobj_uevent_env *env); 426 - char *(*devnode)(struct device *dev, mode_t *mode); 426 + char *(*devnode)(struct device *dev, umode_t *mode); 427 427 void (*release)(struct device *dev); 428 428 429 429 const struct dev_pm_ops *pm; ··· 720 720 extern int device_move(struct device *dev, struct device *new_parent, 721 721 enum dpm_order dpm_order); 722 722 extern const char *device_get_devnode(struct device *dev, 723 - mode_t *mode, const char **tmp); 723 + umode_t *mode, const char **tmp); 724 724 extern void *dev_get_drvdata(const struct device *dev); 725 725 extern int dev_set_drvdata(struct device *dev, void *data); 726 726
+1 -1
include/linux/ext3_fs.h
··· 884 884 885 885 /* ialloc.c */ 886 886 extern struct inode * ext3_new_inode (handle_t *, struct inode *, 887 - const struct qstr *, int); 887 + const struct qstr *, umode_t); 888 888 extern void ext3_free_inode (handle_t *, struct inode *); 889 889 extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); 890 890 extern unsigned long ext3_count_free_inodes (struct super_block *);
+13 -10
include/linux/fs.h
··· 1516 1516 /* 1517 1517 * VFS helper functions.. 1518 1518 */ 1519 - extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); 1520 - extern int vfs_mkdir(struct inode *, struct dentry *, int); 1521 - extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); 1519 + extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 1520 + extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); 1521 + extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 1522 1522 extern int vfs_symlink(struct inode *, struct dentry *, const char *); 1523 1523 extern int vfs_link(struct dentry *, struct inode *, struct dentry *); 1524 1524 extern int vfs_rmdir(struct inode *, struct dentry *); ··· 1534 1534 * VFS file helper functions. 1535 1535 */ 1536 1536 extern void inode_init_owner(struct inode *inode, const struct inode *dir, 1537 - mode_t mode); 1537 + umode_t mode); 1538 1538 /* 1539 1539 * VFS FS_IOC_FIEMAP helper definitions. 1540 1540 */ ··· 1619 1619 int (*readlink) (struct dentry *, char __user *,int); 1620 1620 void (*put_link) (struct dentry *, struct nameidata *, void *); 1621 1621 1622 - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); 1622 + int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); 1623 1623 int (*link) (struct dentry *,struct inode *,struct dentry *); 1624 1624 int (*unlink) (struct inode *,struct dentry *); 1625 1625 int (*symlink) (struct inode *,struct dentry *,const char *); 1626 - int (*mkdir) (struct inode *,struct dentry *,int); 1626 + int (*mkdir) (struct inode *,struct dentry *,umode_t); 1627 1627 int (*rmdir) (struct inode *,struct dentry *); 1628 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 1628 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 1629 1629 int (*rename) (struct inode *, struct dentry *, 1630 1630 struct inode *, struct dentry *); 1631 1631 void (*truncate) (struct inode *); ··· 2054 2054 extern int do_fallocate(struct file *file, int mode, loff_t offset, 2055 2055 loff_t len); 2056 2056 extern long do_sys_open(int dfd, const char __user *filename, int flags, 2057 - int mode); 2058 - extern struct file *filp_open(const char *, int, int); 2057 + umode_t mode); 2058 + extern struct file *filp_open(const char *, int, umode_t); 2059 2059 extern struct file *file_open_root(struct dentry *, struct vfsmount *, 2060 2060 const char *, int); 2061 2061 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, ··· 2092 2092 extern void bdput(struct block_device *); 2093 2093 extern void invalidate_bdev(struct block_device *); 2094 2094 extern int sync_blockdev(struct block_device *bdev); 2095 + extern void kill_bdev(struct block_device *); 2095 2096 extern struct super_block *freeze_bdev(struct block_device *); 2096 2097 extern void emergency_thaw_all(void); 2097 2098 extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); ··· 2100 2099 #else 2101 2100 static inline void bd_forget(struct inode *inode) {} 2102 2101 static inline int sync_blockdev(struct block_device *bdev) { return 0; } 2102 + static inline void kill_bdev(struct block_device *bdev) {} 2103 2103 static inline void invalidate_bdev(struct block_device *bdev) {} 2104 2104 2105 2105 static inline struct super_block *freeze_bdev(struct block_device *sb) ··· 2417 2415 unsigned long nr_segs, loff_t pos); 2418 2416 extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end, 2419 2417 int datasync); 2418 + extern void block_sync_page(struct page *page); 2420 2419 2421 2420 /* fs/splice.c */ 2422 2421 extern ssize_t generic_file_splice_read(struct file *, loff_t *, ··· 2693 2690 #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ 2694 2691 (flag & __FMODE_NONOTIFY))) 2695 2692 2696 - static inline int is_sxid(mode_t mode) 2693 + static inline int is_sxid(umode_t mode) 2697 2694 { 2698 2695 return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); 2699 2696 }
+1 -1
include/linux/genhd.h
··· 163 163 * disks that can't be partitioned. */ 164 164 165 165 char disk_name[DISK_NAME_LEN]; /* name of major driver */ 166 - char *(*devnode)(struct gendisk *gd, mode_t *mode); 166 + char *(*devnode)(struct gendisk *gd, umode_t *mode); 167 167 168 168 unsigned int events; /* supported events */ 169 169 unsigned int async_events; /* async events, subset of all */
+1 -1
include/linux/ide.h
··· 920 920 921 921 typedef struct { 922 922 const char *name; 923 - mode_t mode; 923 + umode_t mode; 924 924 const struct file_operations *proc_fops; 925 925 } ide_proc_entry_t; 926 926
+1 -1
include/linux/ipc.h
··· 93 93 gid_t gid; 94 94 uid_t cuid; 95 95 gid_t cgid; 96 - mode_t mode; 96 + umode_t mode; 97 97 unsigned long seq; 98 98 void *security; 99 99 };
+4 -4
include/linux/iscsi_boot_sysfs.h
··· 91 91 * The enum of the type. This can be any value of the above 92 92 * properties. 93 93 */ 94 - mode_t (*is_visible) (void *data, int type); 94 + umode_t (*is_visible) (void *data, int type); 95 95 96 96 /* 97 97 * Driver specific release function. ··· 110 110 iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, 111 111 void *data, 112 112 ssize_t (*show) (void *data, int type, char *buf), 113 - mode_t (*is_visible) (void *data, int type), 113 + umode_t (*is_visible) (void *data, int type), 114 114 void (*release) (void *data)); 115 115 116 116 struct iscsi_boot_kobj * 117 117 iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, 118 118 void *data, 119 119 ssize_t (*show) (void *data, int type, char *buf), 120 - mode_t (*is_visible) (void *data, int type), 120 + umode_t (*is_visible) (void *data, int type), 121 121 void (*release) (void *data)); 122 122 struct iscsi_boot_kobj * 123 123 iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, 124 124 void *data, 125 125 ssize_t (*show) (void *data, int type, char *buf), 126 - mode_t (*is_visible) (void *data, int type), 126 + umode_t (*is_visible) (void *data, int type), 127 127 void (*release) (void *data)); 128 128 129 129 struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
+1 -1
include/linux/miscdevice.h
··· 54 54 struct device *parent; 55 55 struct device *this_device; 56 56 const char *nodename; 57 - mode_t mode; 57 + umode_t mode; 58 58 }; 59 59 60 60 extern int misc_register(struct miscdevice * misc);
+12 -12
include/linux/proc_fs.h
··· 50 50 51 51 struct proc_dir_entry { 52 52 unsigned int low_ino; 53 - mode_t mode; 53 + umode_t mode; 54 54 nlink_t nlink; 55 55 uid_t uid; 56 56 gid_t gid; ··· 106 106 107 107 void proc_flush_task(struct task_struct *task); 108 108 109 - extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, 109 + extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, 110 110 struct proc_dir_entry *parent); 111 - struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, 111 + struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, 112 112 struct proc_dir_entry *parent, 113 113 const struct file_operations *proc_fops, 114 114 void *data); ··· 146 146 extern struct proc_dir_entry *proc_symlink(const char *, 147 147 struct proc_dir_entry *, const char *); 148 148 extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); 149 - extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, 149 + extern struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, 150 150 struct proc_dir_entry *parent); 151 151 152 - static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode, 152 + static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, 153 153 struct proc_dir_entry *parent, const struct file_operations *proc_fops) 154 154 { 155 155 return proc_create_data(name, mode, parent, proc_fops, NULL); 156 156 } 157 157 158 158 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 159 - mode_t mode, struct proc_dir_entry *base, 159 + umode_t mode, struct proc_dir_entry *base, 160 160 read_proc_t *read_proc, void * data) 161 161 { 162 162 struct proc_dir_entry *res=create_proc_entry(name,mode,base); ··· 168 168 } 169 169 170 170 extern struct proc_dir_entry *proc_net_fops_create(struct net *net, 171 - const char *name, mode_t mode, const struct file_operations *fops); 171 + const char *name, umode_t mode, const struct file_operations *fops); 172 172 extern void proc_net_remove(struct net *net, const char *name); 173 173 extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, 174 174 struct proc_dir_entry *parent); ··· 185 185 } 186 186 187 187 static inline struct proc_dir_entry *create_proc_entry(const char *name, 188 - mode_t mode, struct proc_dir_entry *parent) { return NULL; } 188 + umode_t mode, struct proc_dir_entry *parent) { return NULL; } 189 189 static inline struct proc_dir_entry *proc_create(const char *name, 190 - mode_t mode, struct proc_dir_entry *parent, 190 + umode_t mode, struct proc_dir_entry *parent, 191 191 const struct file_operations *proc_fops) 192 192 { 193 193 return NULL; 194 194 } 195 195 static inline struct proc_dir_entry *proc_create_data(const char *name, 196 - mode_t mode, struct proc_dir_entry *parent, 196 + umode_t mode, struct proc_dir_entry *parent, 197 197 const struct file_operations *proc_fops, void *data) 198 198 { 199 199 return NULL; ··· 205 205 static inline struct proc_dir_entry *proc_mkdir(const char *name, 206 206 struct proc_dir_entry *parent) {return NULL;} 207 207 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, 208 - mode_t mode, struct proc_dir_entry *parent) { return NULL; } 208 + umode_t mode, struct proc_dir_entry *parent) { return NULL; } 209 209 210 210 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 211 - mode_t mode, struct proc_dir_entry *base, 211 + umode_t mode, struct proc_dir_entry *base, 212 212 read_proc_t *read_proc, void * data) { return NULL; } 213 213 214 214 struct tty_driver;
+1 -1
include/linux/ramfs.h
··· 2 2 #define _LINUX_RAMFS_H 3 3 4 4 struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, 5 - int mode, dev_t dev); 5 + umode_t mode, dev_t dev); 6 6 extern struct dentry *ramfs_mount(struct file_system_type *fs_type, 7 7 int flags, const char *dev_name, void *data); 8 8
+1 -1
include/linux/reiserfs_fs.h
··· 2056 2056 2057 2057 struct reiserfs_security_handle; 2058 2058 int reiserfs_new_inode(struct reiserfs_transaction_handle *th, 2059 - struct inode *dir, int mode, 2059 + struct inode *dir, umode_t mode, 2060 2060 const char *symname, loff_t i_size, 2061 2061 struct dentry *dentry, struct inode *inode, 2062 2062 struct reiserfs_security_handle *security);
+1 -1
include/linux/relay.h
··· 144 144 */ 145 145 struct dentry *(*create_buf_file)(const char *filename, 146 146 struct dentry *parent, 147 - int mode, 147 + umode_t mode, 148 148 struct rchan_buf *buf, 149 149 int *is_global); 150 150
+18 -18
include/linux/security.h
··· 1424 1424 1425 1425 #ifdef CONFIG_SECURITY_PATH 1426 1426 int (*path_unlink) (struct path *dir, struct dentry *dentry); 1427 - int (*path_mkdir) (struct path *dir, struct dentry *dentry, int mode); 1427 + int (*path_mkdir) (struct path *dir, struct dentry *dentry, umode_t mode); 1428 1428 int (*path_rmdir) (struct path *dir, struct dentry *dentry); 1429 - int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, 1429 + int (*path_mknod) (struct path *dir, struct dentry *dentry, umode_t mode, 1430 1430 unsigned int dev); 1431 1431 int (*path_truncate) (struct path *path); 1432 1432 int (*path_symlink) (struct path *dir, struct dentry *dentry, ··· 1436 1436 int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, 1437 1437 struct path *new_dir, struct dentry *new_dentry); 1438 1438 int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt, 1439 - mode_t mode); 1439 + umode_t mode); 1440 1440 int (*path_chown) (struct path *path, uid_t uid, gid_t gid); 1441 1441 int (*path_chroot) (struct path *path); 1442 1442 #endif ··· 1447 1447 const struct qstr *qstr, char **name, 1448 1448 void **value, size_t *len); 1449 1449 int (*inode_create) (struct inode *dir, 1450 - struct dentry *dentry, int mode); 1450 + struct dentry *dentry, umode_t mode); 1451 1451 int (*inode_link) (struct dentry *old_dentry, 1452 1452 struct inode *dir, struct dentry *new_dentry); 1453 1453 int (*inode_unlink) (struct inode *dir, struct dentry *dentry); 1454 1454 int (*inode_symlink) (struct inode *dir, 1455 1455 struct dentry *dentry, const char *old_name); 1456 - int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, int mode); 1456 + int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, umode_t mode); 1457 1457 int (*inode_rmdir) (struct inode *dir, struct dentry *dentry); 1458 1458 int (*inode_mknod) (struct inode *dir, struct dentry *dentry, 1459 - int mode, dev_t dev); 1459 + umode_t mode, dev_t dev); 1460 1460 int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry, 1461 1461 struct inode *new_dir, struct dentry *new_dentry); 1462 1462 int (*inode_readlink) (struct dentry *dentry); ··· 1716 1716 int security_old_inode_init_security(struct inode *inode, struct inode *dir, 1717 1717 const struct qstr *qstr, char **name, 1718 1718 void **value, size_t *len); 1719 - int security_inode_create(struct inode *dir, struct dentry *dentry, int mode); 1719 + int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode); 1720 1720 int security_inode_link(struct dentry *old_dentry, struct inode *dir, 1721 1721 struct dentry *new_dentry); 1722 1722 int security_inode_unlink(struct inode *dir, struct dentry *dentry); 1723 1723 int security_inode_symlink(struct inode *dir, struct dentry *dentry, 1724 1724 const char *old_name); 1725 - int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode); 1725 + int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 1726 1726 int security_inode_rmdir(struct inode *dir, struct dentry *dentry); 1727 - int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev); 1727 + int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev); 1728 1728 int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, 1729 1729 struct inode *new_dir, struct dentry *new_dentry); 1730 1730 int security_inode_readlink(struct dentry *dentry); ··· 2061 2061 2062 2062 static inline int security_inode_create(struct inode *dir, 2063 2063 struct dentry *dentry, 2064 - int mode) 2064 + umode_t mode) 2065 2065 { 2066 2066 return 0; 2067 2067 } ··· 2855 2855 2856 2856 #ifdef CONFIG_SECURITY_PATH 2857 2857 int security_path_unlink(struct path *dir, struct dentry *dentry); 2858 - int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode); 2858 + int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode); 2859 2859 int security_path_rmdir(struct path *dir, struct dentry *dentry); 2860 - int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, 2860 + int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, 2861 2861 unsigned int dev); 2862 2862 int security_path_truncate(struct path *path); 2863 2863 int security_path_symlink(struct path *dir, struct dentry *dentry, ··· 2867 2867 int security_path_rename(struct path *old_dir, struct dentry *old_dentry, 2868 2868 struct path *new_dir, struct dentry *new_dentry); 2869 2869 int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 2870 - mode_t mode); 2870 + umode_t mode); 2871 2871 int security_path_chown(struct path *path, uid_t uid, gid_t gid); 2872 2872 int security_path_chroot(struct path *path); 2873 2873 #else /* CONFIG_SECURITY_PATH */ ··· 2877 2877 } 2878 2878 2879 2879 static inline int security_path_mkdir(struct path *dir, struct dentry *dentry, 2880 - int mode) 2880 + umode_t mode) 2881 2881 { 2882 2882 return 0; 2883 2883 } ··· 2888 2888 } 2889 2889 2890 2890 static inline int security_path_mknod(struct path *dir, struct dentry *dentry, 2891 - int mode, unsigned int dev) 2891 + umode_t mode, unsigned int dev) 2892 2892 { 2893 2893 return 0; 2894 2894 } ··· 2921 2921 2922 2922 static inline int security_path_chmod(struct dentry *dentry, 2923 2923 struct vfsmount *mnt, 2924 - mode_t mode) 2924 + umode_t mode) 2925 2925 { 2926 2926 return 0; 2927 2927 } ··· 3010 3010 3011 3011 #ifdef CONFIG_SECURITYFS 3012 3012 3013 - extern struct dentry *securityfs_create_file(const char *name, mode_t mode, 3013 + extern struct dentry *securityfs_create_file(const char *name, umode_t mode, 3014 3014 struct dentry *parent, void *data, 3015 3015 const struct file_operations *fops); 3016 3016 extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); ··· 3025 3025 } 3026 3026 3027 3027 static inline struct dentry *securityfs_create_file(const char *name, 3028 - mode_t mode, 3028 + umode_t mode, 3029 3029 struct dentry *parent, 3030 3030 void *data, 3031 3031 const struct file_operations *fops)
+1 -1
include/linux/shmem_fs.h
··· 30 30 spinlock_t stat_lock; /* Serialize shmem_sb_info changes */ 31 31 uid_t uid; /* Mount uid for root directory */ 32 32 gid_t gid; /* Mount gid for root directory */ 33 - mode_t mode; /* Mount mode for root directory */ 33 + umode_t mode; /* Mount mode for root directory */ 34 34 struct mempolicy *mpol; /* default memory policy for mappings */ 35 35 }; 36 36
+1 -1
include/linux/sunrpc/cache.h
··· 203 203 extern void cache_unregister_net(struct cache_detail *cd, struct net *net); 204 204 205 205 extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, 206 - mode_t, struct cache_detail *); 206 + umode_t, struct cache_detail *); 207 207 extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); 208 208 209 209 extern void qword_add(char **bpp, int *lp, char *str);
+1 -1
include/linux/sunrpc/rpc_pipe_fs.h
··· 55 55 struct cache_detail; 56 56 extern struct dentry *rpc_create_cache_dir(struct dentry *, 57 57 struct qstr *, 58 - mode_t umode, 58 + umode_t umode, 59 59 struct cache_detail *); 60 60 extern void rpc_remove_cache_dir(struct dentry *); 61 61
+12 -12
include/linux/syscalls.h
··· 475 475 asmlinkage long sys_pivot_root(const char __user *new_root, 476 476 const char __user *put_old); 477 477 asmlinkage long sys_chroot(const char __user *filename); 478 - asmlinkage long sys_mknod(const char __user *filename, int mode, 478 + asmlinkage long sys_mknod(const char __user *filename, umode_t mode, 479 479 unsigned dev); 480 480 asmlinkage long sys_link(const char __user *oldname, 481 481 const char __user *newname); ··· 483 483 asmlinkage long sys_unlink(const char __user *pathname); 484 484 asmlinkage long sys_rename(const char __user *oldname, 485 485 const char __user *newname); 486 - asmlinkage long sys_chmod(const char __user *filename, mode_t mode); 487 - asmlinkage long sys_fchmod(unsigned int fd, mode_t mode); 486 + asmlinkage long sys_chmod(const char __user *filename, umode_t mode); 487 + asmlinkage long sys_fchmod(unsigned int fd, umode_t mode); 488 488 489 489 asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg); 490 490 #if BITS_PER_LONG == 32 ··· 517 517 loff_t __user *offset, size_t count); 518 518 asmlinkage long sys_readlink(const char __user *path, 519 519 char __user *buf, int bufsiz); 520 - asmlinkage long sys_creat(const char __user *pathname, int mode); 520 + asmlinkage long sys_creat(const char __user *pathname, umode_t mode); 521 521 asmlinkage long sys_open(const char __user *filename, 522 - int flags, int mode); 522 + int flags, umode_t mode); 523 523 asmlinkage long sys_close(unsigned int fd); 524 524 asmlinkage long sys_access(const char __user *filename, int mode); 525 525 asmlinkage long sys_vhangup(void); ··· 582 582 asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec, 583 583 unsigned long vlen, unsigned long pos_l, unsigned long pos_h); 584 584 asmlinkage long sys_getcwd(char __user *buf, unsigned long size); 585 - asmlinkage long sys_mkdir(const char __user *pathname, int mode); 585 + asmlinkage long sys_mkdir(const char __user *pathname, umode_t mode); 586 586 asmlinkage long sys_chdir(const char __user *filename); 587 587 asmlinkage long sys_fchdir(unsigned int fd); 588 588 asmlinkage long sys_rmdir(const char __user *pathname); ··· 679 679 asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, 680 680 unsigned long third, void __user *ptr, long fifth); 681 681 682 - asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); 682 + asmlinkage long sys_mq_open(const char __user *name, int oflag, umode_t mode, struct mq_attr __user *attr); 683 683 asmlinkage long sys_mq_unlink(const char __user *name); 684 684 asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); 685 685 asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); ··· 753 753 asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, 754 754 __u32 __user *ustatus); 755 755 asmlinkage long sys_spu_create(const char __user *name, 756 - unsigned int flags, mode_t mode, int fd); 756 + unsigned int flags, umode_t mode, int fd); 757 757 758 - asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode, 758 + asmlinkage long sys_mknodat(int dfd, const char __user * filename, umode_t mode, 759 759 unsigned dev); 760 - asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode); 760 + asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, umode_t mode); 761 761 asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); 762 762 asmlinkage long sys_symlinkat(const char __user * oldname, 763 763 int newdfd, const char __user * newname); ··· 769 769 struct timeval __user *utimes); 770 770 asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); 771 771 asmlinkage long sys_fchmodat(int dfd, const char __user * filename, 772 - mode_t mode); 772 + umode_t mode); 773 773 asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, 774 774 gid_t group, int flag); 775 775 asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, 776 - int mode); 776 + umode_t mode); 777 777 asmlinkage long sys_newfstatat(int dfd, const char __user *filename, 778 778 struct stat __user *statbuf, int flag); 779 779 asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
+1 -1
include/linux/sysctl.h
··· 1038 1038 const char *procname; /* Text ID for /proc/sys, or zero */ 1039 1039 void *data; 1040 1040 int maxlen; 1041 - mode_t mode; 1041 + umode_t mode; 1042 1042 struct ctl_table *child; 1043 1043 struct ctl_table *parent; /* Automatically set */ 1044 1044 proc_handler *proc_handler; /* Callback for text formatting */
+4 -4
include/linux/sysfs.h
··· 25 25 26 26 struct attribute { 27 27 const char *name; 28 - mode_t mode; 28 + umode_t mode; 29 29 #ifdef CONFIG_DEBUG_LOCK_ALLOC 30 30 struct lock_class_key *key; 31 31 struct lock_class_key skey; ··· 55 55 56 56 struct attribute_group { 57 57 const char *name; 58 - mode_t (*is_visible)(struct kobject *, 58 + umode_t (*is_visible)(struct kobject *, 59 59 struct attribute *, int); 60 60 struct attribute **attrs; 61 61 }; ··· 133 133 int __must_check sysfs_create_files(struct kobject *kobj, 134 134 const struct attribute **attr); 135 135 int __must_check sysfs_chmod_file(struct kobject *kobj, 136 - const struct attribute *attr, mode_t mode); 136 + const struct attribute *attr, umode_t mode); 137 137 void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); 138 138 void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); 139 139 ··· 221 221 } 222 222 223 223 static inline int sysfs_chmod_file(struct kobject *kobj, 224 - const struct attribute *attr, mode_t mode) 224 + const struct attribute *attr, umode_t mode) 225 225 { 226 226 return 0; 227 227 }
+1
include/linux/types.h
··· 24 24 typedef __kernel_dev_t dev_t; 25 25 typedef __kernel_ino_t ino_t; 26 26 typedef __kernel_mode_t mode_t; 27 + typedef unsigned short umode_t; 27 28 typedef __kernel_nlink_t nlink_t; 28 29 typedef __kernel_off_t off_t; 29 30 typedef __kernel_pid_t pid_t;
+1 -1
include/linux/usb.h
··· 935 935 */ 936 936 struct usb_class_driver { 937 937 char *name; 938 - char *(*devnode)(struct device *dev, mode_t *mode); 938 + char *(*devnode)(struct device *dev, umode_t *mode); 939 939 const struct file_operations *fops; 940 940 int minor_base; 941 941 };
+1 -1
include/scsi/scsi_transport_iscsi.h
··· 142 142 int (*get_iface_param) (struct iscsi_iface *iface, 143 143 enum iscsi_param_type param_type, 144 144 int param, char *buf); 145 - mode_t (*attr_is_visible)(int param_type, int param); 145 + umode_t (*attr_is_visible)(int param_type, int param); 146 146 int (*bsg_request)(struct bsg_job *job); 147 147 }; 148 148
+1 -1
include/sound/info.h
··· 72 72 73 73 struct snd_info_entry { 74 74 const char *name; 75 - mode_t mode; 75 + umode_t mode; 76 76 long size; 77 77 unsigned short content; 78 78 union {
+4 -4
init/initramfs.c
··· 22 22 23 23 static __initdata struct hash { 24 24 int ino, minor, major; 25 - mode_t mode; 25 + umode_t mode; 26 26 struct hash *next; 27 27 char name[N_ALIGN(PATH_MAX)]; 28 28 } *head[32]; ··· 35 35 } 36 36 37 37 static char __init *find_link(int major, int minor, int ino, 38 - mode_t mode, char *name) 38 + umode_t mode, char *name) 39 39 { 40 40 struct hash **p, *q; 41 41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { ··· 120 120 /* cpio header parsing */ 121 121 122 122 static __initdata unsigned long ino, major, minor, nlink; 123 - static __initdata mode_t mode; 123 + static __initdata umode_t mode; 124 124 static __initdata unsigned long body_len, name_len; 125 125 static __initdata uid_t uid; 126 126 static __initdata gid_t gid; ··· 276 276 return 0; 277 277 } 278 278 279 - static void __init clean_path(char *path, mode_t mode) 279 + static void __init clean_path(char *path, umode_t mode) 280 280 { 281 281 struct stat st; 282 282
+4 -4
ipc/mqueue.c
··· 108 108 } 109 109 110 110 static struct inode *mqueue_get_inode(struct super_block *sb, 111 - struct ipc_namespace *ipc_ns, int mode, 111 + struct ipc_namespace *ipc_ns, umode_t mode, 112 112 struct mq_attr *attr) 113 113 { 114 114 struct user_struct *u = current_user(); ··· 295 295 } 296 296 297 297 static int mqueue_create(struct inode *dir, struct dentry *dentry, 298 - int mode, struct nameidata *nd) 298 + umode_t mode, struct nameidata *nd) 299 299 { 300 300 struct inode *inode; 301 301 struct mq_attr *attr = dentry->d_fsdata; ··· 610 610 * Invoked when creating a new queue via sys_mq_open 611 611 */ 612 612 static struct file *do_create(struct ipc_namespace *ipc_ns, struct dentry *dir, 613 - struct dentry *dentry, int oflag, mode_t mode, 613 + struct dentry *dentry, int oflag, umode_t mode, 614 614 struct mq_attr *attr) 615 615 { 616 616 const struct cred *cred = current_cred(); ··· 679 679 return ERR_PTR(ret); 680 680 } 681 681 682 - SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode, 682 + SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode, 683 683 struct mq_attr __user *, u_attr) 684 684 { 685 685 struct dentry *dentry;
+10 -10
kernel/auditsc.c
··· 210 210 struct { 211 211 uid_t uid; 212 212 gid_t gid; 213 - mode_t mode; 213 + umode_t mode; 214 214 u32 osid; 215 215 int has_perm; 216 216 uid_t perm_uid; 217 217 gid_t perm_gid; 218 - mode_t perm_mode; 218 + umode_t perm_mode; 219 219 unsigned long qbytes; 220 220 } ipc; 221 221 struct { ··· 234 234 } mq_sendrecv; 235 235 struct { 236 236 int oflag; 237 - mode_t mode; 237 + umode_t mode; 238 238 struct mq_attr attr; 239 239 } mq_open; 240 240 struct { ··· 308 308 static int audit_match_filetype(struct audit_context *ctx, int which) 309 309 { 310 310 unsigned index = which & ~S_IFMT; 311 - mode_t mode = which & S_IFMT; 311 + umode_t mode = which & S_IFMT; 312 312 313 313 if (unlikely(!ctx)) 314 314 return 0; ··· 1249 1249 case AUDIT_IPC: { 1250 1250 u32 osid = context->ipc.osid; 1251 1251 1252 - audit_log_format(ab, "ouid=%u ogid=%u mode=%#o", 1252 + audit_log_format(ab, "ouid=%u ogid=%u mode=%#ho", 1253 1253 context->ipc.uid, context->ipc.gid, context->ipc.mode); 1254 1254 if (osid) { 1255 1255 char *ctx = NULL; ··· 1267 1267 ab = audit_log_start(context, GFP_KERNEL, 1268 1268 AUDIT_IPC_SET_PERM); 1269 1269 audit_log_format(ab, 1270 - "qbytes=%lx ouid=%u ogid=%u mode=%#o", 1270 + "qbytes=%lx ouid=%u ogid=%u mode=%#ho", 1271 1271 context->ipc.qbytes, 1272 1272 context->ipc.perm_uid, 1273 1273 context->ipc.perm_gid, ··· 1278 1278 break; } 1279 1279 case AUDIT_MQ_OPEN: { 1280 1280 audit_log_format(ab, 1281 - "oflag=0x%x mode=%#o mq_flags=0x%lx mq_maxmsg=%ld " 1281 + "oflag=0x%x mode=%#ho mq_flags=0x%lx mq_maxmsg=%ld " 1282 1282 "mq_msgsize=%ld mq_curmsgs=%ld", 1283 1283 context->mq_open.oflag, context->mq_open.mode, 1284 1284 context->mq_open.attr.mq_flags, ··· 1502 1502 1503 1503 if (n->ino != (unsigned long)-1) { 1504 1504 audit_log_format(ab, " inode=%lu" 1505 - " dev=%02x:%02x mode=%#o" 1505 + " dev=%02x:%02x mode=%#ho" 1506 1506 " ouid=%u ogid=%u rdev=%02x:%02x", 1507 1507 n->ino, 1508 1508 MAJOR(n->dev), ··· 2160 2160 * @attr: queue attributes 2161 2161 * 2162 2162 */ 2163 - void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr) 2163 + void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) 2164 2164 { 2165 2165 struct audit_context *context = current->audit_context; 2166 2166 ··· 2260 2260 * 2261 2261 * Called only after audit_ipc_obj(). 2262 2262 */ 2263 - void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) 2263 + void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) 2264 2264 { 2265 2265 struct audit_context *context = current->audit_context; 2266 2266
+9 -9
kernel/cgroup.c
··· 760 760 * -> cgroup_mkdir. 761 761 */ 762 762 763 - static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode); 763 + static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 764 764 static struct dentry *cgroup_lookup(struct inode *, struct dentry *, struct nameidata *); 765 765 static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); 766 766 static int cgroup_populate_dir(struct cgroup *cgrp); ··· 775 775 static int alloc_css_id(struct cgroup_subsys *ss, 776 776 struct cgroup *parent, struct cgroup *child); 777 777 778 - static struct inode *cgroup_new_inode(mode_t mode, struct super_block *sb) 778 + static struct inode *cgroup_new_inode(umode_t mode, struct super_block *sb) 779 779 { 780 780 struct inode *inode = new_inode(sb); 781 781 ··· 2585 2585 return __d_cft(file->f_dentry); 2586 2586 } 2587 2587 2588 - static int cgroup_create_file(struct dentry *dentry, mode_t mode, 2588 + static int cgroup_create_file(struct dentry *dentry, umode_t mode, 2589 2589 struct super_block *sb) 2590 2590 { 2591 2591 struct inode *inode; ··· 2626 2626 * @mode: mode to set on new directory. 2627 2627 */ 2628 2628 static int cgroup_create_dir(struct cgroup *cgrp, struct dentry *dentry, 2629 - mode_t mode) 2629 + umode_t mode) 2630 2630 { 2631 2631 struct dentry *parent; 2632 2632 int error = 0; ··· 2653 2653 * returns S_IRUGO if it has only a read handler 2654 2654 * returns S_IWUSR if it has only a write hander 2655 2655 */ 2656 - static mode_t cgroup_file_mode(const struct cftype *cft) 2656 + static umode_t cgroup_file_mode(const struct cftype *cft) 2657 2657 { 2658 - mode_t mode = 0; 2658 + umode_t mode = 0; 2659 2659 2660 2660 if (cft->mode) 2661 2661 return cft->mode; ··· 2678 2678 struct dentry *dir = cgrp->dentry; 2679 2679 struct dentry *dentry; 2680 2680 int error; 2681 - mode_t mode; 2681 + umode_t mode; 2682 2682 2683 2683 char name[MAX_CGROUP_TYPE_NAMELEN + MAX_CFTYPE_NAME + 2] = { 0 }; 2684 2684 if (subsys && !test_bit(ROOT_NOPREFIX, &cgrp->root->flags)) { ··· 3752 3752 * Must be called with the mutex on the parent inode held 3753 3753 */ 3754 3754 static long cgroup_create(struct cgroup *parent, struct dentry *dentry, 3755 - mode_t mode) 3755 + umode_t mode) 3756 3756 { 3757 3757 struct cgroup *cgrp; 3758 3758 struct cgroupfs_root *root = parent->root; ··· 3846 3846 return err; 3847 3847 } 3848 3848 3849 - static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode) 3849 + static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 3850 3850 { 3851 3851 struct cgroup *c_parent = dentry->d_parent->d_fsdata; 3852 3852
-1
kernel/power/swap.c
··· 18 18 #include <linux/bitops.h> 19 19 #include <linux/genhd.h> 20 20 #include <linux/device.h> 21 - #include <linux/buffer_head.h> 22 21 #include <linux/bio.h> 23 22 #include <linux/blkdev.h> 24 23 #include <linux/swap.h>
+1 -1
kernel/relay.c
··· 302 302 */ 303 303 static struct dentry *create_buf_file_default_callback(const char *filename, 304 304 struct dentry *parent, 305 - int mode, 305 + umode_t mode, 306 306 struct rchan_buf *buf, 307 307 int *is_global) 308 308 {
+1 -1
kernel/sched.c
··· 6480 6480 static void 6481 6481 set_table_entry(struct ctl_table *entry, 6482 6482 const char *procname, void *data, int maxlen, 6483 - mode_t mode, proc_handler *proc_handler) 6483 + umode_t mode, proc_handler *proc_handler) 6484 6484 { 6485 6485 entry->procname = procname; 6486 6486 entry->data = data;
+1 -1
kernel/trace/blktrace.c
··· 402 402 403 403 static struct dentry *blk_create_buf_file_callback(const char *filename, 404 404 struct dentry *parent, 405 - int mode, 405 + umode_t mode, 406 406 struct rchan_buf *buf, 407 407 int *is_global) 408 408 {
+1 -1
kernel/trace/trace.c
··· 4385 4385 }; 4386 4386 4387 4387 struct dentry *trace_create_file(const char *name, 4388 - mode_t mode, 4388 + umode_t mode, 4389 4389 struct dentry *parent, 4390 4390 void *data, 4391 4391 const struct file_operations *fops)
+1 -1
kernel/trace/trace.h
··· 312 312 void tracing_reset_current_online_cpus(void); 313 313 int tracing_open_generic(struct inode *inode, struct file *filp); 314 314 struct dentry *trace_create_file(const char *name, 315 - mode_t mode, 315 + umode_t mode, 316 316 struct dentry *parent, 317 317 void *data, 318 318 const struct file_operations *fops);
+4 -4
lib/fault-inject.c
··· 149 149 150 150 DEFINE_SIMPLE_ATTRIBUTE(fops_ul, debugfs_ul_get, debugfs_ul_set, "%llu\n"); 151 151 152 - static struct dentry *debugfs_create_ul(const char *name, mode_t mode, 152 + static struct dentry *debugfs_create_ul(const char *name, umode_t mode, 153 153 struct dentry *parent, unsigned long *value) 154 154 { 155 155 return debugfs_create_file(name, mode, parent, value, &fops_ul); ··· 169 169 debugfs_stacktrace_depth_set, "%llu\n"); 170 170 171 171 static struct dentry *debugfs_create_stacktrace_depth( 172 - const char *name, mode_t mode, 172 + const char *name, umode_t mode, 173 173 struct dentry *parent, unsigned long *value) 174 174 { 175 175 return debugfs_create_file(name, mode, parent, value, ··· 193 193 DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, 194 194 debugfs_atomic_t_set, "%lld\n"); 195 195 196 - static struct dentry *debugfs_create_atomic_t(const char *name, mode_t mode, 196 + static struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, 197 197 struct dentry *parent, atomic_t *value) 198 198 { 199 199 return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); ··· 202 202 struct dentry *fault_create_debugfs_attr(const char *name, 203 203 struct dentry *parent, struct fault_attr *attr) 204 204 { 205 - mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 205 + umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 206 206 struct dentry *dir; 207 207 208 208 dir = debugfs_create_dir(name, parent);
+1 -1
mm/failslab.c
··· 35 35 static int __init failslab_debugfs_init(void) 36 36 { 37 37 struct dentry *dir; 38 - mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 38 + umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 39 39 40 40 dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr); 41 41 if (IS_ERR(dir))
+1 -1
mm/filemap.c
··· 1968 1968 */ 1969 1969 int should_remove_suid(struct dentry *dentry) 1970 1970 { 1971 - mode_t mode = dentry->d_inode->i_mode; 1971 + umode_t mode = dentry->d_inode->i_mode; 1972 1972 int kill = 0; 1973 1973 1974 1974 /* suid always must be killed */
+1 -1
mm/page-writeback.c
··· 32 32 #include <linux/sysctl.h> 33 33 #include <linux/cpu.h> 34 34 #include <linux/syscalls.h> 35 - #include <linux/buffer_head.h> 35 + #include <linux/buffer_head.h> /* __set_page_dirty_buffers */ 36 36 #include <linux/pagevec.h> 37 37 #include <trace/events/writeback.h> 38 38
+1 -1
mm/page_alloc.c
··· 1408 1408 1409 1409 static int __init fail_page_alloc_debugfs(void) 1410 1410 { 1411 - mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 1411 + umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 1412 1412 struct dentry *dir; 1413 1413 1414 1414 dir = fault_create_debugfs_attr("fail_page_alloc", NULL,
+6 -6
mm/shmem.c
··· 1092 1092 } 1093 1093 1094 1094 static struct inode *shmem_get_inode(struct super_block *sb, const struct inode *dir, 1095 - int mode, dev_t dev, unsigned long flags) 1095 + umode_t mode, dev_t dev, unsigned long flags) 1096 1096 { 1097 1097 struct inode *inode; 1098 1098 struct shmem_inode_info *info; ··· 1456 1456 * File creation. Allocate an inode, and we're done.. 1457 1457 */ 1458 1458 static int 1459 - shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 1459 + shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 1460 1460 { 1461 1461 struct inode *inode; 1462 1462 int error = -ENOSPC; ··· 1489 1489 return error; 1490 1490 } 1491 1491 1492 - static int shmem_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1492 + static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 1493 1493 { 1494 1494 int error; 1495 1495 ··· 1499 1499 return 0; 1500 1500 } 1501 1501 1502 - static int shmem_create(struct inode *dir, struct dentry *dentry, int mode, 1502 + static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode, 1503 1503 struct nameidata *nd) 1504 1504 { 1505 1505 return shmem_mknod(dir, dentry, mode | S_IFREG, 0); ··· 2128 2128 if (sbinfo->max_inodes != shmem_default_max_inodes()) 2129 2129 seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes); 2130 2130 if (sbinfo->mode != (S_IRWXUGO | S_ISVTX)) 2131 - seq_printf(seq, ",mode=%03o", sbinfo->mode); 2131 + seq_printf(seq, ",mode=%03ho", sbinfo->mode); 2132 2132 if (sbinfo->uid != 0) 2133 2133 seq_printf(seq, ",uid=%u", sbinfo->uid); 2134 2134 if (sbinfo->gid != 0) ··· 2239 2239 2240 2240 static void shmem_destroy_inode(struct inode *inode) 2241 2241 { 2242 - if ((inode->i_mode & S_IFMT) == S_IFREG) 2242 + if (S_ISREG(inode->i_mode)) 2243 2243 mpol_free_shared_policy(&SHMEM_I(inode)->policy); 2244 2244 call_rcu(&inode->i_rcu, shmem_destroy_callback); 2245 2245 }
-1
mm/swap_state.c
··· 13 13 #include <linux/swapops.h> 14 14 #include <linux/init.h> 15 15 #include <linux/pagemap.h> 16 - #include <linux/buffer_head.h> 17 16 #include <linux/backing-dev.h> 18 17 #include <linux/pagevec.h> 19 18 #include <linux/migrate.h>
+1 -1
net/sunrpc/cache.c
··· 1778 1778 }; 1779 1779 1780 1780 int sunrpc_cache_register_pipefs(struct dentry *parent, 1781 - const char *name, mode_t umode, 1781 + const char *name, umode_t umode, 1782 1782 struct cache_detail *cd) 1783 1783 { 1784 1784 struct qstr q;
+1 -1
net/sunrpc/rpc_pipe.c
··· 953 953 } 954 954 955 955 struct dentry *rpc_create_cache_dir(struct dentry *parent, struct qstr *name, 956 - mode_t umode, struct cache_detail *cd) 956 + umode_t umode, struct cache_detail *cd) 957 957 { 958 958 return rpc_mkdir_populate(parent, name, umode, NULL, 959 959 rpc_cachedir_populate, cd);
+1 -1
net/unix/af_unix.c
··· 847 847 atomic_set(&addr->refcnt, 1); 848 848 849 849 if (sun_path[0]) { 850 - unsigned int mode; 850 + umode_t mode; 851 851 err = 0; 852 852 /* 853 853 * Get the parent directory, calculate the hash for last
+1 -1
security/apparmor/apparmorfs.c
··· 165 165 * 166 166 * Used aafs_remove to remove entries created with this fn. 167 167 */ 168 - static int __init aafs_create(const char *name, int mask, 168 + static int __init aafs_create(const char *name, umode_t mask, 169 169 const struct file_operations *fops) 170 170 { 171 171 struct dentry *dentry;
+3 -3
security/apparmor/lsm.c
··· 262 262 } 263 263 264 264 static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, 265 - int mode) 265 + umode_t mode) 266 266 { 267 267 return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE, 268 268 S_IFDIR); ··· 274 274 } 275 275 276 276 static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, 277 - int mode, unsigned int dev) 277 + umode_t mode, unsigned int dev) 278 278 { 279 279 return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode); 280 280 } ··· 345 345 } 346 346 347 347 static int apparmor_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 348 - mode_t mode) 348 + umode_t mode) 349 349 { 350 350 if (!mediated_filesystem(dentry->d_inode)) 351 351 return 0;
+6 -6
security/capability.c
··· 125 125 } 126 126 127 127 static int cap_inode_create(struct inode *inode, struct dentry *dentry, 128 - int mask) 128 + umode_t mask) 129 129 { 130 130 return 0; 131 131 } ··· 148 148 } 149 149 150 150 static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry, 151 - int mask) 151 + umode_t mask) 152 152 { 153 153 return 0; 154 154 } ··· 159 159 } 160 160 161 161 static int cap_inode_mknod(struct inode *inode, struct dentry *dentry, 162 - int mode, dev_t dev) 162 + umode_t mode, dev_t dev) 163 163 { 164 164 return 0; 165 165 } ··· 235 235 } 236 236 237 237 #ifdef CONFIG_SECURITY_PATH 238 - static int cap_path_mknod(struct path *dir, struct dentry *dentry, int mode, 238 + static int cap_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, 239 239 unsigned int dev) 240 240 { 241 241 return 0; 242 242 } 243 243 244 - static int cap_path_mkdir(struct path *dir, struct dentry *dentry, int mode) 244 + static int cap_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) 245 245 { 246 246 return 0; 247 247 } ··· 280 280 } 281 281 282 282 static int cap_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 283 - mode_t mode) 283 + umode_t mode) 284 284 { 285 285 return 0; 286 286 }
+7 -7
security/inode.c
··· 56 56 .llseek = noop_llseek, 57 57 }; 58 58 59 - static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) 59 + static struct inode *get_inode(struct super_block *sb, umode_t mode, dev_t dev) 60 60 { 61 61 struct inode *inode = new_inode(sb); 62 62 ··· 85 85 86 86 /* SMP-safe */ 87 87 static int mknod(struct inode *dir, struct dentry *dentry, 88 - int mode, dev_t dev) 88 + umode_t mode, dev_t dev) 89 89 { 90 90 struct inode *inode; 91 91 int error = -ENOMEM; ··· 102 102 return error; 103 103 } 104 104 105 - static int mkdir(struct inode *dir, struct dentry *dentry, int mode) 105 + static int mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 106 106 { 107 107 int res; 108 108 ··· 113 113 return res; 114 114 } 115 115 116 - static int create(struct inode *dir, struct dentry *dentry, int mode) 116 + static int create(struct inode *dir, struct dentry *dentry, umode_t mode) 117 117 { 118 118 mode = (mode & S_IALLUGO) | S_IFREG; 119 119 return mknod(dir, dentry, mode, 0); ··· 145 145 .kill_sb = kill_litter_super, 146 146 }; 147 147 148 - static int create_by_name(const char *name, mode_t mode, 148 + static int create_by_name(const char *name, umode_t mode, 149 149 struct dentry *parent, 150 150 struct dentry **dentry) 151 151 { ··· 164 164 mutex_lock(&parent->d_inode->i_mutex); 165 165 *dentry = lookup_one_len(name, parent, strlen(name)); 166 166 if (!IS_ERR(*dentry)) { 167 - if ((mode & S_IFMT) == S_IFDIR) 167 + if (S_ISDIR(mode)) 168 168 error = mkdir(parent->d_inode, *dentry, mode); 169 169 else 170 170 error = create(parent->d_inode, *dentry, mode); ··· 205 205 * If securityfs is not enabled in the kernel, the value %-ENODEV is 206 206 * returned. 207 207 */ 208 - struct dentry *securityfs_create_file(const char *name, mode_t mode, 208 + struct dentry *securityfs_create_file(const char *name, umode_t mode, 209 209 struct dentry *parent, void *data, 210 210 const struct file_operations *fops) 211 211 {
+6 -6
security/security.c
··· 388 388 EXPORT_SYMBOL(security_old_inode_init_security); 389 389 390 390 #ifdef CONFIG_SECURITY_PATH 391 - int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, 391 + int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, 392 392 unsigned int dev) 393 393 { 394 394 if (unlikely(IS_PRIVATE(dir->dentry->d_inode))) ··· 397 397 } 398 398 EXPORT_SYMBOL(security_path_mknod); 399 399 400 - int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode) 400 + int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) 401 401 { 402 402 if (unlikely(IS_PRIVATE(dir->dentry->d_inode))) 403 403 return 0; ··· 455 455 } 456 456 457 457 int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 458 - mode_t mode) 458 + umode_t mode) 459 459 { 460 460 if (unlikely(IS_PRIVATE(dentry->d_inode))) 461 461 return 0; ··· 475 475 } 476 476 #endif 477 477 478 - int security_inode_create(struct inode *dir, struct dentry *dentry, int mode) 478 + int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode) 479 479 { 480 480 if (unlikely(IS_PRIVATE(dir))) 481 481 return 0; ··· 506 506 return security_ops->inode_symlink(dir, dentry, old_name); 507 507 } 508 508 509 - int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode) 509 + int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) 510 510 { 511 511 if (unlikely(IS_PRIVATE(dir))) 512 512 return 0; ··· 521 521 return security_ops->inode_rmdir(dir, dentry); 522 522 } 523 523 524 - int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 524 + int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 525 525 { 526 526 if (unlikely(IS_PRIVATE(dir))) 527 527 return 0;
+4 -4
security/selinux/hooks.c
··· 1740 1740 { 1741 1741 u32 av = 0; 1742 1742 1743 - if ((mode & S_IFMT) != S_IFDIR) { 1743 + if (!S_ISDIR(mode)) { 1744 1744 if (mask & MAY_EXEC) 1745 1745 av |= FILE__EXECUTE; 1746 1746 if (mask & MAY_READ) ··· 2598 2598 return 0; 2599 2599 } 2600 2600 2601 - static int selinux_inode_create(struct inode *dir, struct dentry *dentry, int mask) 2601 + static int selinux_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode) 2602 2602 { 2603 2603 return may_create(dir, dentry, SECCLASS_FILE); 2604 2604 } ··· 2618 2618 return may_create(dir, dentry, SECCLASS_LNK_FILE); 2619 2619 } 2620 2620 2621 - static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, int mask) 2621 + static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mask) 2622 2622 { 2623 2623 return may_create(dir, dentry, SECCLASS_DIR); 2624 2624 } ··· 2628 2628 return may_link(dir, dentry, MAY_RMDIR); 2629 2629 } 2630 2630 2631 - static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 2631 + static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 2632 2632 { 2633 2633 return may_create(dir, dentry, inode_mode_to_security_class(mode)); 2634 2634 }
+2 -2
security/tomoyo/audit.c
··· 112 112 * 113 113 * Returns file type string. 114 114 */ 115 - static inline const char *tomoyo_filetype(const mode_t mode) 115 + static inline const char *tomoyo_filetype(const umode_t mode) 116 116 { 117 117 switch (mode & S_IFMT) { 118 118 case S_IFREG: ··· 180 180 for (i = 0; i < TOMOYO_MAX_PATH_STAT; i++) { 181 181 struct tomoyo_mini_stat *stat; 182 182 unsigned int dev; 183 - mode_t mode; 183 + umode_t mode; 184 184 if (!obj->stat_valid[i]) 185 185 continue; 186 186 stat = &obj->stat[i];
+1 -1
security/tomoyo/common.h
··· 564 564 uid_t uid; 565 565 gid_t gid; 566 566 ino_t ino; 567 - mode_t mode; 567 + umode_t mode; 568 568 dev_t dev; 569 569 dev_t rdev; 570 570 };
+1 -1
security/tomoyo/securityfs_if.c
··· 224 224 * 225 225 * Returns nothing. 226 226 */ 227 - static void __init tomoyo_create_entry(const char *name, const mode_t mode, 227 + static void __init tomoyo_create_entry(const char *name, const umode_t mode, 228 228 struct dentry *parent, const u8 key) 229 229 { 230 230 securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key,
+3 -3
security/tomoyo/tomoyo.c
··· 186 186 * Returns 0 on success, negative value otherwise. 187 187 */ 188 188 static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, 189 - int mode) 189 + umode_t mode) 190 190 { 191 191 struct path path = { parent->mnt, dentry }; 192 192 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, ··· 234 234 * Returns 0 on success, negative value otherwise. 235 235 */ 236 236 static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry, 237 - int mode, unsigned int dev) 237 + umode_t mode, unsigned int dev) 238 238 { 239 239 struct path path = { parent->mnt, dentry }; 240 240 int type = TOMOYO_TYPE_CREATE; ··· 360 360 * Returns 0 on success, negative value otherwise. 361 361 */ 362 362 static int tomoyo_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 363 - mode_t mode) 363 + umode_t mode) 364 364 { 365 365 struct path path = { mnt, dentry }; 366 366 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, &path,
+1 -1
sound/sound_core.c
··· 29 29 MODULE_AUTHOR("Alan Cox"); 30 30 MODULE_LICENSE("GPL"); 31 31 32 - static char *sound_devnode(struct device *dev, mode_t *mode) 32 + static char *sound_devnode(struct device *dev, umode_t *mode) 33 33 { 34 34 if (MAJOR(dev->devt) == SOUND_MAJOR) 35 35 return NULL;