diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
commit | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch) | |
tree | b25a250ec5bec4b7b6355d214642d8b57c5cab32 /fs/debugfs | |
parent | 02550d61f49266930e674286379d3601006b2893 (diff) | |
parent | c3aa077648e147783a7a53b409578234647db853 (diff) |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
Diffstat (limited to 'fs/debugfs')
-rw-r--r-- | fs/debugfs/file.c | 22 | ||||
-rw-r--r-- | fs/debugfs/inode.c | 16 |
2 files changed, 19 insertions, 19 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index ea62afa4fd57..f65d4455c5e5 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -97,7 +97,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u8_wo, NULL, debugfs_u8_set, "%llu\n"); | |||
97 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 97 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
98 | * code. | 98 | * code. |
99 | */ | 99 | */ |
100 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 100 | struct dentry *debugfs_create_u8(const char *name, umode_t mode, |
101 | struct dentry *parent, u8 *value) | 101 | struct dentry *parent, u8 *value) |
102 | { | 102 | { |
103 | /* if there are no write bits set, make read only */ | 103 | /* if there are no write bits set, make read only */ |
@@ -149,7 +149,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%llu\n"); | |||
149 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 149 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
150 | * code. | 150 | * code. |
151 | */ | 151 | */ |
152 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 152 | struct dentry *debugfs_create_u16(const char *name, umode_t mode, |
153 | struct dentry *parent, u16 *value) | 153 | struct dentry *parent, u16 *value) |
154 | { | 154 | { |
155 | /* if there are no write bits set, make read only */ | 155 | /* if there are no write bits set, make read only */ |
@@ -201,7 +201,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u32_wo, NULL, debugfs_u32_set, "%llu\n"); | |||
201 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 201 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
202 | * code. | 202 | * code. |
203 | */ | 203 | */ |
204 | struct dentry *debugfs_create_u32(const char *name, mode_t mode, | 204 | struct dentry *debugfs_create_u32(const char *name, umode_t mode, |
205 | struct dentry *parent, u32 *value) | 205 | struct dentry *parent, u32 *value) |
206 | { | 206 | { |
207 | /* if there are no write bits set, make read only */ | 207 | /* if there are no write bits set, make read only */ |
@@ -254,7 +254,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n"); | |||
254 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 254 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
255 | * code. | 255 | * code. |
256 | */ | 256 | */ |
257 | struct dentry *debugfs_create_u64(const char *name, mode_t mode, | 257 | struct dentry *debugfs_create_u64(const char *name, umode_t mode, |
258 | struct dentry *parent, u64 *value) | 258 | struct dentry *parent, u64 *value) |
259 | { | 259 | { |
260 | /* if there are no write bits set, make read only */ | 260 | /* if there are no write bits set, make read only */ |
@@ -300,7 +300,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n | |||
300 | * @value: a pointer to the variable that the file should read to and write | 300 | * @value: a pointer to the variable that the file should read to and write |
301 | * from. | 301 | * from. |
302 | */ | 302 | */ |
303 | struct dentry *debugfs_create_x8(const char *name, mode_t mode, | 303 | struct dentry *debugfs_create_x8(const char *name, umode_t mode, |
304 | struct dentry *parent, u8 *value) | 304 | struct dentry *parent, u8 *value) |
305 | { | 305 | { |
306 | /* if there are no write bits set, make read only */ | 306 | /* if there are no write bits set, make read only */ |
@@ -324,7 +324,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x8); | |||
324 | * @value: a pointer to the variable that the file should read to and write | 324 | * @value: a pointer to the variable that the file should read to and write |
325 | * from. | 325 | * from. |
326 | */ | 326 | */ |
327 | struct dentry *debugfs_create_x16(const char *name, mode_t mode, | 327 | struct dentry *debugfs_create_x16(const char *name, umode_t mode, |
328 | struct dentry *parent, u16 *value) | 328 | struct dentry *parent, u16 *value) |
329 | { | 329 | { |
330 | /* if there are no write bits set, make read only */ | 330 | /* if there are no write bits set, make read only */ |
@@ -348,7 +348,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x16); | |||
348 | * @value: a pointer to the variable that the file should read to and write | 348 | * @value: a pointer to the variable that the file should read to and write |
349 | * from. | 349 | * from. |
350 | */ | 350 | */ |
351 | struct dentry *debugfs_create_x32(const char *name, mode_t mode, | 351 | struct dentry *debugfs_create_x32(const char *name, umode_t mode, |
352 | struct dentry *parent, u32 *value) | 352 | struct dentry *parent, u32 *value) |
353 | { | 353 | { |
354 | /* if there are no write bits set, make read only */ | 354 | /* if there are no write bits set, make read only */ |
@@ -372,7 +372,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x32); | |||
372 | * @value: a pointer to the variable that the file should read to and write | 372 | * @value: a pointer to the variable that the file should read to and write |
373 | * from. | 373 | * from. |
374 | */ | 374 | */ |
375 | struct dentry *debugfs_create_x64(const char *name, mode_t mode, | 375 | struct dentry *debugfs_create_x64(const char *name, umode_t mode, |
376 | struct dentry *parent, u64 *value) | 376 | struct dentry *parent, u64 *value) |
377 | { | 377 | { |
378 | return debugfs_create_file(name, mode, parent, value, &fops_x64); | 378 | return debugfs_create_file(name, mode, parent, value, &fops_x64); |
@@ -403,7 +403,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_size_t, debugfs_size_t_get, debugfs_size_t_set, | |||
403 | * @value: a pointer to the variable that the file should read to and write | 403 | * @value: a pointer to the variable that the file should read to and write |
404 | * from. | 404 | * from. |
405 | */ | 405 | */ |
406 | struct dentry *debugfs_create_size_t(const char *name, mode_t mode, | 406 | struct dentry *debugfs_create_size_t(const char *name, umode_t mode, |
407 | struct dentry *parent, size_t *value) | 407 | struct dentry *parent, size_t *value) |
408 | { | 408 | { |
409 | return debugfs_create_file(name, mode, parent, value, &fops_size_t); | 409 | return debugfs_create_file(name, mode, parent, value, &fops_size_t); |
@@ -475,7 +475,7 @@ static const struct file_operations fops_bool = { | |||
475 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 475 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
476 | * code. | 476 | * code. |
477 | */ | 477 | */ |
478 | struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 478 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, |
479 | struct dentry *parent, u32 *value) | 479 | struct dentry *parent, u32 *value) |
480 | { | 480 | { |
481 | return debugfs_create_file(name, mode, parent, value, &fops_bool); | 481 | return debugfs_create_file(name, mode, parent, value, &fops_bool); |
@@ -520,7 +520,7 @@ static const struct file_operations fops_blob = { | |||
520 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling | 520 | * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling |
521 | * code. | 521 | * code. |
522 | */ | 522 | */ |
523 | struct dentry *debugfs_create_blob(const char *name, mode_t mode, | 523 | struct dentry *debugfs_create_blob(const char *name, umode_t mode, |
524 | struct dentry *parent, | 524 | struct dentry *parent, |
525 | struct debugfs_blob_wrapper *blob) | 525 | struct debugfs_blob_wrapper *blob) |
526 | { | 526 | { |
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index f3a257d7a985..956d5ddddf6e 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -30,7 +30,7 @@ static struct vfsmount *debugfs_mount; | |||
30 | static int debugfs_mount_count; | 30 | static int debugfs_mount_count; |
31 | static bool debugfs_registered; | 31 | static bool debugfs_registered; |
32 | 32 | ||
33 | static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev, | 33 | static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev_t dev, |
34 | 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 */ |
71 | static int debugfs_mknod(struct inode *dir, struct dentry *dentry, | 71 | static int debugfs_mknod(struct inode *dir, struct dentry *dentry, |
72 | int mode, dev_t dev, void *data, | 72 | umode_t mode, dev_t dev, void *data, |
73 | 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 | ||
90 | static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode, | 90 | static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode, |
91 | 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 | ||
104 | static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode, | 104 | static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode, |
105 | 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 | ||
111 | static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode, | 111 | static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
112 | 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 | ||
149 | static int debugfs_create_by_name(const char *name, mode_t mode, | 149 | static int debugfs_create_by_name(const char *name, umode_t mode, |
150 | struct dentry *parent, | 150 | struct dentry *parent, |
151 | struct dentry **dentry, | 151 | struct dentry **dentry, |
152 | void *data, | 152 | void *data, |
@@ -160,7 +160,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode, | |||
160 | * have around. | 160 | * have around. |
161 | */ | 161 | */ |
162 | if (!parent) | 162 | if (!parent) |
163 | parent = debugfs_mount->mnt_sb->s_root; | 163 | parent = debugfs_mount->mnt_root; |
164 | 164 | ||
165 | *dentry = NULL; | 165 | *dentry = NULL; |
166 | mutex_lock(&parent->d_inode->i_mutex); | 166 | mutex_lock(&parent->d_inode->i_mutex); |
@@ -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 | */ |
217 | struct dentry *debugfs_create_file(const char *name, mode_t mode, | 217 | struct dentry *debugfs_create_file(const char *name, umode_t mode, |
218 | 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 | { |