···37373838--------------------------- inode_operations --------------------------- 3939prototypes:4040- int (*create) (struct inode *,struct dentry *,int, struct nameidata *);4040+ int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);4141 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid4242ata *);4343 int (*link) (struct dentry *,struct inode *,struct dentry *);4444 int (*unlink) (struct inode *,struct dentry *);4545 int (*symlink) (struct inode *,struct dentry *,const char *);4646- int (*mkdir) (struct inode *,struct dentry *,int);4646+ int (*mkdir) (struct inode *,struct dentry *,umode_t);4747 int (*rmdir) (struct inode *,struct dentry *);4848- int (*mknod) (struct inode *,struct dentry *,int,dev_t);4848+ int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);4949 int (*rename) (struct inode *, struct dentry *,5050 struct inode *, struct dentry *);5151 int (*readlink) (struct dentry *, char __user *,int);
+1-1
Documentation/filesystems/configfs/configfs.txt
···192192 struct configfs_attribute {193193 char *ca_name;194194 struct module *ca_owner;195195- mode_t ca_mode;195195+ umode_t ca_mode;196196 };197197198198When a config_item wants an attribute to appear as a file in the item's
+12-12
Documentation/filesystems/debugfs.txt
···35353636The most general way to create a file within a debugfs directory is with:37373838- struct dentry *debugfs_create_file(const char *name, mode_t mode,3838+ struct dentry *debugfs_create_file(const char *name, umode_t mode,3939 struct dentry *parent, void *data,4040 const struct file_operations *fops);4141···5353for simple situations. Files containing a single integer value can be5454created with any of:55555656- struct dentry *debugfs_create_u8(const char *name, mode_t mode,5656+ struct dentry *debugfs_create_u8(const char *name, umode_t mode,5757 struct dentry *parent, u8 *value);5858- struct dentry *debugfs_create_u16(const char *name, mode_t mode,5858+ struct dentry *debugfs_create_u16(const char *name, umode_t mode,5959 struct dentry *parent, u16 *value);6060- struct dentry *debugfs_create_u32(const char *name, mode_t mode,6060+ struct dentry *debugfs_create_u32(const char *name, umode_t mode,6161 struct dentry *parent, u32 *value);6262- struct dentry *debugfs_create_u64(const char *name, mode_t mode,6262+ struct dentry *debugfs_create_u64(const char *name, umode_t mode,6363 struct dentry *parent, u64 *value);64646565These files support both reading and writing the given value; if a specific···6767values in these files are in decimal; if hexadecimal is more appropriate,6868the following functions can be used instead:69697070- struct dentry *debugfs_create_x8(const char *name, mode_t mode,7070+ struct dentry *debugfs_create_x8(const char *name, umode_t mode,7171 struct dentry *parent, u8 *value);7272- struct dentry *debugfs_create_x16(const char *name, mode_t mode,7272+ struct dentry *debugfs_create_x16(const char *name, umode_t mode,7373 struct dentry *parent, u16 *value);7474- struct dentry *debugfs_create_x32(const char *name, mode_t mode,7474+ struct dentry *debugfs_create_x32(const char *name, umode_t mode,7575 struct dentry *parent, u32 *value);7676- struct dentry *debugfs_create_x64(const char *name, mode_t mode,7676+ struct dentry *debugfs_create_x64(const char *name, umode_t mode,7777 struct dentry *parent, u64 *value);78787979These functions are useful as long as the developer knows the size of the···8181architectures, though, complicating the situation somewhat. There is a8282function meant to help out in one special case:83838484- struct dentry *debugfs_create_size_t(const char *name, mode_t mode,8484+ struct dentry *debugfs_create_size_t(const char *name, umode_t mode,8585 struct dentry *parent, 8686 size_t *value);8787···90909191Boolean values can be placed in debugfs with:92929393- struct dentry *debugfs_create_bool(const char *name, mode_t mode,9393+ struct dentry *debugfs_create_bool(const char *name, umode_t mode,9494 struct dentry *parent, u32 *value);95959696A read on the resulting file will yield either Y (for non-zero values) or···104104 unsigned long size;105105 };106106107107- struct dentry *debugfs_create_blob(const char *name, mode_t mode,107107+ struct dentry *debugfs_create_blob(const char *name, umode_t mode,108108 struct dentry *parent,109109 struct debugfs_blob_wrapper *blob);110110
···341341filesystem. As of kernel 2.6.22, the following members are defined:342342343343struct inode_operations {344344- int (*create) (struct inode *,struct dentry *,int, struct nameidata *);344344+ int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);345345 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);346346 int (*link) (struct dentry *,struct inode *,struct dentry *);347347 int (*unlink) (struct inode *,struct dentry *);348348 int (*symlink) (struct inode *,struct dentry *,const char *);349349- int (*mkdir) (struct inode *,struct dentry *,int);349349+ int (*mkdir) (struct inode *,struct dentry *,umode_t);350350 int (*rmdir) (struct inode *,struct dentry *);351351- int (*mknod) (struct inode *,struct dentry *,int,dev_t);351351+ int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);352352 int (*rename) (struct inode *, struct dentry *,353353 struct inode *, struct dentry *);354354 int (*readlink) (struct dentry *, char __user *,int);
+1-28
arch/alpha/include/asm/ipcbuf.h
···11-#ifndef _ALPHA_IPCBUF_H22-#define _ALPHA_IPCBUF_H33-44-/* 55- * The ipc64_perm structure for alpha architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit seq1111- * - 2 miscellaneous 64-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid_t uid;1818- __kernel_gid_t gid;1919- __kernel_uid_t cuid;2020- __kernel_gid_t cgid;2121- __kernel_mode_t mode; 2222- unsigned short seq;2323- unsigned short __pad1;2424- unsigned long __unused1;2525- unsigned long __unused2;2626-};2727-2828-#endif /* _ALPHA_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
···11-#ifndef __ASMARM_IPCBUF_H22-#define __ASMARM_IPCBUF_H33-44-/*55- * The ipc64_perm structure for arm architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __ASMARM_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-6
arch/arm/include/asm/types.h
···3344#include <asm-generic/int-ll64.h>5566-#ifndef __ASSEMBLY__77-88-typedef unsigned short umode_t;99-1010-#endif /* __ASSEMBLY__ */1111-126/*137 * These aren't exported outside the kernel to avoid name space clashes148 */
···11-#ifndef __ASM_AVR32_IPCBUF_H22-#define __ASM_AVR32_IPCBUF_H33-44-/*55-* The user_ipc_perm structure for AVR32 architecture.66-* Note extra padding because this structure is passed back and forth77-* between kernel and user space.88-*99-* Pad space is left for:1010-* - 32-bit mode_t and seq1111-* - 2 miscellaneous 32-bit values1212-*/1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __ASM_AVR32_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-6
arch/avr32/include/asm/types.h
···10101111#include <asm-generic/int-ll64.h>12121313-#ifndef __ASSEMBLY__1414-1515-typedef unsigned short umode_t;1616-1717-#endif /* __ASSEMBLY__ */1818-1913/*2014 * These aren't exported outside the kernel to avoid name space clashes2115 */
+1-29
arch/cris/include/asm/ipcbuf.h
···11-#ifndef __CRIS_IPCBUF_H__22-#define __CRIS_IPCBUF_H__33-44-/*55- * The user_ipc_perm structure for CRIS architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __CRIS_IPCBUF_H__ */11+#include <asm-generic/ipcbuf.h>
-6
arch/cris/include/asm/types.h
···3344#include <asm-generic/int-ll64.h>5566-#ifndef __ASSEMBLY__77-88-typedef unsigned short umode_t;99-1010-#endif /* __ASSEMBLY__ */1111-126/*137 * These aren't exported outside the kernel to avoid name space clashes148 */
+1-30
arch/frv/include/asm/ipcbuf.h
···11-#ifndef __ASM_IPCBUF_H__22-#define __ASM_IPCBUF_H__33-44-/*55- * The user_ipc_perm structure for FR-V architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __ASM_IPCBUF_H__ */3030-11+#include <asm-generic/ipcbuf.h>
-6
arch/frv/include/asm/types.h
···14141515#include <asm-generic/int-ll64.h>16161717-#ifndef __ASSEMBLY__1818-1919-typedef unsigned short umode_t;2020-2121-#endif /* __ASSEMBLY__ */2222-2317/*2418 * These aren't exported outside the kernel to avoid name space clashes2519 */
+1-29
arch/h8300/include/asm/ipcbuf.h
···11-#ifndef __H8300_IPCBUF_H__22-#define __H8300_IPCBUF_H__33-44-/*55- * The user_ipc_perm structure for H8/300 architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __H8300_IPCBUF_H__ */11+#include <asm-generic/ipcbuf.h>
-17
arch/h8300/include/asm/types.h
···3344#include <asm-generic/int-ll64.h>5566-#if !defined(__ASSEMBLY__)77-88-/*99- * This file is never included by application software unless1010- * explicitly requested (e.g., via linux/types.h) in which case the1111- * application is Linux specific so (user-) name space pollution is1212- * not a major issue. However, for interoperability, libraries still1313- * need to be careful to avoid a name clashes.1414- */1515-1616-typedef unsigned short umode_t;1717-1818-/*1919- * These aren't exported outside the kernel to avoid name space clashes2020- */216#ifdef __KERNEL__227238#define BITS_PER_LONG 322492510#endif /* __KERNEL__ */2626-2727-#endif /* __ASSEMBLY__ */28112912#endif /* _H8300_TYPES_H */
+1-28
arch/ia64/include/asm/ipcbuf.h
···11-#ifndef _ASM_IA64_IPCBUF_H22-#define _ASM_IA64_IPCBUF_H33-44-/*55- * The ipc64_perm structure for IA-64 architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit seq1111- * - 2 miscellaneous 64-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid_t uid;1818- __kernel_gid_t gid;1919- __kernel_uid_t cuid;2020- __kernel_gid_t cgid;2121- __kernel_mode_t mode;2222- unsigned short seq;2323- unsigned short __pad1;2424- unsigned long __unused1;2525- unsigned long __unused2;2626-};2727-2828-#endif /* _ASM_IA64_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-2
arch/ia64/include/asm/types.h
···2828# define __IA64_UL(x) ((unsigned long)(x))2929# define __IA64_UL_CONST(x) x##UL30303131-typedef unsigned int umode_t;3232-3331/*3432 * These aren't exported outside the kernel to avoid name space clashes3533 */
+1-29
arch/m32r/include/asm/ipcbuf.h
···11-#ifndef _ASM_M32R_IPCBUF_H22-#define _ASM_M32R_IPCBUF_H33-44-/*55- * The ipc64_perm structure for m32r architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* _ASM_M32R_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-6
arch/m32r/include/asm/types.h
···3344#include <asm-generic/int-ll64.h>5566-#ifndef __ASSEMBLY__77-88-typedef unsigned short umode_t;99-1010-#endif /* __ASSEMBLY__ */1111-126/*137 * These aren't exported outside the kernel to avoid name space clashes148 */
+1-29
arch/m68k/include/asm/ipcbuf.h
···11-#ifndef __m68k_IPCBUF_H__22-#define __m68k_IPCBUF_H__33-44-/*55- * The user_ipc_perm structure for m68k architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* __m68k_IPCBUF_H__ */11+#include <asm-generic/ipcbuf.h>
-6
arch/m68k/include/asm/types.h
···1010 */1111#include <asm-generic/int-ll64.h>12121313-#ifndef __ASSEMBLY__1414-1515-typedef unsigned short umode_t;1616-1717-#endif /* __ASSEMBLY__ */1818-1913/*2014 * These aren't exported outside the kernel to avoid name space clashes2115 */
+1-28
arch/mips/include/asm/ipcbuf.h
···11-#ifndef _ASM_IPCBUF_H22-#define _ASM_IPCBUF_H33-44-/*55- * The ipc64_perm structure for alpha architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit seq1111- * - 2 miscellaneous 64-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid_t uid;1818- __kernel_gid_t gid;1919- __kernel_uid_t cuid;2020- __kernel_gid_t cgid;2121- __kernel_mode_t mode;2222- unsigned short seq;2323- unsigned short __pad1;2424- unsigned long __unused1;2525- unsigned long __unused2;2626-};2727-2828-#endif /* _ASM_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-6
arch/mips/include/asm/types.h
···2121# include <asm-generic/int-ll64.h>2222#endif23232424-#ifndef __ASSEMBLY__2525-2626-typedef unsigned short umode_t;2727-2828-#endif /* __ASSEMBLY__ */2929-3024/*3125 * These aren't exported outside the kernel to avoid name space clashes3226 */
+1-29
arch/mn10300/include/asm/ipcbuf.h
···11-#ifndef _ASM_IPCBUF_H22-#define _ASM_IPCBUF_H33-44-/*55- * The ipc64_perm structure for MN10300 architecture.66- * Note extra padding because this structure is passed back and forth77- * between kernel and user space.88- *99- * Pad space is left for:1010- * - 32-bit mode_t and seq1111- * - 2 miscellaneous 32-bit values1212- */1313-1414-struct ipc64_perm1515-{1616- __kernel_key_t key;1717- __kernel_uid32_t uid;1818- __kernel_gid32_t gid;1919- __kernel_uid32_t cuid;2020- __kernel_gid32_t cgid;2121- __kernel_mode_t mode;2222- unsigned short __pad1;2323- unsigned short seq;2424- unsigned short __pad2;2525- unsigned long __unused1;2626- unsigned long __unused2;2727-};2828-2929-#endif /* _ASM_IPCBUF_H */11+#include <asm-generic/ipcbuf.h>
-6
arch/mn10300/include/asm/types.h
···13131414#include <asm-generic/int-ll64.h>15151616-#ifndef __ASSEMBLY__1717-1818-typedef unsigned short umode_t;1919-2020-#endif /* __ASSEMBLY__ */2121-2216/*2317 * These aren't exported outside the kernel to avoid name space clashes2418 */
-6
arch/parisc/include/asm/types.h
···3344#include <asm-generic/int-ll64.h>5566-#ifndef __ASSEMBLY__77-88-typedef unsigned short umode_t;99-1010-#endif /* __ASSEMBLY__ */1111-126#endif
+1-1
arch/powerpc/include/asm/spu.h
···237237struct file;238238struct spufs_calls {239239 long (*create_thread)(const char __user *name,240240- unsigned int flags, mode_t mode,240240+ unsigned int flags, umode_t mode,241241 struct file *neighbor);242242 long (*spu_run)(struct file *filp, __u32 __user *unpc,243243 __u32 __user *ustatus);
-6
arch/powerpc/include/asm/types.h
···2727 * 2 of the License, or (at your option) any later version.2828 */29293030-#ifdef __powerpc64__3131-typedef unsigned int umode_t;3232-#else3333-typedef unsigned short umode_t;3434-#endif3535-3630typedef struct {3731 __u32 u[4];3832} __attribute__((aligned(16))) __vector128;
+1-1
arch/powerpc/kernel/lparcfg.c
···783783static int __init lparcfg_init(void)784784{785785 struct proc_dir_entry *ent;786786- mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;786786+ umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;787787788788 /* Allow writing if we have FW_FEATURE_SPLPAR */789789 if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
+2-2
arch/powerpc/platforms/cell/spu_syscalls.c
···65656666#endif /* CONFIG_SPU_FS_MODULE */67676868-asmlinkage long sys_spu_create(const char __user *name,6969- unsigned int flags, mode_t mode, int neighbor_fd)6868+SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags,6969+ umode_t, mode, int, neighbor_fd)7070{7171 long ret;7272 struct file *neighbor;
+8-8
arch/powerpc/platforms/cell/spufs/inode.c
···9191}92929393static struct inode *9494-spufs_new_inode(struct super_block *sb, int mode)9494+spufs_new_inode(struct super_block *sb, umode_t mode)9595{9696 struct inode *inode;9797···123123124124static int125125spufs_new_file(struct super_block *sb, struct dentry *dentry,126126- const struct file_operations *fops, int mode,126126+ const struct file_operations *fops, umode_t mode,127127 size_t size, struct spu_context *ctx)128128{129129 static const struct inode_operations spufs_file_iops = {···193193}194194195195static int spufs_fill_dir(struct dentry *dir,196196- const struct spufs_tree_descr *files, int mode,196196+ const struct spufs_tree_descr *files, umode_t mode,197197 struct spu_context *ctx)198198{199199 struct dentry *dentry, *tmp;···263263264264static int265265spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,266266- int mode)266266+ umode_t mode)267267{268268 int ret;269269 struct inode *inode;···446446447447static int448448spufs_create_context(struct inode *inode, struct dentry *dentry,449449- struct vfsmount *mnt, int flags, int mode,449449+ struct vfsmount *mnt, int flags, umode_t mode,450450 struct file *aff_filp)451451{452452 int ret;···520520}521521522522static int523523-spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode)523523+spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode)524524{525525 int ret;526526 struct inode *inode;···583583584584static int spufs_create_gang(struct inode *inode,585585 struct dentry *dentry,586586- struct vfsmount *mnt, int mode)586586+ struct vfsmount *mnt, umode_t mode)587587{588588 int ret;589589···611611static struct file_system_type spufs_type;612612613613long spufs_create(struct path *path, struct dentry *dentry,614614- unsigned int flags, mode_t mode, struct file *filp)614614+ unsigned int flags, umode_t mode, struct file *filp)615615{616616 int ret;617617
···7373 struct dentry* debugfs_entries[DEBUG_MAX_VIEWS];7474 struct debug_view* views[DEBUG_MAX_VIEWS]; 7575 char name[DEBUG_MAX_NAME_LEN];7676- mode_t mode;7676+ umode_t mode;7777} debug_info_t;78787979typedef int (debug_header_proc_t) (debug_info_t* id,···124124 int buf_size);125125126126debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas,127127- int buf_size, mode_t mode, uid_t uid,127127+ int buf_size, umode_t mode, uid_t uid,128128 gid_t gid);129129130130void debug_unregister(debug_info_t* id);
-2
arch/s390/include/asm/types.h
···13131414#ifndef __ASSEMBLY__15151616-typedef unsigned short umode_t;1717-1816/* A address type so that arithmetic can be done on it & it can be upgraded to1917 64 bit when necessary 2018*/
+4-4
arch/s390/kernel/debug.c
···7474static int debug_open(struct inode *inode, struct file *file);7575static int debug_close(struct inode *inode, struct file *file);7676static debug_info_t *debug_info_create(const char *name, int pages_per_area,7777- int nr_areas, int buf_size, mode_t mode);7777+ int nr_areas, int buf_size, umode_t mode);7878static void debug_info_get(debug_info_t *);7979static void debug_info_put(debug_info_t *);8080static int debug_prolog_level_fn(debug_info_t * id,···330330331331static debug_info_t*332332debug_info_create(const char *name, int pages_per_area, int nr_areas,333333- int buf_size, mode_t mode)333333+ int buf_size, umode_t mode)334334{335335 debug_info_t* rc;336336···688688 */689689690690debug_info_t *debug_register_mode(const char *name, int pages_per_area,691691- int nr_areas, int buf_size, mode_t mode,691691+ int nr_areas, int buf_size, umode_t mode,692692 uid_t uid, gid_t gid)693693{694694 debug_info_t *rc = NULL;···10901090 int rc = 0;10911091 int i;10921092 unsigned long flags;10931093- mode_t mode;10931093+ umode_t mode;10941094 struct dentry *pde;1095109510961096 if (!id)
-2
arch/sparc/include/asm/posix_types.h
···2020typedef unsigned int __kernel_gid_t;2121typedef unsigned long __kernel_ino_t;2222typedef unsigned int __kernel_mode_t;2323-typedef unsigned short __kernel_umode_t;2423typedef unsigned int __kernel_nlink_t;2524typedef int __kernel_daddr_t;2625typedef long __kernel_off_t;···5455typedef unsigned short __kernel_gid_t;5556typedef unsigned long __kernel_ino_t;5657typedef unsigned short __kernel_mode_t;5757-typedef unsigned short __kernel_umode_t;5858typedef short __kernel_nlink_t;5959typedef long __kernel_daddr_t;6060typedef long __kernel_off_t;
···23232424#ifndef __ASSEMBLY__25252626-typedef unsigned short umode_t;2727-2826/*2927 * These aren't exported outside the kernel to avoid name space clashes3028 */
+6
block/Kconfig
···9999100100 See Documentation/cgroups/blkio-controller.txt for more information.101101102102+menu "Partition Types"103103+104104+source "block/partitions/Kconfig"105105+106106+endmenu107107+102108endif # BLOCK103109104110config BLOCK_COMPAT
···11+/*22+ * fs/partitions/check.c33+ *44+ * Code extracted from drivers/block/genhd.c55+ * Copyright (C) 1991-1998 Linus Torvalds66+ * Re-organised Feb 1998 Russell King77+ *88+ * We now have independent partition support from the99+ * block drivers, which allows all the partition code to1010+ * be grouped in one location, and it to be mostly self1111+ * contained.1212+ *1313+ * Added needed MAJORS for new pairs, {hdi,hdj}, {hdk,hdl}1414+ */1515+1616+#include <linux/slab.h>1717+#include <linux/ctype.h>1818+#include <linux/genhd.h>1919+2020+#include "check.h"2121+2222+#include "acorn.h"2323+#include "amiga.h"2424+#include "atari.h"2525+#include "ldm.h"2626+#include "mac.h"2727+#include "msdos.h"2828+#include "osf.h"2929+#include "sgi.h"3030+#include "sun.h"3131+#include "ibm.h"3232+#include "ultrix.h"3333+#include "efi.h"3434+#include "karma.h"3535+#include "sysv68.h"3636+3737+int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/3838+3939+static int (*check_part[])(struct parsed_partitions *) = {4040+ /*4141+ * Probe partition formats with tables at disk address 04242+ * that also have an ADFS boot block at 0xdc0.4343+ */4444+#ifdef CONFIG_ACORN_PARTITION_ICS4545+ adfspart_check_ICS,4646+#endif4747+#ifdef CONFIG_ACORN_PARTITION_POWERTEC4848+ adfspart_check_POWERTEC,4949+#endif5050+#ifdef CONFIG_ACORN_PARTITION_EESOX5151+ adfspart_check_EESOX,5252+#endif5353+5454+ /*5555+ * Now move on to formats that only have partition info at5656+ * disk address 0xdc0. Since these may also have stale5757+ * PC/BIOS partition tables, they need to come before5858+ * the msdos entry.5959+ */6060+#ifdef CONFIG_ACORN_PARTITION_CUMANA6161+ adfspart_check_CUMANA,6262+#endif6363+#ifdef CONFIG_ACORN_PARTITION_ADFS6464+ adfspart_check_ADFS,6565+#endif6666+6767+#ifdef CONFIG_EFI_PARTITION6868+ efi_partition, /* this must come before msdos */6969+#endif7070+#ifdef CONFIG_SGI_PARTITION7171+ sgi_partition,7272+#endif7373+#ifdef CONFIG_LDM_PARTITION7474+ ldm_partition, /* this must come before msdos */7575+#endif7676+#ifdef CONFIG_MSDOS_PARTITION7777+ msdos_partition,7878+#endif7979+#ifdef CONFIG_OSF_PARTITION8080+ osf_partition,8181+#endif8282+#ifdef CONFIG_SUN_PARTITION8383+ sun_partition,8484+#endif8585+#ifdef CONFIG_AMIGA_PARTITION8686+ amiga_partition,8787+#endif8888+#ifdef CONFIG_ATARI_PARTITION8989+ atari_partition,9090+#endif9191+#ifdef CONFIG_MAC_PARTITION9292+ mac_partition,9393+#endif9494+#ifdef CONFIG_ULTRIX_PARTITION9595+ ultrix_partition,9696+#endif9797+#ifdef CONFIG_IBM_PARTITION9898+ ibm_partition,9999+#endif100100+#ifdef CONFIG_KARMA_PARTITION101101+ karma_partition,102102+#endif103103+#ifdef CONFIG_SYSV68_PARTITION104104+ sysv68_partition,105105+#endif106106+ NULL107107+};108108+109109+struct parsed_partitions *110110+check_partition(struct gendisk *hd, struct block_device *bdev)111111+{112112+ struct parsed_partitions *state;113113+ int i, res, err;114114+115115+ state = kzalloc(sizeof(struct parsed_partitions), GFP_KERNEL);116116+ if (!state)117117+ return NULL;118118+ state->pp_buf = (char *)__get_free_page(GFP_KERNEL);119119+ if (!state->pp_buf) {120120+ kfree(state);121121+ return NULL;122122+ }123123+ state->pp_buf[0] = '\0';124124+125125+ state->bdev = bdev;126126+ disk_name(hd, 0, state->name);127127+ snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name);128128+ if (isdigit(state->name[strlen(state->name)-1]))129129+ sprintf(state->name, "p");130130+131131+ state->limit = disk_max_parts(hd);132132+ i = res = err = 0;133133+ while (!res && check_part[i]) {134134+ memset(&state->parts, 0, sizeof(state->parts));135135+ res = check_part[i++](state);136136+ if (res < 0) {137137+ /* We have hit an I/O error which we don't report now.138138+ * But record it, and let the others do their job.139139+ */140140+ err = res;141141+ res = 0;142142+ }143143+144144+ }145145+ if (res > 0) {146146+ printk(KERN_INFO "%s", state->pp_buf);147147+148148+ free_page((unsigned long)state->pp_buf);149149+ return state;150150+ }151151+ if (state->access_beyond_eod)152152+ err = -ENOSPC;153153+ if (err)154154+ /* The partition is unrecognized. So report I/O errors if there were any */155155+ res = err;156156+ if (!res)157157+ strlcat(state->pp_buf, " unknown partition table\n", PAGE_SIZE);158158+ else if (warn_no_part)159159+ strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE);160160+161161+ printk(KERN_INFO "%s", state->pp_buf);162162+163163+ free_page((unsigned long)state->pp_buf);164164+ kfree(state);165165+ return ERR_PTR(res);166166+}
···1717#include <linux/highmem.h>1818#include <linux/mutex.h>1919#include <linux/radix-tree.h>2020-#include <linux/buffer_head.h> /* invalidate_bh_lrus() */2020+#include <linux/fs.h>2121#include <linux/slab.h>22222323#include <asm/uaccess.h>···402402 error = -EBUSY;403403 if (bdev->bd_openers <= 1) {404404 /*405405- * Invalidate the cache first, so it isn't written406406- * back to the device.405405+ * Kill the cache first, so it isn't written back to the406406+ * device.407407 *408408 * Another thread might instantiate more buffercache here,409409 * but there is not much we can do to close that race.410410 */411411- invalidate_bh_lrus();412412- truncate_inode_pages(bdev->bd_inode->i_mapping, 0);411411+ kill_bdev(bdev);413412 brd_free_pages(brd);414413 error = 0;415414 }
···733733 iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep);734734}735735736736-mode_t be2iscsi_attr_is_visible(int param_type, int param)736736+umode_t be2iscsi_attr_is_visible(int param_type, int param)737737{738738 switch (param_type) {739739 case ISCSI_HOST_PARAM:
+1-1
drivers/scsi/be2iscsi/be_iscsi.h
···2626#define BE2_IPV4 0x12727#define BE2_IPV6 0x1028282929-mode_t be2iscsi_attr_is_visible(int param_type, int param);2929+umode_t be2iscsi_attr_is_visible(int param_type, int param);30303131void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,3232 struct beiscsi_offload_params *params);
+6-6
drivers/scsi/be2iscsi/be_main.c
···325325}326326327327328328-static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type)328328+static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type)329329{330330- int rc;330330+ umode_t rc;331331332332 switch (type) {333333 case ISCSI_BOOT_TGT_NAME:···348348 return rc;349349}350350351351-static mode_t beiscsi_ini_get_attr_visibility(void *data, int type)351351+static umode_t beiscsi_ini_get_attr_visibility(void *data, int type)352352{353353- int rc;353353+ umode_t rc;354354355355 switch (type) {356356 case ISCSI_BOOT_INI_INITIATOR_NAME:···364364}365365366366367367-static mode_t beiscsi_eth_get_attr_visibility(void *data, int type)367367+static umode_t beiscsi_eth_get_attr_visibility(void *data, int type)368368{369369- int rc;369369+ umode_t rc;370370371371 switch (type) {372372 case ISCSI_BOOT_ETH_FLAGS:
···21772177 return 0;21782178}2179217921802180-static mode_t bnx2i_attr_is_visible(int param_type, int param)21802180+static umode_t bnx2i_attr_is_visible(int param_type, int param)21812181{21822182 switch (param_type) {21832183 case ISCSI_HOST_PARAM:
+1-1
drivers/scsi/cxgbi/libcxgbi.c
···25692569}25702570EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup);2571257125722572-mode_t cxgbi_attr_is_visible(int param_type, int param)25722572+umode_t cxgbi_attr_is_visible(int param_type, int param)25732573{25742574 switch (param_type) {25752575 case ISCSI_HOST_PARAM:
···4141#include <linux/bitops.h>4242#include <linux/mpage.h>4343#include <linux/bit_spinlock.h>4444-#include <linux/cleancache.h>45444645static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);4746···229230out:230231 return ret;231232}232232-233233-/* If invalidate_buffers() will trash dirty buffers, it means some kind234234- of fs corruption is going on. Trashing dirty data always imply losing235235- information that was supposed to be just stored on the physical layer236236- by the user.237237-238238- Thus invalidate_buffers in general usage is not allwowed to trash239239- dirty buffers. For example ioctl(FLSBLKBUF) expects dirty data to240240- be preserved. These buffers are simply skipped.241241-242242- We also skip buffers which are still in use. For example this can243243- happen if a userspace program is reading the block device.244244-245245- NOTE: In the case where the user removed a removable-media-disk even if246246- there's still dirty data not synced on disk (due a bug in the device driver247247- or due an error of the user), by not destroying the dirty buffers we could248248- generate corruption also on the next media inserted, thus a parameter is249249- necessary to handle this case in the most safe way possible (trying250250- to not corrupt also the new disk inserted with the data belonging to251251- the old now corrupted disk). Also for the ramdisk the natural thing252252- to do in order to release the ramdisk memory is to destroy dirty buffers.253253-254254- These are two special cases. Normal usage imply the device driver255255- to issue a sync on the device (without waiting I/O completion) and256256- then an invalidate_buffers call that doesn't trash dirty buffers.257257-258258- For handling cache coherency with the blkdev pagecache the 'update' case259259- is been introduced. It is needed to re-read from disk any pinned260260- buffer. NOTE: re-reading from disk is destructive so we can do it only261261- when we assume nobody is changing the buffercache under our I/O and when262262- we think the disk contains more recent information than the buffercache.263263- The update == 1 pass marks the buffers we need to update, the update == 2264264- pass does the actual I/O. */265265-void invalidate_bdev(struct block_device *bdev)266266-{267267- struct address_space *mapping = bdev->bd_inode->i_mapping;268268-269269- if (mapping->nrpages == 0)270270- return;271271-272272- invalidate_bh_lrus();273273- lru_add_drain_all(); /* make sure all lru add caches are flushed */274274- invalidate_mapping_pages(mapping, 0, -1);275275- /* 99% of the time, we don't need to flush the cleancache on the bdev.276276- * But, for the strange corners, lets be cautious277277- */278278- cleancache_flush_inode(mapping);279279-}280280-EXPORT_SYMBOL(invalidate_bdev);281233282234/*283235 * Kick the writeback threads then try to free up some ZONE_NORMAL memory.
···5959 gid_t mnt_gid;6060 uid_t mnt_backupuid;6161 gid_t mnt_backupgid;6262- mode_t mnt_file_mode;6363- mode_t mnt_dir_mode;6262+ umode_t mnt_file_mode;6363+ umode_t mnt_dir_mode;6464 unsigned int mnt_cifs_flags;6565 char *mountdata; /* options received at mount time or via DFS refs */6666 struct backing_dev_info bdi;
+1-1
fs/cifs/cifsfs.c
···393393 cifs_show_address(s, tcon->ses->server);394394395395 if (!tcon->unix_ext)396396- seq_printf(s, ",file_mode=0%o,dir_mode=0%o",396396+ seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho",397397 cifs_sb->mnt_file_mode,398398 cifs_sb->mnt_dir_mode);399399 if (tcon->seal)
+3-3
fs/cifs/cifsfs.h
···4444/* Functions related to inodes */4545extern const struct inode_operations cifs_dir_inode_ops;4646extern struct inode *cifs_root_iget(struct super_block *);4747-extern int cifs_create(struct inode *, struct dentry *, int,4747+extern int cifs_create(struct inode *, struct dentry *, umode_t,4848 struct nameidata *);4949extern struct dentry *cifs_lookup(struct inode *, struct dentry *,5050 struct nameidata *);5151extern int cifs_unlink(struct inode *dir, struct dentry *dentry);5252extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *);5353-extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t);5454-extern int cifs_mkdir(struct inode *, struct dentry *, int);5353+extern int cifs_mknod(struct inode *, struct dentry *, umode_t, dev_t);5454+extern int cifs_mkdir(struct inode *, struct dentry *, umode_t);5555extern int cifs_rmdir(struct inode *, struct dentry *);5656extern int cifs_rename(struct inode *, struct dentry *, struct inode *,5757 struct dentry *);
···136136/* Inode operations in similar order to how they appear in Linux file fs.h */137137138138int139139-cifs_create(struct inode *inode, struct dentry *direntry, int mode,139139+cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode,140140 struct nameidata *nd)141141{142142 int rc = -ENOENT;···355355 return rc;356356}357357358358-int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,358358+int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode,359359 dev_t device_number)360360{361361 int rc = -EPERM;
···3030#include "coda_int.h"31313232/* dir inode-ops */3333-static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd);3333+static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd);3434static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd);3535static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, 3636 struct dentry *entry);3737static int coda_unlink(struct inode *dir_inode, struct dentry *entry);3838static int coda_symlink(struct inode *dir_inode, struct dentry *entry,3939 const char *symname);4040-static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, int mode);4040+static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, umode_t mode);4141static int coda_rmdir(struct inode *dir_inode, struct dentry *entry);4242static int coda_rename(struct inode *old_inode, struct dentry *old_dentry, 4343 struct inode *new_inode, struct dentry *new_dentry);···191191}192192193193/* creation routines: create, mknod, mkdir, link, symlink */194194-static int coda_create(struct inode *dir, struct dentry *de, int mode, struct nameidata *nd)194194+static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd)195195{196196 int error;197197 const char *name=de->d_name.name;···223223 return error;224224}225225226226-static int coda_mkdir(struct inode *dir, struct dentry *de, int mode)226226+static int coda_mkdir(struct inode *dir, struct dentry *de, umode_t mode)227227{228228 struct inode *inode;229229 struct coda_vattr attrs;
+2-2
fs/compat.c
···12811281 * O_LARGEFILE flag.12821282 */12831283asmlinkage long12841284-compat_sys_open(const char __user *filename, int flags, int mode)12841284+compat_sys_open(const char __user *filename, int flags, umode_t mode)12851285{12861286 return do_sys_open(AT_FDCWD, filename, flags, mode);12871287}···12911291 * O_LARGEFILE flag.12921292 */12931293asmlinkage long12941294-compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, int mode)12941294+compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, umode_t mode)12951295{12961296 return do_sys_open(dfd, filename, flags, mode);12971297}
+2-2
fs/configfs/configfs_internal.h
···63636464extern int configfs_is_root(struct config_item *item);65656666-extern struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent *);6767-extern int configfs_create(struct dentry *, int mode, int (*init)(struct inode *));6666+extern struct inode * configfs_new_inode(umode_t mode, struct configfs_dirent *);6767+extern int configfs_create(struct dentry *, umode_t mode, int (*init)(struct inode *));6868extern int configfs_inode_init(void);6969extern void configfs_inode_exit(void);7070
+1-1
fs/configfs/dir.c
···11701170}11711171EXPORT_SYMBOL(configfs_undepend_item);1172117211731173-static int configfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)11731173+static int configfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)11741174{11751175 int ret = 0;11761176 int module_got = 0;
···9595 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling9696 * code.9797 */9898-struct dentry *debugfs_create_u8(const char *name, mode_t mode,9898+struct dentry *debugfs_create_u8(const char *name, umode_t mode,9999 struct dentry *parent, u8 *value)100100{101101 /* if there are no write bits set, make read only */···147147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling148148 * code.149149 */150150-struct dentry *debugfs_create_u16(const char *name, mode_t mode,150150+struct dentry *debugfs_create_u16(const char *name, umode_t mode,151151 struct dentry *parent, u16 *value)152152{153153 /* if there are no write bits set, make read only */···199199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling200200 * code.201201 */202202-struct dentry *debugfs_create_u32(const char *name, mode_t mode,202202+struct dentry *debugfs_create_u32(const char *name, umode_t mode,203203 struct dentry *parent, u32 *value)204204{205205 /* if there are no write bits set, make read only */···252252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling253253 * code.254254 */255255-struct dentry *debugfs_create_u64(const char *name, mode_t mode,255255+struct dentry *debugfs_create_u64(const char *name, umode_t mode,256256 struct dentry *parent, u64 *value)257257{258258 /* if there are no write bits set, make read only */···298298 * @value: a pointer to the variable that the file should read to and write299299 * from.300300 */301301-struct dentry *debugfs_create_x8(const char *name, mode_t mode,301301+struct dentry *debugfs_create_x8(const char *name, umode_t mode,302302 struct dentry *parent, u8 *value)303303{304304 /* if there are no write bits set, make read only */···322322 * @value: a pointer to the variable that the file should read to and write323323 * from.324324 */325325-struct dentry *debugfs_create_x16(const char *name, mode_t mode,325325+struct dentry *debugfs_create_x16(const char *name, umode_t mode,326326 struct dentry *parent, u16 *value)327327{328328 /* if there are no write bits set, make read only */···346346 * @value: a pointer to the variable that the file should read to and write347347 * from.348348 */349349-struct dentry *debugfs_create_x32(const char *name, mode_t mode,349349+struct dentry *debugfs_create_x32(const char *name, umode_t mode,350350 struct dentry *parent, u32 *value)351351{352352 /* if there are no write bits set, make read only */···370370 * @value: a pointer to the variable that the file should read to and write371371 * from.372372 */373373-struct dentry *debugfs_create_x64(const char *name, mode_t mode,373373+struct dentry *debugfs_create_x64(const char *name, umode_t mode,374374 struct dentry *parent, u64 *value)375375{376376 return debugfs_create_file(name, mode, parent, value, &fops_x64);···401401 * @value: a pointer to the variable that the file should read to and write402402 * from.403403 */404404-struct dentry *debugfs_create_size_t(const char *name, mode_t mode,404404+struct dentry *debugfs_create_size_t(const char *name, umode_t mode,405405 struct dentry *parent, size_t *value)406406{407407 return debugfs_create_file(name, mode, parent, value, &fops_size_t);···473473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling474474 * code.475475 */476476-struct dentry *debugfs_create_bool(const char *name, mode_t mode,476476+struct dentry *debugfs_create_bool(const char *name, umode_t mode,477477 struct dentry *parent, u32 *value)478478{479479 return debugfs_create_file(name, mode, parent, value, &fops_bool);···518518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling519519 * code.520520 */521521-struct dentry *debugfs_create_blob(const char *name, mode_t mode,521521+struct dentry *debugfs_create_blob(const char *name, umode_t mode,522522 struct dentry *parent,523523 struct debugfs_blob_wrapper *blob)524524{
+7-7
fs/debugfs/inode.c
···3030static int debugfs_mount_count;3131static bool debugfs_registered;32323333-static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev,3333+static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev_t dev,3434 void *data, const struct file_operations *fops)35353636{···69697070/* SMP-safe */7171static int debugfs_mknod(struct inode *dir, struct dentry *dentry,7272- int mode, dev_t dev, void *data,7272+ umode_t mode, dev_t dev, void *data,7373 const struct file_operations *fops)7474{7575 struct inode *inode;···8787 return error;8888}89899090-static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode,9090+static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode,9191 void *data, const struct file_operations *fops)9292{9393 int res;···101101 return res;102102}103103104104-static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode,104104+static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode,105105 void *data, const struct file_operations *fops)106106{107107 mode = (mode & S_IALLUGO) | S_IFLNK;108108 return debugfs_mknod(dir, dentry, mode, 0, data, fops);109109}110110111111-static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode,111111+static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,112112 void *data, const struct file_operations *fops)113113{114114 int res;···146146 .kill_sb = kill_litter_super,147147};148148149149-static int debugfs_create_by_name(const char *name, mode_t mode,149149+static int debugfs_create_by_name(const char *name, umode_t mode,150150 struct dentry *parent,151151 struct dentry **dentry,152152 void *data,···214214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be215215 * returned.216216 */217217-struct dentry *debugfs_create_file(const char *name, mode_t mode,217217+struct dentry *debugfs_create_file(const char *name, umode_t mode,218218 struct dentry *parent, void *data,219219 const struct file_operations *fops)220220{
+5-24
fs/ecryptfs/inode.c
···144144}145145146146/**147147- * ecryptfs_create_underlying_file148148- * @lower_dir_inode: inode of the parent in the lower fs of the new file149149- * @dentry: New file's dentry150150- * @mode: The mode of the new file151151- *152152- * Creates the file in the lower file system.153153- *154154- * Returns zero on success; non-zero on error condition155155- */156156-static int157157-ecryptfs_create_underlying_file(struct inode *lower_dir_inode,158158- struct dentry *dentry, int mode)159159-{160160- struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);161161- return vfs_create(lower_dir_inode, lower_dentry, mode, NULL);162162-}163163-164164-/**165147 * ecryptfs_do_create166148 * @directory_inode: inode of the new file's dentry's parent in ecryptfs167149 * @ecryptfs_dentry: New file's dentry in ecryptfs···158176 */159177static struct inode *160178ecryptfs_do_create(struct inode *directory_inode,161161- struct dentry *ecryptfs_dentry, int mode)179179+ struct dentry *ecryptfs_dentry, umode_t mode)162180{163181 int rc;164182 struct dentry *lower_dentry;···173191 inode = ERR_CAST(lower_dir_dentry);174192 goto out;175193 }176176- rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode,177177- ecryptfs_dentry, mode);194194+ rc = vfs_create(lower_dir_dentry->d_inode, lower_dentry, mode, NULL);178195 if (rc) {179196 printk(KERN_ERR "%s: Failure to create dentry in lower fs; "180197 "rc = [%d]\n", __func__, rc);···248267 */249268static int250269ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,251251- int mode, struct nameidata *nd)270270+ umode_t mode, struct nameidata *nd)252271{253272 struct inode *ecryptfs_inode;254273 int rc;···540559 return rc;541560}542561543543-static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)562562+static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)544563{545564 int rc;546565 struct dentry *lower_dentry;···588607}589608590609static int591591-ecryptfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)610610+ecryptfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)592611{593612 int rc;594613 struct dentry *lower_dentry;
···12761276/*12771277 * Set up a new inode and create an object for it on the OSD12781278 */12791279-struct inode *exofs_new_inode(struct inode *dir, int mode)12791279+struct inode *exofs_new_inode(struct inode *dir, umode_t mode)12801280{12811281 struct super_block *sb = dir->i_sb;12821282 struct exofs_sb_info *sbi = sb->s_fs_info;
+3-3
fs/exofs/namei.c
···5959 return d_splice_alias(inode, dentry);6060}61616262-static int exofs_create(struct inode *dir, struct dentry *dentry, int mode,6262+static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode,6363 struct nameidata *nd)6464{6565 struct inode *inode = exofs_new_inode(dir, mode);···7474 return err;7575}76767777-static int exofs_mknod(struct inode *dir, struct dentry *dentry, int mode,7777+static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,7878 dev_t rdev)7979{8080 struct inode *inode;···153153 return exofs_add_nondir(dentry, inode);154154}155155156156-static int exofs_mkdir(struct inode *dir, struct dentry *dentry, int mode)156156+static int exofs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)157157{158158 struct inode *inode;159159 int err = -EMLINK;
···351351 */352352353353static int find_group_orlov(struct super_block *sb, struct inode *parent,354354- ext4_group_t *group, int mode,354354+ ext4_group_t *group, umode_t mode,355355 const struct qstr *qstr)356356{357357 ext4_group_t parent_group = EXT4_I(parent)->i_block_group;···497497}498498499499static int find_group_other(struct super_block *sb, struct inode *parent,500500- ext4_group_t *group, int mode)500500+ ext4_group_t *group, umode_t mode)501501{502502 ext4_group_t parent_group = EXT4_I(parent)->i_block_group;503503 ext4_group_t i, last, ngroups = ext4_get_groups_count(sb);···602602 */603603static int ext4_claim_inode(struct super_block *sb,604604 struct buffer_head *inode_bitmap_bh,605605- unsigned long ino, ext4_group_t group, int mode)605605+ unsigned long ino, ext4_group_t group, umode_t mode)606606{607607 int free = 0, retval = 0, count;608608 struct ext4_sb_info *sbi = EXT4_SB(sb);···690690 * For other inodes, search forward from the parent directory's block691691 * group to find a free inode.692692 */693693-struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode,693693+struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, umode_t mode,694694 const struct qstr *qstr, __u32 goal, uid_t *owner)695695{696696 struct super_block *sb;
+3-3
fs/ext4/namei.c
···17361736 * If the create succeeds, we fill in the inode information17371737 * with d_instantiate().17381738 */17391739-static int ext4_create(struct inode *dir, struct dentry *dentry, int mode,17391739+static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode,17401740 struct nameidata *nd)17411741{17421742 handle_t *handle;···17701770}1771177117721772static int ext4_mknod(struct inode *dir, struct dentry *dentry,17731773- int mode, dev_t rdev)17731773+ umode_t mode, dev_t rdev)17741774{17751775 handle_t *handle;17761776 struct inode *inode;···18061806 return err;18071807}1808180818091809-static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode)18091809+static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)18101810{18111811 handle_t *handle;18121812 struct inode *inode;
+3-3
fs/fat/fat.h
···141141static inline int fat_mode_can_hold_ro(struct inode *inode)142142{143143 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);144144- mode_t mask;144144+ umode_t mask;145145146146 if (S_ISDIR(inode->i_mode)) {147147 if (!sbi->options.rodir)···156156}157157158158/* Convert attribute bits and a mask to the UNIX mode. */159159-static inline mode_t fat_make_mode(struct msdos_sb_info *sbi,160160- u8 attrs, mode_t mode)159159+static inline umode_t fat_make_mode(struct msdos_sb_info *sbi,160160+ u8 attrs, umode_t mode)161161{162162 if (attrs & ATTR_RO && !((attrs & ATTR_DIR) && !sbi->options.rodir))163163 mode &= ~S_IWUGO;
+2-2
fs/fat/file.c
···314314static int fat_sanitize_mode(const struct msdos_sb_info *sbi,315315 struct inode *inode, umode_t *mode_ptr)316316{317317- mode_t mask, perm;317317+ umode_t mask, perm;318318319319 /*320320 * Note, the basic check is already done by a caller of···351351352352static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode)353353{354354- mode_t allow_utime = sbi->options.allow_utime;354354+ umode_t allow_utime = sbi->options.allow_utime;355355356356 if (current_fsuid() != inode->i_uid) {357357 if (in_group_p(inode->i_gid))
+2-2
fs/fat/namei_msdos.c
···264264}265265266266/***** Create a file */267267-static int msdos_create(struct inode *dir, struct dentry *dentry, int mode,267267+static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode,268268 struct nameidata *nd)269269{270270 struct super_block *sb = dir->i_sb;···346346}347347348348/***** Make a directory */349349-static int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode)349349+static int msdos_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)350350{351351 struct super_block *sb = dir->i_sb;352352 struct fat_slot_info sinfo;
+2-2
fs/fat/namei_vfat.c
···781781 return ERR_PTR(err);782782}783783784784-static int vfat_create(struct inode *dir, struct dentry *dentry, int mode,784784+static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,785785 struct nameidata *nd)786786{787787 struct super_block *sb = dir->i_sb;···870870 return err;871871}872872873873-static int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode)873873+static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)874874{875875 struct super_block *sb = dir->i_sb;876876 struct inode *inode;
+2-2
fs/freevxfs/vxfs_inode.c
···187187 * vxfs_transmod returns a Linux mode_t for a given188188 * VxFS inode structure.189189 */190190-static __inline__ mode_t190190+static __inline__ umode_t191191vxfs_transmod(struct vxfs_inode_info *vip)192192{193193- mode_t ret = vip->vii_mode & ~VXFS_TYPE_MASK;193193+ umode_t ret = vip->vii_mode & ~VXFS_TYPE_MASK;194194195195 if (VXFS_ISFIFO(vip))196196 ret |= S_IFIFO;
···369369 * If the filesystem doesn't support this, then fall back to separate370370 * 'mknod' + 'open' requests.371371 */372372-static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode,373373- struct nameidata *nd)372372+static int fuse_create_open(struct inode *dir, struct dentry *entry,373373+ umode_t mode, struct nameidata *nd)374374{375375 int err;376376 struct inode *inode;···480480 */481481static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req,482482 struct inode *dir, struct dentry *entry,483483- int mode)483483+ umode_t mode)484484{485485 struct fuse_entry_out outarg;486486 struct inode *inode;···547547 return err;548548}549549550550-static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode,550550+static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode,551551 dev_t rdev)552552{553553 struct fuse_mknod_in inarg;···573573 return create_new_entry(fc, req, dir, entry, mode);574574}575575576576-static int fuse_create(struct inode *dir, struct dentry *entry, int mode,576576+static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode,577577 struct nameidata *nd)578578{579579 if (nd) {···585585 return fuse_mknod(dir, entry, mode, 0);586586}587587588588-static int fuse_mkdir(struct inode *dir, struct dentry *entry, int mode)588588+static int fuse_mkdir(struct inode *dir, struct dentry *entry, umode_t mode)589589{590590 struct fuse_mkdir_in inarg;591591 struct fuse_conn *fc = get_fuse_conn(dir);
+1-1
fs/fuse/fuse_i.h
···80808181 /** The sticky bit in inode->i_mode may have been removed, so8282 preserve the original mode */8383- mode_t orig_i_mode;8383+ umode_t orig_i_mode;84848585 /** Version of last attribute change */8686 u64 attr_version;
+8-8
fs/gfs2/inode.c
···333333 */334334335335static int create_ok(struct gfs2_inode *dip, const struct qstr *name,336336- unsigned int mode)336336+ umode_t mode)337337{338338 int error;339339···364364 return 0;365365}366366367367-static void munge_mode_uid_gid(struct gfs2_inode *dip, unsigned int *mode,367367+static void munge_mode_uid_gid(struct gfs2_inode *dip, umode_t *mode,368368 unsigned int *uid, unsigned int *gid)369369{370370 if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir &&···447447 */448448449449static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,450450- const struct gfs2_inum_host *inum, unsigned int mode,450450+ const struct gfs2_inum_host *inum, umode_t mode,451451 unsigned int uid, unsigned int gid,452452 const u64 *generation, dev_t dev, const char *symname,453453 unsigned size, struct buffer_head **bhp)···516516}517517518518static int make_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,519519- unsigned int mode, const struct gfs2_inum_host *inum,519519+ umode_t mode, const struct gfs2_inum_host *inum,520520 const u64 *generation, dev_t dev, const char *symname,521521 unsigned int size, struct buffer_head **bhp)522522{···659659 */660660661661static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,662662- unsigned int mode, dev_t dev, const char *symname,662662+ umode_t mode, dev_t dev, const char *symname,663663 unsigned int size, int excl)664664{665665 const struct qstr *name = &dentry->d_name;···760760 */761761762762static int gfs2_create(struct inode *dir, struct dentry *dentry,763763- int mode, struct nameidata *nd)763763+ umode_t mode, struct nameidata *nd)764764{765765 int excl = 0;766766 if (nd && (nd->flags & LOOKUP_EXCL))···11291129 * Returns: errno11301130 */1131113111321132-static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode)11321132+static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)11331133{11341134 return gfs2_create_inode(dir, dentry, S_IFDIR | mode, 0, NULL, 0, 0);11351135}···11431143 *11441144 */1145114511461146-static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode,11461146+static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,11471147 dev_t dev)11481148{11491149 return gfs2_create_inode(dir, dentry, mode, dev, NULL, 0, 0);
+2-2
fs/hfs/dir.c
···186186 * a directory and return a corresponding inode, given the inode for187187 * the directory and the name (and its length) of the new file.188188 */189189-static int hfs_create(struct inode *dir, struct dentry *dentry, int mode,189189+static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,190190 struct nameidata *nd)191191{192192 struct inode *inode;···216216 * in a directory, given the inode for the parent directory and the217217 * name (and its length) of the new directory.218218 */219219-static int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)219219+static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)220220{221221 struct inode *inode;222222 int res;
···16461646 * @mode: mode of the new inode16471647 */16481648void inode_init_owner(struct inode *inode, const struct inode *dir,16491649- mode_t mode)16491649+ umode_t mode)16501650{16511651 inode->i_uid = current_fsuid();16521652 if (dir && dir->i_mode & S_ISGID) {
+1-1
fs/internal.h
···8888extern void release_open_intent(struct nameidata *);8989struct open_flags {9090 int open_flag;9191- int mode;9191+ umode_t mode;9292 int acc_mode;9393 int intent;9494};
···104104 int errors = 0, sloppy = 0;105105 uid_t uid = (uid_t)-1;106106 gid_t gid = (gid_t)-1;107107- mode_t fmask = (mode_t)-1, dmask = (mode_t)-1;107107+ umode_t fmask = (umode_t)-1, dmask = (umode_t)-1;108108 int mft_zone_multiplier = -1, on_errors = -1;109109 int show_sys_files = -1, case_sensitive = -1, disable_sparse = -1;110110 struct nls_table *nls_map = NULL, *old_nls;···287287 vol->uid = uid;288288 if (gid != (gid_t)-1)289289 vol->gid = gid;290290- if (fmask != (mode_t)-1)290290+ if (fmask != (umode_t)-1)291291 vol->fmask = fmask;292292- if (dmask != (mode_t)-1)292292+ if (dmask != (umode_t)-1)293293 vol->dmask = dmask;294294 if (show_sys_files != -1) {295295 if (show_sys_files)
+2-2
fs/ntfs/volume.h
···4848 unsigned long flags; /* Miscellaneous flags, see below. */4949 uid_t uid; /* uid that files will be mounted as. */5050 gid_t gid; /* gid that files will be mounted as. */5151- mode_t fmask; /* The mask for file permissions. */5252- mode_t dmask; /* The mask for directory5151+ umode_t fmask; /* The mask for file permissions. */5252+ umode_t dmask; /* The mask for directory5353 permissions. */5454 u8 mft_zone_multiplier; /* Initial mft zone multiplier. */5555 u8 on_errors; /* What to do on filesystem errors. */
···6060/* inode.c */6161extern struct buffer_head *omfs_bread(struct super_block *sb, sector_t block);6262extern struct inode *omfs_iget(struct super_block *sb, ino_t inode);6363-extern struct inode *omfs_new_inode(struct inode *dir, int mode);6363+extern struct inode *omfs_new_inode(struct inode *dir, umode_t mode);6464extern int omfs_reserve_block(struct super_block *sb, sector_t block);6565extern int omfs_find_empty_block(struct super_block *sb, int mode, ino_t *ino);6666extern int omfs_sync_inode(struct inode *inode);
+9-9
fs/open.c
···468468 return error;469469}470470471471-SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode)471471+SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)472472{473473 struct file * file;474474 int err = -EBADF;···482482 return err;483483}484484485485-SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode)485485+SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode)486486{487487 struct path path;488488 int error;···495495 return error;496496}497497498498-SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode)498498+SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode)499499{500500 return sys_fchmodat(AT_FDCWD, filename, mode);501501}···877877878878EXPORT_SYMBOL(fd_install);879879880880-static inline int build_open_flags(int flags, int mode, struct open_flags *op)880880+static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op)881881{882882 int lookup_flags = 0;883883 int acc_mode;···948948 * have to. But in generally you should not do this, so please move949949 * along, nothing to see here..950950 */951951-struct file *filp_open(const char *filename, int flags, int mode)951951+struct file *filp_open(const char *filename, int flags, umode_t mode)952952{953953 struct open_flags op;954954 int lookup = build_open_flags(flags, mode, &op);···970970}971971EXPORT_SYMBOL(file_open_root);972972973973-long do_sys_open(int dfd, const char __user *filename, int flags, int mode)973973+long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)974974{975975 struct open_flags op;976976 int lookup = build_open_flags(flags, mode, &op);···994994 return fd;995995}996996997997-SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode)997997+SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)998998{999999 long ret;10001000···10081008}1009100910101010SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,10111011- int, mode)10111011+ umode_t, mode)10121012{10131013 long ret;10141014···10271027 * For backward compatibility? Maybe this should be moved10281028 * into arch/i386 instead?10291029 */10301030-SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode)10301030+SYSCALL_DEFINE2(creat, const char __user *, pathname, umode_t, mode)10311031{10321032 return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);10331033}
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
···11/*22- * fs/partitions/check.c33- *42 * Code extracted from drivers/block/genhd.c53 * Copyright (C) 1991-1998 Linus Torvalds64 * Re-organised Feb 1998 Russell King···79 * block drivers, which allows all the partition code to810 * be grouped in one location, and it to be mostly self911 * contained.1010- *1111- * Added needed MAJORS for new pairs, {hdi,hdj}, {hdk,hdl}1212 */13131414#include <linux/init.h>···1822#include <linux/genhd.h>1923#include <linux/blktrace_api.h>20242121-#include "check.h"2222-2323-#include "acorn.h"2424-#include "amiga.h"2525-#include "atari.h"2626-#include "ldm.h"2727-#include "mac.h"2828-#include "msdos.h"2929-#include "osf.h"3030-#include "sgi.h"3131-#include "sun.h"3232-#include "ibm.h"3333-#include "ultrix.h"3434-#include "efi.h"3535-#include "karma.h"3636-#include "sysv68.h"2525+#include "partitions/check.h"37263827#ifdef CONFIG_BLK_DEV_MD3928extern void md_autodetect_dev(dev_t dev);4029#endif4141-4242-int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/4343-4444-static int (*check_part[])(struct parsed_partitions *) = {4545- /*4646- * Probe partition formats with tables at disk address 04747- * that also have an ADFS boot block at 0xdc0.4848- */4949-#ifdef CONFIG_ACORN_PARTITION_ICS5050- adfspart_check_ICS,5151-#endif5252-#ifdef CONFIG_ACORN_PARTITION_POWERTEC5353- adfspart_check_POWERTEC,5454-#endif5555-#ifdef CONFIG_ACORN_PARTITION_EESOX5656- adfspart_check_EESOX,5757-#endif5858-5959- /*6060- * Now move on to formats that only have partition info at6161- * disk address 0xdc0. Since these may also have stale6262- * PC/BIOS partition tables, they need to come before6363- * the msdos entry.6464- */6565-#ifdef CONFIG_ACORN_PARTITION_CUMANA6666- adfspart_check_CUMANA,6767-#endif6868-#ifdef CONFIG_ACORN_PARTITION_ADFS6969- adfspart_check_ADFS,7070-#endif7171-7272-#ifdef CONFIG_EFI_PARTITION7373- efi_partition, /* this must come before msdos */7474-#endif7575-#ifdef CONFIG_SGI_PARTITION7676- sgi_partition,7777-#endif7878-#ifdef CONFIG_LDM_PARTITION7979- ldm_partition, /* this must come before msdos */8080-#endif8181-#ifdef CONFIG_MSDOS_PARTITION8282- msdos_partition,8383-#endif8484-#ifdef CONFIG_OSF_PARTITION8585- osf_partition,8686-#endif8787-#ifdef CONFIG_SUN_PARTITION8888- sun_partition,8989-#endif9090-#ifdef CONFIG_AMIGA_PARTITION9191- amiga_partition,9292-#endif9393-#ifdef CONFIG_ATARI_PARTITION9494- atari_partition,9595-#endif9696-#ifdef CONFIG_MAC_PARTITION9797- mac_partition,9898-#endif9999-#ifdef CONFIG_ULTRIX_PARTITION100100- ultrix_partition,101101-#endif102102-#ifdef CONFIG_IBM_PARTITION103103- ibm_partition,104104-#endif105105-#ifdef CONFIG_KARMA_PARTITION106106- karma_partition,107107-#endif108108-#ifdef CONFIG_SYSV68_PARTITION109109- sysv68_partition,110110-#endif111111- NULL112112-};1133011431/*11532 * disk_name() is used by partition check code and the genhd driver.···63154}6415565156EXPORT_SYMBOL(__bdevname);6666-6767-static struct parsed_partitions *6868-check_partition(struct gendisk *hd, struct block_device *bdev)6969-{7070- struct parsed_partitions *state;7171- int i, res, err;7272-7373- state = kzalloc(sizeof(struct parsed_partitions), GFP_KERNEL);7474- if (!state)7575- return NULL;7676- state->pp_buf = (char *)__get_free_page(GFP_KERNEL);7777- if (!state->pp_buf) {7878- kfree(state);7979- return NULL;8080- }8181- state->pp_buf[0] = '\0';8282-8383- state->bdev = bdev;8484- disk_name(hd, 0, state->name);8585- snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name);8686- if (isdigit(state->name[strlen(state->name)-1]))8787- sprintf(state->name, "p");8888-8989- state->limit = disk_max_parts(hd);9090- i = res = err = 0;9191- while (!res && check_part[i]) {9292- memset(&state->parts, 0, sizeof(state->parts));9393- res = check_part[i++](state);9494- if (res < 0) {9595- /* We have hit an I/O error which we don't report now.9696- * But record it, and let the others do their job.9797- */9898- err = res;9999- res = 0;100100- }101101-102102- }103103- if (res > 0) {104104- printk(KERN_INFO "%s", state->pp_buf);105105-106106- free_page((unsigned long)state->pp_buf);107107- return state;108108- }109109- if (state->access_beyond_eod)110110- err = -ENOSPC;111111- if (err)112112- /* The partition is unrecognized. So report I/O errors if there were any */113113- res = err;114114- if (!res)115115- strlcat(state->pp_buf, " unknown partition table\n", PAGE_SIZE);116116- else if (warn_no_part)117117- strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE);118118-119119- printk(KERN_INFO "%s", state->pp_buf);120120-121121- free_page((unsigned long)state->pp_buf);122122- kfree(state);123123- return ERR_PTR(res);124124-}125157126158static ssize_t part_partition_show(struct device *dev,127159 struct device_attribute *attr, char *buf)
···17661766 for the fresh inode. This can only be done outside a transaction, so17671767 if we return non-zero, we also end the transaction. */17681768int reiserfs_new_inode(struct reiserfs_transaction_handle *th,17691769- struct inode *dir, int mode, const char *symname,17691769+ struct inode *dir, umode_t mode, const char *symname,17701770 /* 0 for regular, EMTRY_DIR_SIZE for dirs,17711771 strlen (symname) for symlinks) */17721772 loff_t i_size, struct dentry *dentry,
+4-4
fs/reiserfs/namei.c
···559559** outside of a transaction, so we had to pull some bits of560560** reiserfs_new_inode out into this func.561561*/562562-static int new_inode_init(struct inode *inode, struct inode *dir, int mode)562562+static int new_inode_init(struct inode *inode, struct inode *dir, umode_t mode)563563{564564 /* Make inode invalid - just in case we are going to drop it before565565 * the initialization happens */···572572 return 0;573573}574574575575-static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,575575+static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,576576 struct nameidata *nd)577577{578578 int retval;···643643 return retval;644644}645645646646-static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode,646646+static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,647647 dev_t rdev)648648{649649 int retval;···721721 return retval;722722}723723724724-static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)724724+static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)725725{726726 int retval;727727 struct inode *inode;
+1-1
fs/reiserfs/xattr.c
···6666}6767#endif68686969-static int xattr_mkdir(struct inode *dir, struct dentry *dentry, int mode)6969+static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)7070{7171 BUG_ON(!mutex_is_locked(&dir->i_mutex));7272 return dir->i_op->mkdir(dir, dentry, mode);
···3333 int error = 0, i;34343535 for (i = 0, attr = grp->attrs; *attr && !error; i++, attr++) {3636- mode_t mode = 0;3636+ umode_t mode = 0;37373838 /* in update mode, we're changing the permissions or3939 * visibility. Do this by first removing then
···447447xfs_ialloc_ag_select(448448 xfs_trans_t *tp, /* transaction pointer */449449 xfs_ino_t parent, /* parent directory inode number */450450- mode_t mode, /* bits set to indicate file type */450450+ umode_t mode, /* bits set to indicate file type */451451 int okalloc) /* ok to allocate more space */452452{453453 xfs_buf_t *agbp; /* allocation group header buffer */···640640xfs_dialloc(641641 xfs_trans_t *tp, /* transaction pointer */642642 xfs_ino_t parent, /* parent inode (directory) */643643- mode_t mode, /* mode bits for new inode */643643+ umode_t mode, /* mode bits for new inode */644644 int okalloc, /* ok to allocate more space */645645 xfs_buf_t **IO_agbp, /* in/out ag header's buffer */646646 boolean_t *alloc_done, /* true if we needed to replenish
+1-1
fs/xfs/xfs_ialloc.h
···8181xfs_dialloc(8282 struct xfs_trans *tp, /* transaction pointer */8383 xfs_ino_t parent, /* parent inode (directory) */8484- mode_t mode, /* mode bits for new inode */8484+ umode_t mode, /* mode bits for new inode */8585 int okalloc, /* ok to allocate more space */8686 struct xfs_buf **agbp, /* buf for a.g. inode header */8787 boolean_t *alloc_done, /* an allocation was done to replenish
···5353 output: may be a new transaction. */5454 xfs_inode_t *dp, /* directory within whose allocate5555 the inode. */5656- mode_t mode,5656+ umode_t mode,5757 xfs_nlink_t nlink,5858 xfs_dev_t rdev,5959 prid_t prid, /* project id */
+1-1
fs/xfs/xfs_utils.h
···1818#ifndef __XFS_UTILS_H__1919#define __XFS_UTILS_H__20202121-extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,2121+extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, umode_t, xfs_nlink_t,2222 xfs_dev_t, prid_t, int, xfs_inode_t **, int *);2323extern int xfs_droplink(xfs_trans_t *, xfs_inode_t *);2424extern int xfs_bumplink(xfs_trans_t *, xfs_inode_t *);
···319319 * If not 0, file mode is set to this value, otherwise it will320320 * be figured out automatically321321 */322322- mode_t mode;322322+ umode_t mode;323323324324 /*325325 * If non-zero, defines the maximum length of string that can
+2-2
include/linux/compat.h
···422422asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *,423423 unsigned int nr_segs, unsigned int flags);424424asmlinkage long compat_sys_open(const char __user *filename, int flags,425425- int mode);425425+ umode_t mode);426426asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,427427- int flags, int mode);427427+ int flags, umode_t mode);428428asmlinkage long compat_sys_open_by_handle_at(int mountdirfd,429429 struct file_handle __user *handle,430430 int flags);
···163163 * disks that can't be partitioned. */164164165165 char disk_name[DISK_NAME_LEN]; /* name of major driver */166166- char *(*devnode)(struct gendisk *gd, mode_t *mode);166166+ char *(*devnode)(struct gendisk *gd, umode_t *mode);167167168168 unsigned int events; /* supported events */169169 unsigned int async_events; /* async events, subset of all */
···475475asmlinkage long sys_pivot_root(const char __user *new_root,476476 const char __user *put_old);477477asmlinkage long sys_chroot(const char __user *filename);478478-asmlinkage long sys_mknod(const char __user *filename, int mode,478478+asmlinkage long sys_mknod(const char __user *filename, umode_t mode,479479 unsigned dev);480480asmlinkage long sys_link(const char __user *oldname,481481 const char __user *newname);···483483asmlinkage long sys_unlink(const char __user *pathname);484484asmlinkage long sys_rename(const char __user *oldname,485485 const char __user *newname);486486-asmlinkage long sys_chmod(const char __user *filename, mode_t mode);487487-asmlinkage long sys_fchmod(unsigned int fd, mode_t mode);486486+asmlinkage long sys_chmod(const char __user *filename, umode_t mode);487487+asmlinkage long sys_fchmod(unsigned int fd, umode_t mode);488488489489asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);490490#if BITS_PER_LONG == 32···517517 loff_t __user *offset, size_t count);518518asmlinkage long sys_readlink(const char __user *path,519519 char __user *buf, int bufsiz);520520-asmlinkage long sys_creat(const char __user *pathname, int mode);520520+asmlinkage long sys_creat(const char __user *pathname, umode_t mode);521521asmlinkage long sys_open(const char __user *filename,522522- int flags, int mode);522522+ int flags, umode_t mode);523523asmlinkage long sys_close(unsigned int fd);524524asmlinkage long sys_access(const char __user *filename, int mode);525525asmlinkage long sys_vhangup(void);···582582asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec,583583 unsigned long vlen, unsigned long pos_l, unsigned long pos_h);584584asmlinkage long sys_getcwd(char __user *buf, unsigned long size);585585-asmlinkage long sys_mkdir(const char __user *pathname, int mode);585585+asmlinkage long sys_mkdir(const char __user *pathname, umode_t mode);586586asmlinkage long sys_chdir(const char __user *filename);587587asmlinkage long sys_fchdir(unsigned int fd);588588asmlinkage long sys_rmdir(const char __user *pathname);···679679asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,680680 unsigned long third, void __user *ptr, long fifth);681681682682-asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);682682+asmlinkage long sys_mq_open(const char __user *name, int oflag, umode_t mode, struct mq_attr __user *attr);683683asmlinkage long sys_mq_unlink(const char __user *name);684684asmlinkage 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);685685asmlinkage 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);···753753asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,754754 __u32 __user *ustatus);755755asmlinkage long sys_spu_create(const char __user *name,756756- unsigned int flags, mode_t mode, int fd);756756+ unsigned int flags, umode_t mode, int fd);757757758758-asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode,758758+asmlinkage long sys_mknodat(int dfd, const char __user * filename, umode_t mode,759759 unsigned dev);760760-asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode);760760+asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, umode_t mode);761761asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag);762762asmlinkage long sys_symlinkat(const char __user * oldname,763763 int newdfd, const char __user * newname);···769769 struct timeval __user *utimes);770770asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode);771771asmlinkage long sys_fchmodat(int dfd, const char __user * filename,772772- mode_t mode);772772+ umode_t mode);773773asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user,774774 gid_t group, int flag);775775asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,776776- int mode);776776+ umode_t mode);777777asmlinkage long sys_newfstatat(int dfd, const char __user *filename,778778 struct stat __user *statbuf, int flag);779779asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
+1-1
include/linux/sysctl.h
···10381038 const char *procname; /* Text ID for /proc/sys, or zero */10391039 void *data;10401040 int maxlen;10411041- mode_t mode;10411041+ umode_t mode;10421042 struct ctl_table *child;10431043 struct ctl_table *parent; /* Automatically set */10441044 proc_handler *proc_handler; /* Callback for text formatting */
···847847 atomic_set(&addr->refcnt, 1);848848849849 if (sun_path[0]) {850850- unsigned int mode;850850+ umode_t mode;851851 err = 0;852852 /*853853 * Get the parent directory, calculate the hash for last
+1-1
security/apparmor/apparmorfs.c
···165165 *166166 * Used aafs_remove to remove entries created with this fn.167167 */168168-static int __init aafs_create(const char *name, int mask,168168+static int __init aafs_create(const char *name, umode_t mask,169169 const struct file_operations *fops)170170{171171 struct dentry *dentry;
+3-3
security/apparmor/lsm.c
···262262}263263264264static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry,265265- int mode)265265+ umode_t mode)266266{267267 return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE,268268 S_IFDIR);···274274}275275276276static int apparmor_path_mknod(struct path *dir, struct dentry *dentry,277277- int mode, unsigned int dev)277277+ umode_t mode, unsigned int dev)278278{279279 return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode);280280}···345345}346346347347static int apparmor_path_chmod(struct dentry *dentry, struct vfsmount *mnt,348348- mode_t mode)348348+ umode_t mode)349349{350350 if (!mediated_filesystem(dentry->d_inode))351351 return 0;
+6-6
security/capability.c
···125125}126126127127static int cap_inode_create(struct inode *inode, struct dentry *dentry,128128- int mask)128128+ umode_t mask)129129{130130 return 0;131131}···148148}149149150150static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry,151151- int mask)151151+ umode_t mask)152152{153153 return 0;154154}···159159}160160161161static int cap_inode_mknod(struct inode *inode, struct dentry *dentry,162162- int mode, dev_t dev)162162+ umode_t mode, dev_t dev)163163{164164 return 0;165165}···235235}236236237237#ifdef CONFIG_SECURITY_PATH238238-static int cap_path_mknod(struct path *dir, struct dentry *dentry, int mode,238238+static int cap_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode,239239 unsigned int dev)240240{241241 return 0;242242}243243244244-static int cap_path_mkdir(struct path *dir, struct dentry *dentry, int mode)244244+static int cap_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode)245245{246246 return 0;247247}···280280}281281282282static int cap_path_chmod(struct dentry *dentry, struct vfsmount *mnt,283283- mode_t mode)283283+ umode_t mode)284284{285285 return 0;286286}
+7-7
security/inode.c
···5656 .llseek = noop_llseek,5757};58585959-static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)5959+static struct inode *get_inode(struct super_block *sb, umode_t mode, dev_t dev)6060{6161 struct inode *inode = new_inode(sb);6262···85858686/* SMP-safe */8787static int mknod(struct inode *dir, struct dentry *dentry,8888- int mode, dev_t dev)8888+ umode_t mode, dev_t dev)8989{9090 struct inode *inode;9191 int error = -ENOMEM;···102102 return error;103103}104104105105-static int mkdir(struct inode *dir, struct dentry *dentry, int mode)105105+static int mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)106106{107107 int res;108108···113113 return res;114114}115115116116-static int create(struct inode *dir, struct dentry *dentry, int mode)116116+static int create(struct inode *dir, struct dentry *dentry, umode_t mode)117117{118118 mode = (mode & S_IALLUGO) | S_IFREG;119119 return mknod(dir, dentry, mode, 0);···145145 .kill_sb = kill_litter_super,146146};147147148148-static int create_by_name(const char *name, mode_t mode,148148+static int create_by_name(const char *name, umode_t mode,149149 struct dentry *parent,150150 struct dentry **dentry)151151{···164164 mutex_lock(&parent->d_inode->i_mutex);165165 *dentry = lookup_one_len(name, parent, strlen(name));166166 if (!IS_ERR(*dentry)) {167167- if ((mode & S_IFMT) == S_IFDIR)167167+ if (S_ISDIR(mode))168168 error = mkdir(parent->d_inode, *dentry, mode);169169 else170170 error = create(parent->d_inode, *dentry, mode);···205205 * If securityfs is not enabled in the kernel, the value %-ENODEV is206206 * returned.207207 */208208-struct dentry *securityfs_create_file(const char *name, mode_t mode,208208+struct dentry *securityfs_create_file(const char *name, umode_t mode,209209 struct dentry *parent, void *data,210210 const struct file_operations *fops)211211{