aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/debugfs.txt24
-rw-r--r--arch/arm/mach-msm/smd_debug.c2
-rw-r--r--arch/s390/include/asm/debug.h4
-rw-r--r--arch/s390/kernel/debug.c8
-rw-r--r--arch/x86/xen/debugfs.c2
-rw-r--r--arch/x86/xen/debugfs.h2
-rw-r--r--drivers/acpi/ec_sys.c2
-rw-r--r--drivers/mmc/card/mmc_test.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/debug.c2
-rw-r--r--drivers/net/wireless/libertas/debugfs.c2
-rw-r--r--drivers/s390/block/dasd.c4
-rw-r--r--drivers/scsi/bfa/bfad_debugfs.c2
-rw-r--r--fs/debugfs/file.c22
-rw-r--r--fs/debugfs/inode.c14
-rw-r--r--fs/ocfs2/cluster/netdebug.c2
-rw-r--r--include/linux/debugfs.h46
-rw-r--r--include/linux/relay.h2
-rw-r--r--kernel/relay.c2
-rw-r--r--kernel/trace/blktrace.c2
-rw-r--r--kernel/trace/trace.c2
-rw-r--r--kernel/trace/trace.h2
-rw-r--r--lib/fault-inject.c8
-rw-r--r--mm/failslab.c2
-rw-r--r--mm/page_alloc.c2
25 files changed, 82 insertions, 82 deletions
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 742cc06e138f..9281a95d689f 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -35,7 +35,7 @@ described below will work.
35 35
36The most general way to create a file within a debugfs directory is with: 36The 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 struct dentry *parent, void *data, 39 struct dentry *parent, void *data,
40 const struct file_operations *fops); 40 const struct file_operations *fops);
41 41
@@ -53,13 +53,13 @@ actually necessary; the debugfs code provides a number of helper functions
53for simple situations. Files containing a single integer value can be 53for simple situations. Files containing a single integer value can be
54created with any of: 54created 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 struct dentry *parent, u8 *value); 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 struct dentry *parent, u16 *value); 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 struct dentry *parent, u32 *value); 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 struct dentry *parent, u64 *value); 63 struct dentry *parent, u64 *value);
64 64
65These files support both reading and writing the given value; if a specific 65These files support both reading and writing the given value; if a specific
@@ -67,13 +67,13 @@ file should not be written to, simply set the mode bits accordingly. The
67values in these files are in decimal; if hexadecimal is more appropriate, 67values in these files are in decimal; if hexadecimal is more appropriate,
68the following functions can be used instead: 68the 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 struct dentry *parent, u8 *value); 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 struct dentry *parent, u16 *value); 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 struct dentry *parent, u32 *value); 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 struct dentry *parent, u64 *value); 77 struct dentry *parent, u64 *value);
78 78
79These functions are useful as long as the developer knows the size of the 79These functions are useful as long as the developer knows the size of the
@@ -81,7 +81,7 @@ value to be exported. Some types can have different widths on different
81architectures, though, complicating the situation somewhat. There is a 81architectures, though, complicating the situation somewhat. There is a
82function meant to help out in one special case: 82function 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 struct dentry *parent, 85 struct dentry *parent,
86 size_t *value); 86 size_t *value);
87 87
@@ -90,7 +90,7 @@ a variable of type size_t.
90 90
91Boolean values can be placed in debugfs with: 91Boolean 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 struct dentry *parent, u32 *value); 94 struct dentry *parent, u32 *value);
95 95
96A read on the resulting file will yield either Y (for non-zero values) or 96A read on the resulting file will yield either Y (for non-zero values) or
@@ -104,7 +104,7 @@ Finally, a block of arbitrary binary data can be exported with:
104 unsigned long size; 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 struct dentry *parent, 108 struct dentry *parent,
109 struct debugfs_blob_wrapper *blob); 109 struct debugfs_blob_wrapper *blob);
110 110
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c
index 8736afff82f3..0c56a5aaf588 100644
--- a/arch/arm/mach-msm/smd_debug.c
+++ b/arch/arm/mach-msm/smd_debug.c
@@ -215,7 +215,7 @@ static const struct file_operations debug_ops = {
215 .llseek = default_llseek, 215 .llseek = default_llseek,
216}; 216};
217 217
218static void debug_create(const char *name, mode_t mode, 218static void debug_create(const char *name, umode_t mode,
219 struct dentry *dent, 219 struct dentry *dent,
220 int (*fill)(char *buf, int max)) 220 int (*fill)(char *buf, int max))
221{ 221{
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h
index 18124b75a7ab..9d88db1f55d0 100644
--- a/arch/s390/include/asm/debug.h
+++ b/arch/s390/include/asm/debug.h
@@ -73,7 +73,7 @@ typedef struct debug_info {
73 struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; 73 struct dentry* debugfs_entries[DEBUG_MAX_VIEWS];
74 struct debug_view* views[DEBUG_MAX_VIEWS]; 74 struct debug_view* views[DEBUG_MAX_VIEWS];
75 char name[DEBUG_MAX_NAME_LEN]; 75 char name[DEBUG_MAX_NAME_LEN];
76 mode_t mode; 76 umode_t mode;
77} debug_info_t; 77} debug_info_t;
78 78
79typedef int (debug_header_proc_t) (debug_info_t* id, 79typedef int (debug_header_proc_t) (debug_info_t* id,
@@ -124,7 +124,7 @@ debug_info_t *debug_register(const char *name, int pages, int nr_areas,
124 int buf_size); 124 int buf_size);
125 125
126debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, 126debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas,
127 int buf_size, mode_t mode, uid_t uid, 127 int buf_size, umode_t mode, uid_t uid,
128 gid_t gid); 128 gid_t gid);
129 129
130void debug_unregister(debug_info_t* id); 130void debug_unregister(debug_info_t* id);
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 5ad6bc078bfd..6848828b962e 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -74,7 +74,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf,
74static int debug_open(struct inode *inode, struct file *file); 74static int debug_open(struct inode *inode, struct file *file);
75static int debug_close(struct inode *inode, struct file *file); 75static int debug_close(struct inode *inode, struct file *file);
76static debug_info_t *debug_info_create(const char *name, int pages_per_area, 76static 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);
78static void debug_info_get(debug_info_t *); 78static void debug_info_get(debug_info_t *);
79static void debug_info_put(debug_info_t *); 79static void debug_info_put(debug_info_t *);
80static int debug_prolog_level_fn(debug_info_t * id, 80static int debug_prolog_level_fn(debug_info_t * id,
@@ -330,7 +330,7 @@ debug_info_free(debug_info_t* db_info){
330 330
331static debug_info_t* 331static debug_info_t*
332debug_info_create(const char *name, int pages_per_area, int nr_areas, 332debug_info_create(const char *name, int pages_per_area, int nr_areas,
333 int buf_size, mode_t mode) 333 int buf_size, umode_t mode)
334{ 334{
335 debug_info_t* rc; 335 debug_info_t* rc;
336 336
@@ -688,7 +688,7 @@ debug_close(struct inode *inode, struct file *file)
688 */ 688 */
689 689
690debug_info_t *debug_register_mode(const char *name, int pages_per_area, 690debug_info_t *debug_register_mode(const char *name, int pages_per_area,
691 int nr_areas, int buf_size, mode_t mode, 691 int nr_areas, int buf_size, umode_t mode,
692 uid_t uid, gid_t gid) 692 uid_t uid, gid_t gid)
693{ 693{
694 debug_info_t *rc = NULL; 694 debug_info_t *rc = NULL;
@@ -1090,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
1090 int rc = 0; 1090 int rc = 0;
1091 int i; 1091 int i;
1092 unsigned long flags; 1092 unsigned long flags;
1093 mode_t mode; 1093 umode_t mode;
1094 struct dentry *pde; 1094 struct dentry *pde;
1095 1095
1096 if (!id) 1096 if (!id)
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c
index 7c0fedd98ea0..ef1db1900d86 100644
--- a/arch/x86/xen/debugfs.c
+++ b/arch/x86/xen/debugfs.c
@@ -109,7 +109,7 @@ static const struct file_operations u32_array_fops = {
109 .llseek = no_llseek, 109 .llseek = no_llseek,
110}; 110};
111 111
112struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, 112struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode,
113 struct dentry *parent, 113 struct dentry *parent,
114 u32 *array, unsigned elements) 114 u32 *array, unsigned elements)
115{ 115{
diff --git a/arch/x86/xen/debugfs.h b/arch/x86/xen/debugfs.h
index e28132084832..78d25499be5b 100644
--- a/arch/x86/xen/debugfs.h
+++ b/arch/x86/xen/debugfs.h
@@ -3,7 +3,7 @@
3 3
4struct dentry * __init xen_init_debugfs(void); 4struct dentry * __init xen_init_debugfs(void);
5 5
6struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, 6struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode,
7 struct dentry *parent, 7 struct dentry *parent,
8 u32 *array, unsigned elements); 8 u32 *array, unsigned elements);
9 9
diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c
index 6c47ae9793a7..b258cab9061c 100644
--- a/drivers/acpi/ec_sys.c
+++ b/drivers/acpi/ec_sys.c
@@ -105,7 +105,7 @@ int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)
105{ 105{
106 struct dentry *dev_dir; 106 struct dentry *dev_dir;
107 char name[64]; 107 char name[64];
108 mode_t mode = 0400; 108 umode_t mode = 0400;
109 109
110 if (ec_device_count == 0) { 110 if (ec_device_count == 0) {
111 acpi_ec_debugfs_dir = debugfs_create_dir("ec", NULL); 111 acpi_ec_debugfs_dir = debugfs_create_dir("ec", NULL);
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index b038c4a9468b..e99bdc18002d 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -2949,7 +2949,7 @@ static void mmc_test_free_dbgfs_file(struct mmc_card *card)
2949} 2949}
2950 2950
2951static int __mmc_test_register_dbgfs_file(struct mmc_card *card, 2951static 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 struct dentry *file = NULL; 2954 struct dentry *file = NULL;
2955 struct mmc_test_dbgfs_file *df; 2955 struct mmc_test_dbgfs_file *df;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index da9072bfca8b..f5a24d99ef4f 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2000,7 +2000,7 @@ static const struct file_operations interfaces_proc_fops = {
2000 */ 2000 */
2001struct cxgb4vf_debugfs_entry { 2001struct cxgb4vf_debugfs_entry {
2002 const char *name; /* name of debugfs node */ 2002 const char *name; /* name of debugfs node */
2003 mode_t mode; /* file system mode */ 2003 umode_t mode; /* file system mode */
2004 const struct file_operations *fops; 2004 const struct file_operations *fops;
2005}; 2005};
2006 2006
diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c
index de57f90e1d5f..3c164226687f 100644
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -56,7 +56,7 @@ static int carl9170_debugfs_open(struct inode *inode, struct file *file)
56 56
57struct carl9170_debugfs_fops { 57struct carl9170_debugfs_fops {
58 unsigned int read_bufsize; 58 unsigned int read_bufsize;
59 mode_t attr; 59 umode_t attr;
60 char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize, 60 char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize,
61 ssize_t *len); 61 ssize_t *len);
62 ssize_t (*write)(struct ar9170 *aru, const char *buf, size_t size); 62 ssize_t (*write)(struct ar9170 *aru, const char *buf, size_t size);
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index d8d8f0d0899f..c192671610fc 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -704,7 +704,7 @@ out_unlock:
704 704
705struct lbs_debugfs_files { 705struct lbs_debugfs_files {
706 const char *name; 706 const char *name;
707 int perm; 707 umode_t perm;
708 struct file_operations fops; 708 struct file_operations fops;
709}; 709};
710 710
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 65894f05a801..42986d7bcf9d 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1073,7 +1073,7 @@ static const struct file_operations dasd_stats_global_fops = {
1073static void dasd_profile_init(struct dasd_profile *profile, 1073static void dasd_profile_init(struct dasd_profile *profile,
1074 struct dentry *base_dentry) 1074 struct dentry *base_dentry)
1075{ 1075{
1076 mode_t mode; 1076 umode_t mode;
1077 struct dentry *pde; 1077 struct dentry *pde;
1078 1078
1079 if (!base_dentry) 1079 if (!base_dentry)
@@ -1112,7 +1112,7 @@ static void dasd_statistics_removeroot(void)
1112 1112
1113static void dasd_statistics_createroot(void) 1113static void dasd_statistics_createroot(void)
1114{ 1114{
1115 mode_t mode; 1115 umode_t mode;
1116 struct dentry *pde; 1116 struct dentry *pde;
1117 1117
1118 dasd_debugfs_root_entry = NULL; 1118 dasd_debugfs_root_entry = NULL;
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c
index dee1a094c2c2..caca9b7c8309 100644
--- a/drivers/scsi/bfa/bfad_debugfs.c
+++ b/drivers/scsi/bfa/bfad_debugfs.c
@@ -472,7 +472,7 @@ static const struct file_operations bfad_debugfs_op_regwr = {
472 472
473struct bfad_debugfs_entry { 473struct bfad_debugfs_entry {
474 const char *name; 474 const char *name;
475 mode_t mode; 475 umode_t mode;
476 const struct file_operations *fops; 476 const struct file_operations *fops;
477}; 477};
478 478
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 90f76575c056..d5016606fb27 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -95,7 +95,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u8_wo, NULL, debugfs_u8_set, "%llu\n");
95 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 95 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
96 * code. 96 * code.
97 */ 97 */
98struct dentry *debugfs_create_u8(const char *name, mode_t mode, 98struct dentry *debugfs_create_u8(const char *name, umode_t mode,
99 struct dentry *parent, u8 *value) 99 struct dentry *parent, u8 *value)
100{ 100{
101 /* if there are no write bits set, make read only */ 101 /* if there are no write bits set, make read only */
@@ -147,7 +147,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%llu\n");
147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
148 * code. 148 * code.
149 */ 149 */
150struct dentry *debugfs_create_u16(const char *name, mode_t mode, 150struct dentry *debugfs_create_u16(const char *name, umode_t mode,
151 struct dentry *parent, u16 *value) 151 struct dentry *parent, u16 *value)
152{ 152{
153 /* if there are no write bits set, make read only */ 153 /* if there are no write bits set, make read only */
@@ -199,7 +199,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u32_wo, NULL, debugfs_u32_set, "%llu\n");
199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
200 * code. 200 * code.
201 */ 201 */
202struct dentry *debugfs_create_u32(const char *name, mode_t mode, 202struct dentry *debugfs_create_u32(const char *name, umode_t mode,
203 struct dentry *parent, u32 *value) 203 struct dentry *parent, u32 *value)
204{ 204{
205 /* if there are no write bits set, make read only */ 205 /* if there are no write bits set, make read only */
@@ -252,7 +252,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n");
252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
253 * code. 253 * code.
254 */ 254 */
255struct dentry *debugfs_create_u64(const char *name, mode_t mode, 255struct dentry *debugfs_create_u64(const char *name, umode_t mode,
256 struct dentry *parent, u64 *value) 256 struct dentry *parent, u64 *value)
257{ 257{
258 /* if there are no write bits set, make read only */ 258 /* if there are no write bits set, make read only */
@@ -298,7 +298,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n
298 * @value: a pointer to the variable that the file should read to and write 298 * @value: a pointer to the variable that the file should read to and write
299 * from. 299 * from.
300 */ 300 */
301struct dentry *debugfs_create_x8(const char *name, mode_t mode, 301struct dentry *debugfs_create_x8(const char *name, umode_t mode,
302 struct dentry *parent, u8 *value) 302 struct dentry *parent, u8 *value)
303{ 303{
304 /* if there are no write bits set, make read only */ 304 /* if there are no write bits set, make read only */
@@ -322,7 +322,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x8);
322 * @value: a pointer to the variable that the file should read to and write 322 * @value: a pointer to the variable that the file should read to and write
323 * from. 323 * from.
324 */ 324 */
325struct dentry *debugfs_create_x16(const char *name, mode_t mode, 325struct dentry *debugfs_create_x16(const char *name, umode_t mode,
326 struct dentry *parent, u16 *value) 326 struct dentry *parent, u16 *value)
327{ 327{
328 /* if there are no write bits set, make read only */ 328 /* if there are no write bits set, make read only */
@@ -346,7 +346,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x16);
346 * @value: a pointer to the variable that the file should read to and write 346 * @value: a pointer to the variable that the file should read to and write
347 * from. 347 * from.
348 */ 348 */
349struct dentry *debugfs_create_x32(const char *name, mode_t mode, 349struct dentry *debugfs_create_x32(const char *name, umode_t mode,
350 struct dentry *parent, u32 *value) 350 struct dentry *parent, u32 *value)
351{ 351{
352 /* if there are no write bits set, make read only */ 352 /* if there are no write bits set, make read only */
@@ -370,7 +370,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x32);
370 * @value: a pointer to the variable that the file should read to and write 370 * @value: a pointer to the variable that the file should read to and write
371 * from. 371 * from.
372 */ 372 */
373struct dentry *debugfs_create_x64(const char *name, mode_t mode, 373struct dentry *debugfs_create_x64(const char *name, umode_t mode,
374 struct dentry *parent, u64 *value) 374 struct dentry *parent, u64 *value)
375{ 375{
376 return debugfs_create_file(name, mode, parent, value, &fops_x64); 376 return debugfs_create_file(name, mode, parent, value, &fops_x64);
@@ -401,7 +401,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_size_t, debugfs_size_t_get, debugfs_size_t_set,
401 * @value: a pointer to the variable that the file should read to and write 401 * @value: a pointer to the variable that the file should read to and write
402 * from. 402 * from.
403 */ 403 */
404struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 404struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
405 struct dentry *parent, size_t *value) 405 struct dentry *parent, size_t *value)
406{ 406{
407 return debugfs_create_file(name, mode, parent, value, &fops_size_t); 407 return debugfs_create_file(name, mode, parent, value, &fops_size_t);
@@ -473,7 +473,7 @@ static const struct file_operations fops_bool = {
473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
474 * code. 474 * code.
475 */ 475 */
476struct dentry *debugfs_create_bool(const char *name, mode_t mode, 476struct dentry *debugfs_create_bool(const char *name, umode_t mode,
477 struct dentry *parent, u32 *value) 477 struct dentry *parent, u32 *value)
478{ 478{
479 return debugfs_create_file(name, mode, parent, value, &fops_bool); 479 return debugfs_create_file(name, mode, parent, value, &fops_bool);
@@ -518,7 +518,7 @@ static const struct file_operations fops_blob = {
518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
519 * code. 519 * code.
520 */ 520 */
521struct dentry *debugfs_create_blob(const char *name, mode_t mode, 521struct dentry *debugfs_create_blob(const char *name, umode_t mode,
522 struct dentry *parent, 522 struct dentry *parent,
523 struct debugfs_blob_wrapper *blob) 523 struct debugfs_blob_wrapper *blob)
524{ 524{
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c9dc08d0c100..956d5ddddf6e 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -30,7 +30,7 @@ static struct vfsmount *debugfs_mount;
30static int debugfs_mount_count; 30static int debugfs_mount_count;
31static bool debugfs_registered; 31static bool debugfs_registered;
32 32
33static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev, 33static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev_t dev,
34 void *data, const struct file_operations *fops) 34 void *data, const struct file_operations *fops)
35 35
36{ 36{
@@ -69,7 +69,7 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
69 69
70/* SMP-safe */ 70/* SMP-safe */
71static int debugfs_mknod(struct inode *dir, struct dentry *dentry, 71static 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 const struct file_operations *fops) 73 const struct file_operations *fops)
74{ 74{
75 struct inode *inode; 75 struct inode *inode;
@@ -87,7 +87,7 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
87 return error; 87 return error;
88} 88}
89 89
90static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode, 90static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode,
91 void *data, const struct file_operations *fops) 91 void *data, const struct file_operations *fops)
92{ 92{
93 int res; 93 int res;
@@ -101,14 +101,14 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode,
101 return res; 101 return res;
102} 102}
103 103
104static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode, 104static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode,
105 void *data, const struct file_operations *fops) 105 void *data, const struct file_operations *fops)
106{ 106{
107 mode = (mode & S_IALLUGO) | S_IFLNK; 107 mode = (mode & S_IALLUGO) | S_IFLNK;
108 return debugfs_mknod(dir, dentry, mode, 0, data, fops); 108 return debugfs_mknod(dir, dentry, mode, 0, data, fops);
109} 109}
110 110
111static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode, 111static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
112 void *data, const struct file_operations *fops) 112 void *data, const struct file_operations *fops)
113{ 113{
114 int res; 114 int res;
@@ -146,7 +146,7 @@ static struct file_system_type debug_fs_type = {
146 .kill_sb = kill_litter_super, 146 .kill_sb = kill_litter_super,
147}; 147};
148 148
149static int debugfs_create_by_name(const char *name, mode_t mode, 149static int debugfs_create_by_name(const char *name, umode_t mode,
150 struct dentry *parent, 150 struct dentry *parent,
151 struct dentry **dentry, 151 struct dentry **dentry,
152 void *data, 152 void *data,
@@ -214,7 +214,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be 214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be
215 * returned. 215 * returned.
216 */ 216 */
217struct dentry *debugfs_create_file(const char *name, mode_t mode, 217struct dentry *debugfs_create_file(const char *name, umode_t mode,
218 struct dentry *parent, void *data, 218 struct dentry *parent, void *data,
219 const struct file_operations *fops) 219 const struct file_operations *fops)
220{ 220{
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c
index dc45deb19e68..73ba81928bce 100644
--- a/fs/ocfs2/cluster/netdebug.c
+++ b/fs/ocfs2/cluster/netdebug.c
@@ -553,7 +553,7 @@ void o2net_debugfs_exit(void)
553 553
554int o2net_debugfs_init(void) 554int 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 o2net_dentry = debugfs_create_dir(O2NET_DEBUG_DIR, NULL); 558 o2net_dentry = debugfs_create_dir(O2NET_DEBUG_DIR, NULL);
559 if (o2net_dentry) 559 if (o2net_dentry)
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index e7d9b20ddc5b..d1ac841e8dc7 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -34,7 +34,7 @@ extern struct dentry *arch_debugfs_dir;
34extern const struct file_operations debugfs_file_operations; 34extern const struct file_operations debugfs_file_operations;
35extern const struct inode_operations debugfs_link_operations; 35extern const struct inode_operations debugfs_link_operations;
36 36
37struct dentry *debugfs_create_file(const char *name, mode_t mode, 37struct dentry *debugfs_create_file(const char *name, umode_t mode,
38 struct dentry *parent, void *data, 38 struct dentry *parent, void *data,
39 const struct file_operations *fops); 39 const struct file_operations *fops);
40 40
@@ -49,28 +49,28 @@ void debugfs_remove_recursive(struct dentry *dentry);
49struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, 49struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
50 struct dentry *new_dir, const char *new_name); 50 struct dentry *new_dir, const char *new_name);
51 51
52struct dentry *debugfs_create_u8(const char *name, mode_t mode, 52struct dentry *debugfs_create_u8(const char *name, umode_t mode,
53 struct dentry *parent, u8 *value); 53 struct dentry *parent, u8 *value);
54struct dentry *debugfs_create_u16(const char *name, mode_t mode, 54struct dentry *debugfs_create_u16(const char *name, umode_t mode,
55 struct dentry *parent, u16 *value); 55 struct dentry *parent, u16 *value);
56struct dentry *debugfs_create_u32(const char *name, mode_t mode, 56struct dentry *debugfs_create_u32(const char *name, umode_t mode,
57 struct dentry *parent, u32 *value); 57 struct dentry *parent, u32 *value);
58struct dentry *debugfs_create_u64(const char *name, mode_t mode, 58struct dentry *debugfs_create_u64(const char *name, umode_t mode,
59 struct dentry *parent, u64 *value); 59 struct dentry *parent, u64 *value);
60struct dentry *debugfs_create_x8(const char *name, mode_t mode, 60struct dentry *debugfs_create_x8(const char *name, umode_t mode,
61 struct dentry *parent, u8 *value); 61 struct dentry *parent, u8 *value);
62struct dentry *debugfs_create_x16(const char *name, mode_t mode, 62struct dentry *debugfs_create_x16(const char *name, umode_t mode,
63 struct dentry *parent, u16 *value); 63 struct dentry *parent, u16 *value);
64struct dentry *debugfs_create_x32(const char *name, mode_t mode, 64struct dentry *debugfs_create_x32(const char *name, umode_t mode,
65 struct dentry *parent, u32 *value); 65 struct dentry *parent, u32 *value);
66struct dentry *debugfs_create_x64(const char *name, mode_t mode, 66struct dentry *debugfs_create_x64(const char *name, umode_t mode,
67 struct dentry *parent, u64 *value); 67 struct dentry *parent, u64 *value);
68struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 68struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
69 struct dentry *parent, size_t *value); 69 struct dentry *parent, size_t *value);
70struct dentry *debugfs_create_bool(const char *name, mode_t mode, 70struct dentry *debugfs_create_bool(const char *name, umode_t mode,
71 struct dentry *parent, u32 *value); 71 struct dentry *parent, u32 *value);
72 72
73struct dentry *debugfs_create_blob(const char *name, mode_t mode, 73struct dentry *debugfs_create_blob(const char *name, umode_t mode,
74 struct dentry *parent, 74 struct dentry *parent,
75 struct debugfs_blob_wrapper *blob); 75 struct debugfs_blob_wrapper *blob);
76 76
@@ -86,7 +86,7 @@ bool debugfs_initialized(void);
86 * want to duplicate the design decision mistakes of procfs and devfs again. 86 * want to duplicate the design decision mistakes of procfs and devfs again.
87 */ 87 */
88 88
89static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, 89static inline struct dentry *debugfs_create_file(const char *name, umode_t mode,
90 struct dentry *parent, void *data, 90 struct dentry *parent, void *data,
91 const struct file_operations *fops) 91 const struct file_operations *fops)
92{ 92{
@@ -118,70 +118,70 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr
118 return ERR_PTR(-ENODEV); 118 return ERR_PTR(-ENODEV);
119} 119}
120 120
121static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, 121static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode,
122 struct dentry *parent, 122 struct dentry *parent,
123 u8 *value) 123 u8 *value)
124{ 124{
125 return ERR_PTR(-ENODEV); 125 return ERR_PTR(-ENODEV);
126} 126}
127 127
128static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode, 128static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode,
129 struct dentry *parent, 129 struct dentry *parent,
130 u16 *value) 130 u16 *value)
131{ 131{
132 return ERR_PTR(-ENODEV); 132 return ERR_PTR(-ENODEV);
133} 133}
134 134
135static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode, 135static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode,
136 struct dentry *parent, 136 struct dentry *parent,
137 u32 *value) 137 u32 *value)
138{ 138{
139 return ERR_PTR(-ENODEV); 139 return ERR_PTR(-ENODEV);
140} 140}
141 141
142static inline struct dentry *debugfs_create_u64(const char *name, mode_t mode, 142static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode,
143 struct dentry *parent, 143 struct dentry *parent,
144 u64 *value) 144 u64 *value)
145{ 145{
146 return ERR_PTR(-ENODEV); 146 return ERR_PTR(-ENODEV);
147} 147}
148 148
149static inline struct dentry *debugfs_create_x8(const char *name, mode_t mode, 149static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode,
150 struct dentry *parent, 150 struct dentry *parent,
151 u8 *value) 151 u8 *value)
152{ 152{
153 return ERR_PTR(-ENODEV); 153 return ERR_PTR(-ENODEV);
154} 154}
155 155
156static inline struct dentry *debugfs_create_x16(const char *name, mode_t mode, 156static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode,
157 struct dentry *parent, 157 struct dentry *parent,
158 u16 *value) 158 u16 *value)
159{ 159{
160 return ERR_PTR(-ENODEV); 160 return ERR_PTR(-ENODEV);
161} 161}
162 162
163static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode, 163static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode,
164 struct dentry *parent, 164 struct dentry *parent,
165 u32 *value) 165 u32 *value)
166{ 166{
167 return ERR_PTR(-ENODEV); 167 return ERR_PTR(-ENODEV);
168} 168}
169 169
170static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 170static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
171 struct dentry *parent, 171 struct dentry *parent,
172 size_t *value) 172 size_t *value)
173{ 173{
174 return ERR_PTR(-ENODEV); 174 return ERR_PTR(-ENODEV);
175} 175}
176 176
177static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, 177static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode,
178 struct dentry *parent, 178 struct dentry *parent,
179 u32 *value) 179 u32 *value)
180{ 180{
181 return ERR_PTR(-ENODEV); 181 return ERR_PTR(-ENODEV);
182} 182}
183 183
184static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode, 184static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode,
185 struct dentry *parent, 185 struct dentry *parent,
186 struct debugfs_blob_wrapper *blob) 186 struct debugfs_blob_wrapper *blob)
187{ 187{
diff --git a/include/linux/relay.h b/include/linux/relay.h
index 14a86bc7102b..a822fd71fd64 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -144,7 +144,7 @@ struct rchan_callbacks
144 */ 144 */
145 struct dentry *(*create_buf_file)(const char *filename, 145 struct dentry *(*create_buf_file)(const char *filename,
146 struct dentry *parent, 146 struct dentry *parent,
147 int mode, 147 umode_t mode,
148 struct rchan_buf *buf, 148 struct rchan_buf *buf,
149 int *is_global); 149 int *is_global);
150 150
diff --git a/kernel/relay.c b/kernel/relay.c
index 226fade4d727..4335e1d7ee2d 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -302,7 +302,7 @@ static void buf_unmapped_default_callback(struct rchan_buf *buf,
302 */ 302 */
303static struct dentry *create_buf_file_default_callback(const char *filename, 303static struct dentry *create_buf_file_default_callback(const char *filename,
304 struct dentry *parent, 304 struct dentry *parent,
305 int mode, 305 umode_t mode,
306 struct rchan_buf *buf, 306 struct rchan_buf *buf,
307 int *is_global) 307 int *is_global)
308{ 308{
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 16fc34a0806f..cdea7b56b0c9 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -402,7 +402,7 @@ static int blk_remove_buf_file_callback(struct dentry *dentry)
402 402
403static struct dentry *blk_create_buf_file_callback(const char *filename, 403static struct dentry *blk_create_buf_file_callback(const char *filename,
404 struct dentry *parent, 404 struct dentry *parent,
405 int mode, 405 umode_t mode,
406 struct rchan_buf *buf, 406 struct rchan_buf *buf,
407 int *is_global) 407 int *is_global)
408{ 408{
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f2bd275bb60f..660b069a0f99 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4385,7 +4385,7 @@ static const struct file_operations trace_options_core_fops = {
4385}; 4385};
4386 4386
4387struct dentry *trace_create_file(const char *name, 4387struct dentry *trace_create_file(const char *name,
4388 mode_t mode, 4388 umode_t mode,
4389 struct dentry *parent, 4389 struct dentry *parent,
4390 void *data, 4390 void *data,
4391 const struct file_operations *fops) 4391 const struct file_operations *fops)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 092e1f8d18dc..0154c0b850de 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -312,7 +312,7 @@ void tracing_reset_current(int cpu);
312void tracing_reset_current_online_cpus(void); 312void tracing_reset_current_online_cpus(void);
313int tracing_open_generic(struct inode *inode, struct file *filp); 313int tracing_open_generic(struct inode *inode, struct file *filp);
314struct dentry *trace_create_file(const char *name, 314struct dentry *trace_create_file(const char *name,
315 mode_t mode, 315 umode_t mode,
316 struct dentry *parent, 316 struct dentry *parent,
317 void *data, 317 void *data,
318 const struct file_operations *fops); 318 const struct file_operations *fops);
diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 4f7554025e30..b4801f51b607 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -149,7 +149,7 @@ static int debugfs_ul_get(void *data, u64 *val)
149 149
150DEFINE_SIMPLE_ATTRIBUTE(fops_ul, debugfs_ul_get, debugfs_ul_set, "%llu\n"); 150DEFINE_SIMPLE_ATTRIBUTE(fops_ul, debugfs_ul_get, debugfs_ul_set, "%llu\n");
151 151
152static struct dentry *debugfs_create_ul(const char *name, mode_t mode, 152static struct dentry *debugfs_create_ul(const char *name, umode_t mode,
153 struct dentry *parent, unsigned long *value) 153 struct dentry *parent, unsigned long *value)
154{ 154{
155 return debugfs_create_file(name, mode, parent, value, &fops_ul); 155 return debugfs_create_file(name, mode, parent, value, &fops_ul);
@@ -169,7 +169,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_stacktrace_depth, debugfs_ul_get,
169 debugfs_stacktrace_depth_set, "%llu\n"); 169 debugfs_stacktrace_depth_set, "%llu\n");
170 170
171static struct dentry *debugfs_create_stacktrace_depth( 171static struct dentry *debugfs_create_stacktrace_depth(
172 const char *name, mode_t mode, 172 const char *name, umode_t mode,
173 struct dentry *parent, unsigned long *value) 173 struct dentry *parent, unsigned long *value)
174{ 174{
175 return debugfs_create_file(name, mode, parent, value, 175 return debugfs_create_file(name, mode, parent, value,
@@ -193,7 +193,7 @@ static int debugfs_atomic_t_get(void *data, u64 *val)
193DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, 193DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get,
194 debugfs_atomic_t_set, "%lld\n"); 194 debugfs_atomic_t_set, "%lld\n");
195 195
196static struct dentry *debugfs_create_atomic_t(const char *name, mode_t mode, 196static struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode,
197 struct dentry *parent, atomic_t *value) 197 struct dentry *parent, atomic_t *value)
198{ 198{
199 return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); 199 return debugfs_create_file(name, mode, parent, value, &fops_atomic_t);
@@ -202,7 +202,7 @@ static struct dentry *debugfs_create_atomic_t(const char *name, mode_t mode,
202struct dentry *fault_create_debugfs_attr(const char *name, 202struct dentry *fault_create_debugfs_attr(const char *name,
203 struct dentry *parent, struct fault_attr *attr) 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 struct dentry *dir; 206 struct dentry *dir;
207 207
208 dir = debugfs_create_dir(name, parent); 208 dir = debugfs_create_dir(name, parent);
diff --git a/mm/failslab.c b/mm/failslab.c
index 0dd7b8fec71c..fefaabaab76d 100644
--- a/mm/failslab.c
+++ b/mm/failslab.c
@@ -35,7 +35,7 @@ __setup("failslab=", setup_failslab);
35static int __init failslab_debugfs_init(void) 35static int __init failslab_debugfs_init(void)
36{ 36{
37 struct dentry *dir; 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 dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr); 40 dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr);
41 if (IS_ERR(dir)) 41 if (IS_ERR(dir))
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2b8ba3aebf6e..99930ec7d140 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1408,7 +1408,7 @@ static int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
1408 1408
1409static int __init fail_page_alloc_debugfs(void) 1409static 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 struct dentry *dir; 1412 struct dentry *dir;
1413 1413
1414 dir = fault_create_debugfs_attr("fail_page_alloc", NULL, 1414 dir = fault_create_debugfs_attr("fail_page_alloc", NULL,