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 /include | |
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 'include')
34 files changed, 150 insertions, 259 deletions
diff --git a/include/asm-generic/types.h b/include/asm-generic/types.h index 7a0f69e6c618..bd39806013b5 100644 --- a/include/asm-generic/types.h +++ b/include/asm-generic/types.h | |||
@@ -6,10 +6,4 @@ | |||
6 | */ | 6 | */ |
7 | #include <asm-generic/int-ll64.h> | 7 | #include <asm-generic/int-ll64.h> |
8 | 8 | ||
9 | #ifndef __ASSEMBLY__ | ||
10 | |||
11 | typedef unsigned short umode_t; | ||
12 | |||
13 | #endif /* __ASSEMBLY__ */ | ||
14 | |||
15 | #endif /* _ASM_GENERIC_TYPES_H */ | 9 | #endif /* _ASM_GENERIC_TYPES_H */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 2f81c6f3b630..426ab9f4dd85 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -468,13 +468,13 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | |||
468 | #define audit_get_sessionid(t) ((t)->sessionid) | 468 | #define audit_get_sessionid(t) ((t)->sessionid) |
469 | extern void audit_log_task_context(struct audit_buffer *ab); | 469 | extern void audit_log_task_context(struct audit_buffer *ab); |
470 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 470 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
471 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 471 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); |
472 | extern int audit_bprm(struct linux_binprm *bprm); | 472 | extern int audit_bprm(struct linux_binprm *bprm); |
473 | extern void audit_socketcall(int nargs, unsigned long *args); | 473 | extern void audit_socketcall(int nargs, unsigned long *args); |
474 | extern int audit_sockaddr(int len, void *addr); | 474 | extern int audit_sockaddr(int len, void *addr); |
475 | extern void __audit_fd_pair(int fd1, int fd2); | 475 | extern void __audit_fd_pair(int fd1, int fd2); |
476 | extern int audit_set_macxattr(const char *name); | 476 | extern int audit_set_macxattr(const char *name); |
477 | extern void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr); | 477 | extern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr); |
478 | extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout); | 478 | extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout); |
479 | extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification); | 479 | extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification); |
480 | extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | 480 | extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); |
@@ -494,12 +494,12 @@ static inline void audit_fd_pair(int fd1, int fd2) | |||
494 | if (unlikely(!audit_dummy_context())) | 494 | if (unlikely(!audit_dummy_context())) |
495 | __audit_fd_pair(fd1, fd2); | 495 | __audit_fd_pair(fd1, fd2); |
496 | } | 496 | } |
497 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 497 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) |
498 | { | 498 | { |
499 | if (unlikely(!audit_dummy_context())) | 499 | if (unlikely(!audit_dummy_context())) |
500 | __audit_ipc_set_perm(qbytes, uid, gid, mode); | 500 | __audit_ipc_set_perm(qbytes, uid, gid, mode); |
501 | } | 501 | } |
502 | static inline void audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr) | 502 | static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) |
503 | { | 503 | { |
504 | if (unlikely(!audit_dummy_context())) | 504 | if (unlikely(!audit_dummy_context())) |
505 | __audit_mq_open(oflag, mode, attr); | 505 | __audit_mq_open(oflag, mode, attr); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1b7f9d525013..a17becc36ca1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -319,7 +319,7 @@ struct cftype { | |||
319 | * If not 0, file mode is set to this value, otherwise it will | 319 | * If not 0, file mode is set to this value, otherwise it will |
320 | * be figured out automatically | 320 | * be figured out automatically |
321 | */ | 321 | */ |
322 | mode_t mode; | 322 | umode_t mode; |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * If non-zero, defines the maximum length of string that can | 325 | * If non-zero, defines the maximum length of string that can |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 66ed067fb729..41c9f6515f46 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -422,9 +422,9 @@ asmlinkage long compat_sys_getdents64(unsigned int fd, | |||
422 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, | 422 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, |
423 | unsigned int nr_segs, unsigned int flags); | 423 | unsigned int nr_segs, unsigned int flags); |
424 | asmlinkage long compat_sys_open(const char __user *filename, int flags, | 424 | asmlinkage long compat_sys_open(const char __user *filename, int flags, |
425 | int mode); | 425 | umode_t mode); |
426 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | 426 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, |
427 | int flags, int mode); | 427 | int flags, umode_t mode); |
428 | asmlinkage long compat_sys_open_by_handle_at(int mountdirfd, | 428 | asmlinkage long compat_sys_open_by_handle_at(int mountdirfd, |
429 | struct file_handle __user *handle, | 429 | struct file_handle __user *handle, |
430 | int flags); | 430 | int flags); |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 3081c58d696e..34025df61829 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -124,7 +124,7 @@ extern struct config_item *config_group_find_item(struct config_group *, | |||
124 | struct configfs_attribute { | 124 | struct configfs_attribute { |
125 | const char *ca_name; | 125 | const char *ca_name; |
126 | struct module *ca_owner; | 126 | struct module *ca_owner; |
127 | mode_t ca_mode; | 127 | umode_t ca_mode; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | /* | 130 | /* |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index e8c3abc60811..6169c26fd8c8 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -46,7 +46,7 @@ extern struct dentry *arch_debugfs_dir; | |||
46 | extern const struct file_operations debugfs_file_operations; | 46 | extern const struct file_operations debugfs_file_operations; |
47 | extern const struct inode_operations debugfs_link_operations; | 47 | extern const struct inode_operations debugfs_link_operations; |
48 | 48 | ||
49 | struct dentry *debugfs_create_file(const char *name, mode_t mode, | 49 | struct dentry *debugfs_create_file(const char *name, umode_t mode, |
50 | struct dentry *parent, void *data, | 50 | struct dentry *parent, void *data, |
51 | const struct file_operations *fops); | 51 | const struct file_operations *fops); |
52 | 52 | ||
@@ -61,28 +61,28 @@ void debugfs_remove_recursive(struct dentry *dentry); | |||
61 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | 61 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, |
62 | struct dentry *new_dir, const char *new_name); | 62 | struct dentry *new_dir, const char *new_name); |
63 | 63 | ||
64 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 64 | struct dentry *debugfs_create_u8(const char *name, umode_t mode, |
65 | struct dentry *parent, u8 *value); | 65 | struct dentry *parent, u8 *value); |
66 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 66 | struct dentry *debugfs_create_u16(const char *name, umode_t mode, |
67 | struct dentry *parent, u16 *value); | 67 | struct dentry *parent, u16 *value); |
68 | struct dentry *debugfs_create_u32(const char *name, mode_t mode, | 68 | struct dentry *debugfs_create_u32(const char *name, umode_t mode, |
69 | struct dentry *parent, u32 *value); | 69 | struct dentry *parent, u32 *value); |
70 | struct dentry *debugfs_create_u64(const char *name, mode_t mode, | 70 | struct dentry *debugfs_create_u64(const char *name, umode_t mode, |
71 | struct dentry *parent, u64 *value); | 71 | struct dentry *parent, u64 *value); |
72 | struct dentry *debugfs_create_x8(const char *name, mode_t mode, | 72 | struct dentry *debugfs_create_x8(const char *name, umode_t mode, |
73 | struct dentry *parent, u8 *value); | 73 | struct dentry *parent, u8 *value); |
74 | struct dentry *debugfs_create_x16(const char *name, mode_t mode, | 74 | struct dentry *debugfs_create_x16(const char *name, umode_t mode, |
75 | struct dentry *parent, u16 *value); | 75 | struct dentry *parent, u16 *value); |
76 | struct dentry *debugfs_create_x32(const char *name, mode_t mode, | 76 | struct dentry *debugfs_create_x32(const char *name, umode_t mode, |
77 | struct dentry *parent, u32 *value); | 77 | struct dentry *parent, u32 *value); |
78 | struct dentry *debugfs_create_x64(const char *name, mode_t mode, | 78 | struct dentry *debugfs_create_x64(const char *name, umode_t mode, |
79 | struct dentry *parent, u64 *value); | 79 | struct dentry *parent, u64 *value); |
80 | struct dentry *debugfs_create_size_t(const char *name, mode_t mode, | 80 | struct dentry *debugfs_create_size_t(const char *name, umode_t mode, |
81 | struct dentry *parent, size_t *value); | 81 | struct dentry *parent, size_t *value); |
82 | struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 82 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, |
83 | struct dentry *parent, u32 *value); | 83 | struct dentry *parent, u32 *value); |
84 | 84 | ||
85 | struct dentry *debugfs_create_blob(const char *name, mode_t mode, | 85 | struct dentry *debugfs_create_blob(const char *name, umode_t mode, |
86 | struct dentry *parent, | 86 | struct dentry *parent, |
87 | struct debugfs_blob_wrapper *blob); | 87 | struct debugfs_blob_wrapper *blob); |
88 | 88 | ||
@@ -105,7 +105,7 @@ bool debugfs_initialized(void); | |||
105 | * want to duplicate the design decision mistakes of procfs and devfs again. | 105 | * want to duplicate the design decision mistakes of procfs and devfs again. |
106 | */ | 106 | */ |
107 | 107 | ||
108 | static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, | 108 | static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, |
109 | struct dentry *parent, void *data, | 109 | struct dentry *parent, void *data, |
110 | const struct file_operations *fops) | 110 | const struct file_operations *fops) |
111 | { | 111 | { |
@@ -137,70 +137,70 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr | |||
137 | return ERR_PTR(-ENODEV); | 137 | return ERR_PTR(-ENODEV); |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 140 | static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, |
141 | struct dentry *parent, | 141 | struct dentry *parent, |
142 | u8 *value) | 142 | u8 *value) |
143 | { | 143 | { |
144 | return ERR_PTR(-ENODEV); | 144 | return ERR_PTR(-ENODEV); |
145 | } | 145 | } |
146 | 146 | ||
147 | static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 147 | static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, |
148 | struct dentry *parent, | 148 | struct dentry *parent, |
149 | u16 *value) | 149 | u16 *value) |
150 | { | 150 | { |
151 | return ERR_PTR(-ENODEV); | 151 | return ERR_PTR(-ENODEV); |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode, | 154 | static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, |
155 | struct dentry *parent, | 155 | struct dentry *parent, |
156 | u32 *value) | 156 | u32 *value) |
157 | { | 157 | { |
158 | return ERR_PTR(-ENODEV); | 158 | return ERR_PTR(-ENODEV); |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline struct dentry *debugfs_create_u64(const char *name, mode_t mode, | 161 | static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, |
162 | struct dentry *parent, | 162 | struct dentry *parent, |
163 | u64 *value) | 163 | u64 *value) |
164 | { | 164 | { |
165 | return ERR_PTR(-ENODEV); | 165 | return ERR_PTR(-ENODEV); |
166 | } | 166 | } |
167 | 167 | ||
168 | static inline struct dentry *debugfs_create_x8(const char *name, mode_t mode, | 168 | static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, |
169 | struct dentry *parent, | 169 | struct dentry *parent, |
170 | u8 *value) | 170 | u8 *value) |
171 | { | 171 | { |
172 | return ERR_PTR(-ENODEV); | 172 | return ERR_PTR(-ENODEV); |
173 | } | 173 | } |
174 | 174 | ||
175 | static inline struct dentry *debugfs_create_x16(const char *name, mode_t mode, | 175 | static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, |
176 | struct dentry *parent, | 176 | struct dentry *parent, |
177 | u16 *value) | 177 | u16 *value) |
178 | { | 178 | { |
179 | return ERR_PTR(-ENODEV); | 179 | return ERR_PTR(-ENODEV); |
180 | } | 180 | } |
181 | 181 | ||
182 | static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode, | 182 | static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, |
183 | struct dentry *parent, | 183 | struct dentry *parent, |
184 | u32 *value) | 184 | u32 *value) |
185 | { | 185 | { |
186 | return ERR_PTR(-ENODEV); | 186 | return ERR_PTR(-ENODEV); |
187 | } | 187 | } |
188 | 188 | ||
189 | static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode, | 189 | static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, |
190 | struct dentry *parent, | 190 | struct dentry *parent, |
191 | size_t *value) | 191 | size_t *value) |
192 | { | 192 | { |
193 | return ERR_PTR(-ENODEV); | 193 | return ERR_PTR(-ENODEV); |
194 | } | 194 | } |
195 | 195 | ||
196 | static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 196 | static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, |
197 | struct dentry *parent, | 197 | struct dentry *parent, |
198 | u32 *value) | 198 | u32 *value) |
199 | { | 199 | { |
200 | return ERR_PTR(-ENODEV); | 200 | return ERR_PTR(-ENODEV); |
201 | } | 201 | } |
202 | 202 | ||
203 | static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode, | 203 | static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, |
204 | struct dentry *parent, | 204 | struct dentry *parent, |
205 | struct debugfs_blob_wrapper *blob) | 205 | struct debugfs_blob_wrapper *blob) |
206 | { | 206 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index 96acef8dd916..5b3adb8f9588 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -343,7 +343,7 @@ struct class { | |||
343 | struct kobject *dev_kobj; | 343 | struct kobject *dev_kobj; |
344 | 344 | ||
345 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 345 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
346 | char *(*devnode)(struct device *dev, mode_t *mode); | 346 | char *(*devnode)(struct device *dev, umode_t *mode); |
347 | 347 | ||
348 | void (*class_release)(struct class *class); | 348 | void (*class_release)(struct class *class); |
349 | void (*dev_release)(struct device *dev); | 349 | void (*dev_release)(struct device *dev); |
@@ -472,7 +472,7 @@ struct device_type { | |||
472 | const char *name; | 472 | const char *name; |
473 | const struct attribute_group **groups; | 473 | const struct attribute_group **groups; |
474 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 474 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
475 | char *(*devnode)(struct device *dev, mode_t *mode); | 475 | char *(*devnode)(struct device *dev, umode_t *mode); |
476 | void (*release)(struct device *dev); | 476 | void (*release)(struct device *dev); |
477 | 477 | ||
478 | const struct dev_pm_ops *pm; | 478 | const struct dev_pm_ops *pm; |
@@ -793,7 +793,7 @@ extern int device_rename(struct device *dev, const char *new_name); | |||
793 | extern int device_move(struct device *dev, struct device *new_parent, | 793 | extern int device_move(struct device *dev, struct device *new_parent, |
794 | enum dpm_order dpm_order); | 794 | enum dpm_order dpm_order); |
795 | extern const char *device_get_devnode(struct device *dev, | 795 | extern const char *device_get_devnode(struct device *dev, |
796 | mode_t *mode, const char **tmp); | 796 | umode_t *mode, const char **tmp); |
797 | extern void *dev_get_drvdata(const struct device *dev); | 797 | extern void *dev_get_drvdata(const struct device *dev); |
798 | extern int dev_set_drvdata(struct device *dev, void *data); | 798 | extern int dev_set_drvdata(struct device *dev, void *data); |
799 | 799 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index dec99116a0e4..f957085d40ed 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -884,7 +884,7 @@ extern int ext3fs_dirhash(const char *name, int len, struct | |||
884 | 884 | ||
885 | /* ialloc.c */ | 885 | /* ialloc.c */ |
886 | extern struct inode * ext3_new_inode (handle_t *, struct inode *, | 886 | extern struct inode * ext3_new_inode (handle_t *, struct inode *, |
887 | const struct qstr *, int); | 887 | const struct qstr *, umode_t); |
888 | extern void ext3_free_inode (handle_t *, struct inode *); | 888 | extern void ext3_free_inode (handle_t *, struct inode *); |
889 | extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); | 889 | extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); |
890 | extern unsigned long ext3_count_free_inodes (struct super_block *); | 890 | extern unsigned long ext3_count_free_inodes (struct super_block *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index e0bc4ffb8e7f..7aacf31418fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1428,6 +1428,7 @@ struct super_block { | |||
1428 | #else | 1428 | #else |
1429 | struct list_head s_files; | 1429 | struct list_head s_files; |
1430 | #endif | 1430 | #endif |
1431 | struct list_head s_mounts; /* list of mounts; _not_ for fs use */ | ||
1431 | /* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */ | 1432 | /* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */ |
1432 | struct list_head s_dentry_lru; /* unused dentry lru */ | 1433 | struct list_head s_dentry_lru; /* unused dentry lru */ |
1433 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1434 | int s_nr_dentry_unused; /* # of dentry on lru */ |
@@ -1440,7 +1441,7 @@ struct super_block { | |||
1440 | struct block_device *s_bdev; | 1441 | struct block_device *s_bdev; |
1441 | struct backing_dev_info *s_bdi; | 1442 | struct backing_dev_info *s_bdi; |
1442 | struct mtd_info *s_mtd; | 1443 | struct mtd_info *s_mtd; |
1443 | struct list_head s_instances; | 1444 | struct hlist_node s_instances; |
1444 | struct quota_info s_dquot; /* Diskquota specific options */ | 1445 | struct quota_info s_dquot; /* Diskquota specific options */ |
1445 | 1446 | ||
1446 | int s_frozen; | 1447 | int s_frozen; |
@@ -1481,6 +1482,12 @@ struct super_block { | |||
1481 | int cleancache_poolid; | 1482 | int cleancache_poolid; |
1482 | 1483 | ||
1483 | struct shrinker s_shrink; /* per-sb shrinker handle */ | 1484 | struct shrinker s_shrink; /* per-sb shrinker handle */ |
1485 | |||
1486 | /* Number of inodes with nlink == 0 but still referenced */ | ||
1487 | atomic_long_t s_remove_count; | ||
1488 | |||
1489 | /* Being remounted read-only */ | ||
1490 | int s_readonly_remount; | ||
1484 | }; | 1491 | }; |
1485 | 1492 | ||
1486 | /* superblock cache pruning functions */ | 1493 | /* superblock cache pruning functions */ |
@@ -1516,9 +1523,9 @@ extern void unlock_super(struct super_block *); | |||
1516 | /* | 1523 | /* |
1517 | * VFS helper functions.. | 1524 | * VFS helper functions.. |
1518 | */ | 1525 | */ |
1519 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | 1526 | extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); |
1520 | extern int vfs_mkdir(struct inode *, struct dentry *, int); | 1527 | extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); |
1521 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); | 1528 | extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); |
1522 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); | 1529 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); |
1523 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); | 1530 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); |
1524 | extern int vfs_rmdir(struct inode *, struct dentry *); | 1531 | extern int vfs_rmdir(struct inode *, struct dentry *); |
@@ -1534,7 +1541,7 @@ extern void dentry_unhash(struct dentry *dentry); | |||
1534 | * VFS file helper functions. | 1541 | * VFS file helper functions. |
1535 | */ | 1542 | */ |
1536 | extern void inode_init_owner(struct inode *inode, const struct inode *dir, | 1543 | extern void inode_init_owner(struct inode *inode, const struct inode *dir, |
1537 | mode_t mode); | 1544 | umode_t mode); |
1538 | /* | 1545 | /* |
1539 | * VFS FS_IOC_FIEMAP helper definitions. | 1546 | * VFS FS_IOC_FIEMAP helper definitions. |
1540 | */ | 1547 | */ |
@@ -1619,13 +1626,13 @@ struct inode_operations { | |||
1619 | int (*readlink) (struct dentry *, char __user *,int); | 1626 | int (*readlink) (struct dentry *, char __user *,int); |
1620 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1627 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1621 | 1628 | ||
1622 | int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | 1629 | int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); |
1623 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 1630 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
1624 | int (*unlink) (struct inode *,struct dentry *); | 1631 | int (*unlink) (struct inode *,struct dentry *); |
1625 | int (*symlink) (struct inode *,struct dentry *,const char *); | 1632 | int (*symlink) (struct inode *,struct dentry *,const char *); |
1626 | int (*mkdir) (struct inode *,struct dentry *,int); | 1633 | int (*mkdir) (struct inode *,struct dentry *,umode_t); |
1627 | int (*rmdir) (struct inode *,struct dentry *); | 1634 | int (*rmdir) (struct inode *,struct dentry *); |
1628 | int (*mknod) (struct inode *,struct dentry *,int,dev_t); | 1635 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); |
1629 | int (*rename) (struct inode *, struct dentry *, | 1636 | int (*rename) (struct inode *, struct dentry *, |
1630 | struct inode *, struct dentry *); | 1637 | struct inode *, struct dentry *); |
1631 | void (*truncate) (struct inode *); | 1638 | void (*truncate) (struct inode *); |
@@ -1672,10 +1679,10 @@ struct super_operations { | |||
1672 | int (*remount_fs) (struct super_block *, int *, char *); | 1679 | int (*remount_fs) (struct super_block *, int *, char *); |
1673 | void (*umount_begin) (struct super_block *); | 1680 | void (*umount_begin) (struct super_block *); |
1674 | 1681 | ||
1675 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1682 | int (*show_options)(struct seq_file *, struct dentry *); |
1676 | int (*show_devname)(struct seq_file *, struct vfsmount *); | 1683 | int (*show_devname)(struct seq_file *, struct dentry *); |
1677 | int (*show_path)(struct seq_file *, struct vfsmount *); | 1684 | int (*show_path)(struct seq_file *, struct dentry *); |
1678 | int (*show_stats)(struct seq_file *, struct vfsmount *); | 1685 | int (*show_stats)(struct seq_file *, struct dentry *); |
1679 | #ifdef CONFIG_QUOTA | 1686 | #ifdef CONFIG_QUOTA |
1680 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 1687 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
1681 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1688 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
@@ -1764,31 +1771,10 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1764 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1771 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1765 | } | 1772 | } |
1766 | 1773 | ||
1767 | /** | 1774 | extern void inc_nlink(struct inode *inode); |
1768 | * set_nlink - directly set an inode's link count | 1775 | extern void drop_nlink(struct inode *inode); |
1769 | * @inode: inode | 1776 | extern void clear_nlink(struct inode *inode); |
1770 | * @nlink: new nlink (should be non-zero) | 1777 | extern void set_nlink(struct inode *inode, unsigned int nlink); |
1771 | * | ||
1772 | * This is a low-level filesystem helper to replace any | ||
1773 | * direct filesystem manipulation of i_nlink. | ||
1774 | */ | ||
1775 | static inline void set_nlink(struct inode *inode, unsigned int nlink) | ||
1776 | { | ||
1777 | inode->__i_nlink = nlink; | ||
1778 | } | ||
1779 | |||
1780 | /** | ||
1781 | * inc_nlink - directly increment an inode's link count | ||
1782 | * @inode: inode | ||
1783 | * | ||
1784 | * This is a low-level filesystem helper to replace any | ||
1785 | * direct filesystem manipulation of i_nlink. Currently, | ||
1786 | * it is only here for parity with dec_nlink(). | ||
1787 | */ | ||
1788 | static inline void inc_nlink(struct inode *inode) | ||
1789 | { | ||
1790 | inode->__i_nlink++; | ||
1791 | } | ||
1792 | 1778 | ||
1793 | static inline void inode_inc_link_count(struct inode *inode) | 1779 | static inline void inode_inc_link_count(struct inode *inode) |
1794 | { | 1780 | { |
@@ -1796,35 +1782,6 @@ static inline void inode_inc_link_count(struct inode *inode) | |||
1796 | mark_inode_dirty(inode); | 1782 | mark_inode_dirty(inode); |
1797 | } | 1783 | } |
1798 | 1784 | ||
1799 | /** | ||
1800 | * drop_nlink - directly drop an inode's link count | ||
1801 | * @inode: inode | ||
1802 | * | ||
1803 | * This is a low-level filesystem helper to replace any | ||
1804 | * direct filesystem manipulation of i_nlink. In cases | ||
1805 | * where we are attempting to track writes to the | ||
1806 | * filesystem, a decrement to zero means an imminent | ||
1807 | * write when the file is truncated and actually unlinked | ||
1808 | * on the filesystem. | ||
1809 | */ | ||
1810 | static inline void drop_nlink(struct inode *inode) | ||
1811 | { | ||
1812 | inode->__i_nlink--; | ||
1813 | } | ||
1814 | |||
1815 | /** | ||
1816 | * clear_nlink - directly zero an inode's link count | ||
1817 | * @inode: inode | ||
1818 | * | ||
1819 | * This is a low-level filesystem helper to replace any | ||
1820 | * direct filesystem manipulation of i_nlink. See | ||
1821 | * drop_nlink() for why we care about i_nlink hitting zero. | ||
1822 | */ | ||
1823 | static inline void clear_nlink(struct inode *inode) | ||
1824 | { | ||
1825 | inode->__i_nlink = 0; | ||
1826 | } | ||
1827 | |||
1828 | static inline void inode_dec_link_count(struct inode *inode) | 1785 | static inline void inode_dec_link_count(struct inode *inode) |
1829 | { | 1786 | { |
1830 | drop_nlink(inode); | 1787 | drop_nlink(inode); |
@@ -1864,7 +1821,7 @@ struct file_system_type { | |||
1864 | void (*kill_sb) (struct super_block *); | 1821 | void (*kill_sb) (struct super_block *); |
1865 | struct module *owner; | 1822 | struct module *owner; |
1866 | struct file_system_type * next; | 1823 | struct file_system_type * next; |
1867 | struct list_head fs_supers; | 1824 | struct hlist_head fs_supers; |
1868 | 1825 | ||
1869 | struct lock_class_key s_lock_key; | 1826 | struct lock_class_key s_lock_key; |
1870 | struct lock_class_key s_umount_key; | 1827 | struct lock_class_key s_umount_key; |
@@ -1939,7 +1896,7 @@ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | |||
1939 | extern int vfs_statfs(struct path *, struct kstatfs *); | 1896 | extern int vfs_statfs(struct path *, struct kstatfs *); |
1940 | extern int user_statfs(const char __user *, struct kstatfs *); | 1897 | extern int user_statfs(const char __user *, struct kstatfs *); |
1941 | extern int fd_statfs(int, struct kstatfs *); | 1898 | extern int fd_statfs(int, struct kstatfs *); |
1942 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); | 1899 | extern int vfs_ustat(dev_t, struct kstatfs *); |
1943 | extern int freeze_super(struct super_block *super); | 1900 | extern int freeze_super(struct super_block *super); |
1944 | extern int thaw_super(struct super_block *super); | 1901 | extern int thaw_super(struct super_block *super); |
1945 | extern bool our_mnt(struct vfsmount *mnt); | 1902 | extern bool our_mnt(struct vfsmount *mnt); |
@@ -2054,8 +2011,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | |||
2054 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | 2011 | extern int do_fallocate(struct file *file, int mode, loff_t offset, |
2055 | loff_t len); | 2012 | loff_t len); |
2056 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 2013 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
2057 | int mode); | 2014 | umode_t mode); |
2058 | extern struct file *filp_open(const char *, int, int); | 2015 | extern struct file *filp_open(const char *, int, umode_t); |
2059 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | 2016 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, |
2060 | const char *, int); | 2017 | const char *, int); |
2061 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2018 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, |
@@ -2092,6 +2049,7 @@ extern void bd_forget(struct inode *inode); | |||
2092 | extern void bdput(struct block_device *); | 2049 | extern void bdput(struct block_device *); |
2093 | extern void invalidate_bdev(struct block_device *); | 2050 | extern void invalidate_bdev(struct block_device *); |
2094 | extern int sync_blockdev(struct block_device *bdev); | 2051 | extern int sync_blockdev(struct block_device *bdev); |
2052 | extern void kill_bdev(struct block_device *); | ||
2095 | extern struct super_block *freeze_bdev(struct block_device *); | 2053 | extern struct super_block *freeze_bdev(struct block_device *); |
2096 | extern void emergency_thaw_all(void); | 2054 | extern void emergency_thaw_all(void); |
2097 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); | 2055 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); |
@@ -2099,6 +2057,7 @@ extern int fsync_bdev(struct block_device *); | |||
2099 | #else | 2057 | #else |
2100 | static inline void bd_forget(struct inode *inode) {} | 2058 | static inline void bd_forget(struct inode *inode) {} |
2101 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | 2059 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } |
2060 | static inline void kill_bdev(struct block_device *bdev) {} | ||
2102 | static inline void invalidate_bdev(struct block_device *bdev) {} | 2061 | static inline void invalidate_bdev(struct block_device *bdev) {} |
2103 | 2062 | ||
2104 | static inline struct super_block *freeze_bdev(struct block_device *sb) | 2063 | static inline struct super_block *freeze_bdev(struct block_device *sb) |
@@ -2191,8 +2150,6 @@ extern const struct file_operations read_pipefifo_fops; | |||
2191 | extern const struct file_operations write_pipefifo_fops; | 2150 | extern const struct file_operations write_pipefifo_fops; |
2192 | extern const struct file_operations rdwr_pipefifo_fops; | 2151 | extern const struct file_operations rdwr_pipefifo_fops; |
2193 | 2152 | ||
2194 | extern int fs_may_remount_ro(struct super_block *); | ||
2195 | |||
2196 | #ifdef CONFIG_BLOCK | 2153 | #ifdef CONFIG_BLOCK |
2197 | /* | 2154 | /* |
2198 | * return READ, READA, or WRITE | 2155 | * return READ, READA, or WRITE |
@@ -2415,6 +2372,7 @@ extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
2415 | unsigned long nr_segs, loff_t pos); | 2372 | unsigned long nr_segs, loff_t pos); |
2416 | extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end, | 2373 | extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end, |
2417 | int datasync); | 2374 | int datasync); |
2375 | extern void block_sync_page(struct page *page); | ||
2418 | 2376 | ||
2419 | /* fs/splice.c */ | 2377 | /* fs/splice.c */ |
2420 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2378 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
@@ -2531,7 +2489,6 @@ extern void put_filesystem(struct file_system_type *fs); | |||
2531 | extern struct file_system_type *get_fs_type(const char *name); | 2489 | extern struct file_system_type *get_fs_type(const char *name); |
2532 | extern struct super_block *get_super(struct block_device *); | 2490 | extern struct super_block *get_super(struct block_device *); |
2533 | extern struct super_block *get_active_super(struct block_device *bdev); | 2491 | extern struct super_block *get_active_super(struct block_device *bdev); |
2534 | extern struct super_block *user_get_super(dev_t); | ||
2535 | extern void drop_super(struct super_block *sb); | 2492 | extern void drop_super(struct super_block *sb); |
2536 | extern void iterate_supers(void (*)(struct super_block *, void *), void *); | 2493 | extern void iterate_supers(void (*)(struct super_block *, void *), void *); |
2537 | extern void iterate_supers_type(struct file_system_type *, | 2494 | extern void iterate_supers_type(struct file_system_type *, |
@@ -2590,7 +2547,7 @@ extern void setattr_copy(struct inode *inode, const struct iattr *attr); | |||
2590 | 2547 | ||
2591 | extern void file_update_time(struct file *file); | 2548 | extern void file_update_time(struct file *file); |
2592 | 2549 | ||
2593 | extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); | 2550 | extern int generic_show_options(struct seq_file *m, struct dentry *root); |
2594 | extern void save_mount_options(struct super_block *sb, char *options); | 2551 | extern void save_mount_options(struct super_block *sb, char *options); |
2595 | extern void replace_mount_options(struct super_block *sb, char *options); | 2552 | extern void replace_mount_options(struct super_block *sb, char *options); |
2596 | 2553 | ||
@@ -2691,7 +2648,7 @@ int __init get_filesystem_list(char *buf); | |||
2691 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ | 2648 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ |
2692 | (flag & __FMODE_NONOTIFY))) | 2649 | (flag & __FMODE_NONOTIFY))) |
2693 | 2650 | ||
2694 | static inline int is_sxid(mode_t mode) | 2651 | static inline int is_sxid(umode_t mode) |
2695 | { | 2652 | { |
2696 | return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); | 2653 | return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); |
2697 | } | 2654 | } |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 6d18f3531f18..fe23ee768589 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -163,7 +163,7 @@ struct gendisk { | |||
163 | * disks that can't be partitioned. */ | 163 | * disks that can't be partitioned. */ |
164 | 164 | ||
165 | char disk_name[DISK_NAME_LEN]; /* name of major driver */ | 165 | char disk_name[DISK_NAME_LEN]; /* name of major driver */ |
166 | char *(*devnode)(struct gendisk *gd, mode_t *mode); | 166 | char *(*devnode)(struct gendisk *gd, umode_t *mode); |
167 | 167 | ||
168 | unsigned int events; /* supported events */ | 168 | unsigned int events; /* supported events */ |
169 | unsigned int async_events; /* async events, subset of all */ | 169 | unsigned int async_events; /* async events, subset of all */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 42557851b12e..501370b61ee5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -920,7 +920,7 @@ __IDE_PROC_DEVSET(_name, _min, _max, NULL, NULL) | |||
920 | 920 | ||
921 | typedef struct { | 921 | typedef struct { |
922 | const char *name; | 922 | const char *name; |
923 | mode_t mode; | 923 | umode_t mode; |
924 | const struct file_operations *proc_fops; | 924 | const struct file_operations *proc_fops; |
925 | } ide_proc_entry_t; | 925 | } ide_proc_entry_t; |
926 | 926 | ||
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 3b1594d662b0..30e816148df4 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -93,7 +93,7 @@ struct kern_ipc_perm | |||
93 | gid_t gid; | 93 | gid_t gid; |
94 | uid_t cuid; | 94 | uid_t cuid; |
95 | gid_t cgid; | 95 | gid_t cgid; |
96 | mode_t mode; | 96 | umode_t mode; |
97 | unsigned long seq; | 97 | unsigned long seq; |
98 | void *security; | 98 | void *security; |
99 | }; | 99 | }; |
diff --git a/include/linux/iscsi_boot_sysfs.h b/include/linux/iscsi_boot_sysfs.h index f0a2f8b0aa13..2a8b1659bf35 100644 --- a/include/linux/iscsi_boot_sysfs.h +++ b/include/linux/iscsi_boot_sysfs.h | |||
@@ -91,7 +91,7 @@ struct iscsi_boot_kobj { | |||
91 | * The enum of the type. This can be any value of the above | 91 | * The enum of the type. This can be any value of the above |
92 | * properties. | 92 | * properties. |
93 | */ | 93 | */ |
94 | mode_t (*is_visible) (void *data, int type); | 94 | umode_t (*is_visible) (void *data, int type); |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * Driver specific release function. | 97 | * Driver specific release function. |
@@ -110,20 +110,20 @@ struct iscsi_boot_kobj * | |||
110 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, | 110 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, |
111 | void *data, | 111 | void *data, |
112 | ssize_t (*show) (void *data, int type, char *buf), | 112 | ssize_t (*show) (void *data, int type, char *buf), |
113 | mode_t (*is_visible) (void *data, int type), | 113 | umode_t (*is_visible) (void *data, int type), |
114 | void (*release) (void *data)); | 114 | void (*release) (void *data)); |
115 | 115 | ||
116 | struct iscsi_boot_kobj * | 116 | struct iscsi_boot_kobj * |
117 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, | 117 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, |
118 | void *data, | 118 | void *data, |
119 | ssize_t (*show) (void *data, int type, char *buf), | 119 | ssize_t (*show) (void *data, int type, char *buf), |
120 | mode_t (*is_visible) (void *data, int type), | 120 | umode_t (*is_visible) (void *data, int type), |
121 | void (*release) (void *data)); | 121 | void (*release) (void *data)); |
122 | struct iscsi_boot_kobj * | 122 | struct iscsi_boot_kobj * |
123 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, | 123 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, |
124 | void *data, | 124 | void *data, |
125 | ssize_t (*show) (void *data, int type, char *buf), | 125 | ssize_t (*show) (void *data, int type, char *buf), |
126 | mode_t (*is_visible) (void *data, int type), | 126 | umode_t (*is_visible) (void *data, int type), |
127 | void (*release) (void *data)); | 127 | void (*release) (void *data)); |
128 | 128 | ||
129 | struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name); | 129 | struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name); |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index c41d7270c6c6..32085249e9cb 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -54,7 +54,7 @@ struct miscdevice { | |||
54 | struct device *parent; | 54 | struct device *parent; |
55 | struct device *this_device; | 55 | struct device *this_device; |
56 | const char *nodename; | 56 | const char *nodename; |
57 | mode_t mode; | 57 | umode_t mode; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | extern int misc_register(struct miscdevice * misc); | 60 | extern int misc_register(struct miscdevice * misc); |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 29304855652d..5a8e3903d770 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -2,39 +2,16 @@ | |||
2 | #define _NAMESPACE_H_ | 2 | #define _NAMESPACE_H_ |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/path.h> | 5 | struct mnt_namespace; |
6 | #include <linux/seq_file.h> | ||
7 | #include <linux/wait.h> | ||
8 | |||
9 | struct mnt_namespace { | ||
10 | atomic_t count; | ||
11 | struct vfsmount * root; | ||
12 | struct list_head list; | ||
13 | wait_queue_head_t poll; | ||
14 | int event; | ||
15 | }; | ||
16 | |||
17 | struct proc_mounts { | ||
18 | struct seq_file m; /* must be the first element */ | ||
19 | struct mnt_namespace *ns; | ||
20 | struct path root; | ||
21 | }; | ||
22 | |||
23 | struct fs_struct; | 6 | struct fs_struct; |
24 | 7 | ||
25 | extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); | ||
26 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 8 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
27 | struct fs_struct *); | 9 | struct fs_struct *); |
28 | extern void put_mnt_ns(struct mnt_namespace *ns); | 10 | extern void put_mnt_ns(struct mnt_namespace *ns); |
29 | static inline void get_mnt_ns(struct mnt_namespace *ns) | ||
30 | { | ||
31 | atomic_inc(&ns->count); | ||
32 | } | ||
33 | 11 | ||
34 | extern const struct seq_operations mounts_op; | 12 | extern const struct file_operations proc_mounts_operations; |
35 | extern const struct seq_operations mountinfo_op; | 13 | extern const struct file_operations proc_mountinfo_operations; |
36 | extern const struct seq_operations mountstats_op; | 14 | extern const struct file_operations proc_mountstats_operations; |
37 | extern int mnt_had_events(struct proc_mounts *); | ||
38 | 15 | ||
39 | #endif | 16 | #endif |
40 | #endif | 17 | #endif |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 33fe53d78110..d7029f4a191a 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -47,45 +47,10 @@ struct mnt_namespace; | |||
47 | 47 | ||
48 | #define MNT_INTERNAL 0x4000 | 48 | #define MNT_INTERNAL 0x4000 |
49 | 49 | ||
50 | struct mnt_pcp { | ||
51 | int mnt_count; | ||
52 | int mnt_writers; | ||
53 | }; | ||
54 | |||
55 | struct vfsmount { | 50 | struct vfsmount { |
56 | struct list_head mnt_hash; | ||
57 | struct vfsmount *mnt_parent; /* fs we are mounted on */ | ||
58 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ | ||
59 | struct dentry *mnt_root; /* root of the mounted tree */ | 51 | struct dentry *mnt_root; /* root of the mounted tree */ |
60 | struct super_block *mnt_sb; /* pointer to superblock */ | 52 | struct super_block *mnt_sb; /* pointer to superblock */ |
61 | #ifdef CONFIG_SMP | ||
62 | struct mnt_pcp __percpu *mnt_pcp; | ||
63 | atomic_t mnt_longterm; /* how many of the refs are longterm */ | ||
64 | #else | ||
65 | int mnt_count; | ||
66 | int mnt_writers; | ||
67 | #endif | ||
68 | struct list_head mnt_mounts; /* list of children, anchored here */ | ||
69 | struct list_head mnt_child; /* and going through their mnt_child */ | ||
70 | int mnt_flags; | 53 | int mnt_flags; |
71 | /* 4 bytes hole on 64bits arches without fsnotify */ | ||
72 | #ifdef CONFIG_FSNOTIFY | ||
73 | __u32 mnt_fsnotify_mask; | ||
74 | struct hlist_head mnt_fsnotify_marks; | ||
75 | #endif | ||
76 | const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | ||
77 | struct list_head mnt_list; | ||
78 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | ||
79 | struct list_head mnt_share; /* circular list of shared mounts */ | ||
80 | struct list_head mnt_slave_list;/* list of slave mounts */ | ||
81 | struct list_head mnt_slave; /* slave list entry */ | ||
82 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | ||
83 | struct mnt_namespace *mnt_ns; /* containing namespace */ | ||
84 | int mnt_id; /* mount identifier */ | ||
85 | int mnt_group_id; /* peer group identifier */ | ||
86 | int mnt_expiry_mark; /* true if marked for expiry */ | ||
87 | int mnt_pinned; | ||
88 | int mnt_ghosts; | ||
89 | }; | 54 | }; |
90 | 55 | ||
91 | struct file; /* forward dec */ | 56 | struct file; /* forward dec */ |
@@ -94,15 +59,13 @@ extern int mnt_want_write(struct vfsmount *mnt); | |||
94 | extern int mnt_want_write_file(struct file *file); | 59 | extern int mnt_want_write_file(struct file *file); |
95 | extern int mnt_clone_write(struct vfsmount *mnt); | 60 | extern int mnt_clone_write(struct vfsmount *mnt); |
96 | extern void mnt_drop_write(struct vfsmount *mnt); | 61 | extern void mnt_drop_write(struct vfsmount *mnt); |
62 | extern void mnt_drop_write_file(struct file *file); | ||
97 | extern void mntput(struct vfsmount *mnt); | 63 | extern void mntput(struct vfsmount *mnt); |
98 | extern struct vfsmount *mntget(struct vfsmount *mnt); | 64 | extern struct vfsmount *mntget(struct vfsmount *mnt); |
99 | extern void mnt_pin(struct vfsmount *mnt); | 65 | extern void mnt_pin(struct vfsmount *mnt); |
100 | extern void mnt_unpin(struct vfsmount *mnt); | 66 | extern void mnt_unpin(struct vfsmount *mnt); |
101 | extern int __mnt_is_readonly(struct vfsmount *mnt); | 67 | extern int __mnt_is_readonly(struct vfsmount *mnt); |
102 | 68 | ||
103 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, | ||
104 | const char *name, void *data); | ||
105 | |||
106 | struct file_system_type; | 69 | struct file_system_type; |
107 | extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, | 70 | extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, |
108 | int flags, const char *name, | 71 | int flags, const char *name, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 92ecf5585fac..8c29950d2fa5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -373,7 +373,7 @@ extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | |||
373 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 373 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
374 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 374 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
375 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); | 375 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); |
376 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred, fmode_t f_mode); | 376 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f_mode); |
377 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); | 377 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); |
378 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); | 378 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); |
379 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); | 379 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 643b96c7a94f..6d9e575519cc 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -50,7 +50,7 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer, | |||
50 | 50 | ||
51 | struct proc_dir_entry { | 51 | struct proc_dir_entry { |
52 | unsigned int low_ino; | 52 | unsigned int low_ino; |
53 | mode_t mode; | 53 | umode_t mode; |
54 | nlink_t nlink; | 54 | nlink_t nlink; |
55 | uid_t uid; | 55 | uid_t uid; |
56 | gid_t gid; | 56 | gid_t gid; |
@@ -106,9 +106,9 @@ extern void proc_root_init(void); | |||
106 | 106 | ||
107 | void proc_flush_task(struct task_struct *task); | 107 | void proc_flush_task(struct task_struct *task); |
108 | 108 | ||
109 | extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, | 109 | extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, |
110 | struct proc_dir_entry *parent); | 110 | struct proc_dir_entry *parent); |
111 | struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, | 111 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, |
112 | struct proc_dir_entry *parent, | 112 | struct proc_dir_entry *parent, |
113 | const struct file_operations *proc_fops, | 113 | const struct file_operations *proc_fops, |
114 | void *data); | 114 | void *data); |
@@ -146,17 +146,17 @@ extern void proc_device_tree_update_prop(struct proc_dir_entry *pde, | |||
146 | extern struct proc_dir_entry *proc_symlink(const char *, | 146 | extern struct proc_dir_entry *proc_symlink(const char *, |
147 | struct proc_dir_entry *, const char *); | 147 | struct proc_dir_entry *, const char *); |
148 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); | 148 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); |
149 | extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, | 149 | extern struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, |
150 | struct proc_dir_entry *parent); | 150 | struct proc_dir_entry *parent); |
151 | 151 | ||
152 | static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode, | 152 | static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, |
153 | struct proc_dir_entry *parent, const struct file_operations *proc_fops) | 153 | struct proc_dir_entry *parent, const struct file_operations *proc_fops) |
154 | { | 154 | { |
155 | return proc_create_data(name, mode, parent, proc_fops, NULL); | 155 | return proc_create_data(name, mode, parent, proc_fops, NULL); |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 158 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
159 | mode_t mode, struct proc_dir_entry *base, | 159 | umode_t mode, struct proc_dir_entry *base, |
160 | read_proc_t *read_proc, void * data) | 160 | read_proc_t *read_proc, void * data) |
161 | { | 161 | { |
162 | struct proc_dir_entry *res=create_proc_entry(name,mode,base); | 162 | struct proc_dir_entry *res=create_proc_entry(name,mode,base); |
@@ -168,7 +168,7 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | |||
168 | } | 168 | } |
169 | 169 | ||
170 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, | 170 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, |
171 | const char *name, mode_t mode, const struct file_operations *fops); | 171 | const char *name, umode_t mode, const struct file_operations *fops); |
172 | extern void proc_net_remove(struct net *net, const char *name); | 172 | extern void proc_net_remove(struct net *net, const char *name); |
173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
174 | struct proc_dir_entry *parent); | 174 | struct proc_dir_entry *parent); |
@@ -185,15 +185,15 @@ static inline void proc_flush_task(struct task_struct *task) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | 187 | static inline struct proc_dir_entry *create_proc_entry(const char *name, |
188 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | 188 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } |
189 | static inline struct proc_dir_entry *proc_create(const char *name, | 189 | static inline struct proc_dir_entry *proc_create(const char *name, |
190 | mode_t mode, struct proc_dir_entry *parent, | 190 | umode_t mode, struct proc_dir_entry *parent, |
191 | const struct file_operations *proc_fops) | 191 | const struct file_operations *proc_fops) |
192 | { | 192 | { |
193 | return NULL; | 193 | return NULL; |
194 | } | 194 | } |
195 | static inline struct proc_dir_entry *proc_create_data(const char *name, | 195 | static inline struct proc_dir_entry *proc_create_data(const char *name, |
196 | mode_t mode, struct proc_dir_entry *parent, | 196 | umode_t mode, struct proc_dir_entry *parent, |
197 | const struct file_operations *proc_fops, void *data) | 197 | const struct file_operations *proc_fops, void *data) |
198 | { | 198 | { |
199 | return NULL; | 199 | return NULL; |
@@ -205,10 +205,10 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, | |||
205 | static inline struct proc_dir_entry *proc_mkdir(const char *name, | 205 | static inline struct proc_dir_entry *proc_mkdir(const char *name, |
206 | struct proc_dir_entry *parent) {return NULL;} | 206 | struct proc_dir_entry *parent) {return NULL;} |
207 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, | 207 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, |
208 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | 208 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } |
209 | 209 | ||
210 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 210 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
211 | mode_t mode, struct proc_dir_entry *base, | 211 | umode_t mode, struct proc_dir_entry *base, |
212 | read_proc_t *read_proc, void * data) { return NULL; } | 212 | read_proc_t *read_proc, void * data) { return NULL; } |
213 | 213 | ||
214 | struct tty_driver; | 214 | struct tty_driver; |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 3a8f0c9b2933..5bf5500db83d 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _LINUX_RAMFS_H | 2 | #define _LINUX_RAMFS_H |
3 | 3 | ||
4 | struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, | 4 | struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, |
5 | int mode, dev_t dev); | 5 | umode_t mode, dev_t dev); |
6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, | 6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, |
7 | int flags, const char *dev_name, void *data); | 7 | int flags, const char *dev_name, void *data); |
8 | 8 | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 96d465f8d3e6..2213ddcce20c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1759,13 +1759,14 @@ struct reiserfs_journal_header { | |||
1759 | REISERFS_QUOTA_TRANS_BLOCKS(sb))) | 1759 | REISERFS_QUOTA_TRANS_BLOCKS(sb))) |
1760 | 1760 | ||
1761 | #ifdef CONFIG_QUOTA | 1761 | #ifdef CONFIG_QUOTA |
1762 | #define REISERFS_QUOTA_OPTS ((1 << REISERFS_USRQUOTA) | (1 << REISERFS_GRPQUOTA)) | ||
1762 | /* We need to update data and inode (atime) */ | 1763 | /* We need to update data and inode (atime) */ |
1763 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0) | 1764 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & REISERFS_QUOTA_OPTS ? 2 : 0) |
1764 | /* 1 balancing, 1 bitmap, 1 data per write + stat data update */ | 1765 | /* 1 balancing, 1 bitmap, 1 data per write + stat data update */ |
1765 | #define REISERFS_QUOTA_INIT_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? \ | 1766 | #define REISERFS_QUOTA_INIT_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & REISERFS_QUOTA_OPTS ? \ |
1766 | (DQUOT_INIT_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_INIT_REWRITE+1) : 0) | 1767 | (DQUOT_INIT_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_INIT_REWRITE+1) : 0) |
1767 | /* same as with INIT */ | 1768 | /* same as with INIT */ |
1768 | #define REISERFS_QUOTA_DEL_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? \ | 1769 | #define REISERFS_QUOTA_DEL_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & REISERFS_QUOTA_OPTS ? \ |
1769 | (DQUOT_DEL_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_DEL_REWRITE+1) : 0) | 1770 | (DQUOT_DEL_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_DEL_REWRITE+1) : 0) |
1770 | #else | 1771 | #else |
1771 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) 0 | 1772 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) 0 |
@@ -2056,7 +2057,7 @@ struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key); | |||
2056 | 2057 | ||
2057 | struct reiserfs_security_handle; | 2058 | struct reiserfs_security_handle; |
2058 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | 2059 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, |
2059 | struct inode *dir, int mode, | 2060 | struct inode *dir, umode_t mode, |
2060 | const char *symname, loff_t i_size, | 2061 | const char *symname, loff_t i_size, |
2061 | struct dentry *dentry, struct inode *inode, | 2062 | struct dentry *dentry, struct inode *inode, |
2062 | struct reiserfs_security_handle *security); | 2063 | struct reiserfs_security_handle *security); |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 52c83b6a758a..8c9e85c64b46 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -417,6 +417,7 @@ struct reiserfs_sb_info { | |||
417 | char *s_qf_names[MAXQUOTAS]; | 417 | char *s_qf_names[MAXQUOTAS]; |
418 | int s_jquota_fmt; | 418 | int s_jquota_fmt; |
419 | #endif | 419 | #endif |
420 | char *s_jdev; /* Stored jdev for mount option showing */ | ||
420 | #ifdef CONFIG_REISERFS_CHECK | 421 | #ifdef CONFIG_REISERFS_CHECK |
421 | 422 | ||
422 | struct tree_balance *cur_tb; /* | 423 | struct tree_balance *cur_tb; /* |
@@ -482,7 +483,8 @@ enum reiserfs_mount_options { | |||
482 | REISERFS_ERROR_RO, | 483 | REISERFS_ERROR_RO, |
483 | REISERFS_ERROR_CONTINUE, | 484 | REISERFS_ERROR_CONTINUE, |
484 | 485 | ||
485 | REISERFS_QUOTA, /* Some quota option specified */ | 486 | REISERFS_USRQUOTA, /* User quota option specified */ |
487 | REISERFS_GRPQUOTA, /* Group quota option specified */ | ||
486 | 488 | ||
487 | REISERFS_TEST1, | 489 | REISERFS_TEST1, |
488 | REISERFS_TEST2, | 490 | REISERFS_TEST2, |
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/include/linux/security.h b/include/linux/security.h index e8c619d39291..4298d2dbafa3 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1424,9 +1424,9 @@ struct security_operations { | |||
1424 | 1424 | ||
1425 | #ifdef CONFIG_SECURITY_PATH | 1425 | #ifdef CONFIG_SECURITY_PATH |
1426 | int (*path_unlink) (struct path *dir, struct dentry *dentry); | 1426 | int (*path_unlink) (struct path *dir, struct dentry *dentry); |
1427 | int (*path_mkdir) (struct path *dir, struct dentry *dentry, int mode); | 1427 | int (*path_mkdir) (struct path *dir, struct dentry *dentry, umode_t mode); |
1428 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); | 1428 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); |
1429 | int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, | 1429 | int (*path_mknod) (struct path *dir, struct dentry *dentry, umode_t mode, |
1430 | unsigned int dev); | 1430 | unsigned int dev); |
1431 | int (*path_truncate) (struct path *path); | 1431 | int (*path_truncate) (struct path *path); |
1432 | int (*path_symlink) (struct path *dir, struct dentry *dentry, | 1432 | int (*path_symlink) (struct path *dir, struct dentry *dentry, |
@@ -1435,8 +1435,7 @@ struct security_operations { | |||
1435 | struct dentry *new_dentry); | 1435 | struct dentry *new_dentry); |
1436 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, | 1436 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, |
1437 | struct path *new_dir, struct dentry *new_dentry); | 1437 | struct path *new_dir, struct dentry *new_dentry); |
1438 | int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt, | 1438 | int (*path_chmod) (struct path *path, umode_t mode); |
1439 | mode_t mode); | ||
1440 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); | 1439 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); |
1441 | int (*path_chroot) (struct path *path); | 1440 | int (*path_chroot) (struct path *path); |
1442 | #endif | 1441 | #endif |
@@ -1447,16 +1446,16 @@ struct security_operations { | |||
1447 | const struct qstr *qstr, char **name, | 1446 | const struct qstr *qstr, char **name, |
1448 | void **value, size_t *len); | 1447 | void **value, size_t *len); |
1449 | int (*inode_create) (struct inode *dir, | 1448 | int (*inode_create) (struct inode *dir, |
1450 | struct dentry *dentry, int mode); | 1449 | struct dentry *dentry, umode_t mode); |
1451 | int (*inode_link) (struct dentry *old_dentry, | 1450 | int (*inode_link) (struct dentry *old_dentry, |
1452 | struct inode *dir, struct dentry *new_dentry); | 1451 | struct inode *dir, struct dentry *new_dentry); |
1453 | int (*inode_unlink) (struct inode *dir, struct dentry *dentry); | 1452 | int (*inode_unlink) (struct inode *dir, struct dentry *dentry); |
1454 | int (*inode_symlink) (struct inode *dir, | 1453 | int (*inode_symlink) (struct inode *dir, |
1455 | struct dentry *dentry, const char *old_name); | 1454 | struct dentry *dentry, const char *old_name); |
1456 | int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, int mode); | 1455 | int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, umode_t mode); |
1457 | int (*inode_rmdir) (struct inode *dir, struct dentry *dentry); | 1456 | int (*inode_rmdir) (struct inode *dir, struct dentry *dentry); |
1458 | int (*inode_mknod) (struct inode *dir, struct dentry *dentry, | 1457 | int (*inode_mknod) (struct inode *dir, struct dentry *dentry, |
1459 | int mode, dev_t dev); | 1458 | umode_t mode, dev_t dev); |
1460 | int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry, | 1459 | int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry, |
1461 | struct inode *new_dir, struct dentry *new_dentry); | 1460 | struct inode *new_dir, struct dentry *new_dentry); |
1462 | int (*inode_readlink) (struct dentry *dentry); | 1461 | int (*inode_readlink) (struct dentry *dentry); |
@@ -1716,15 +1715,15 @@ int security_inode_init_security(struct inode *inode, struct inode *dir, | |||
1716 | int security_old_inode_init_security(struct inode *inode, struct inode *dir, | 1715 | int security_old_inode_init_security(struct inode *inode, struct inode *dir, |
1717 | const struct qstr *qstr, char **name, | 1716 | const struct qstr *qstr, char **name, |
1718 | void **value, size_t *len); | 1717 | void **value, size_t *len); |
1719 | int security_inode_create(struct inode *dir, struct dentry *dentry, int mode); | 1718 | int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode); |
1720 | int security_inode_link(struct dentry *old_dentry, struct inode *dir, | 1719 | int security_inode_link(struct dentry *old_dentry, struct inode *dir, |
1721 | struct dentry *new_dentry); | 1720 | struct dentry *new_dentry); |
1722 | int security_inode_unlink(struct inode *dir, struct dentry *dentry); | 1721 | int security_inode_unlink(struct inode *dir, struct dentry *dentry); |
1723 | int security_inode_symlink(struct inode *dir, struct dentry *dentry, | 1722 | int security_inode_symlink(struct inode *dir, struct dentry *dentry, |
1724 | const char *old_name); | 1723 | const char *old_name); |
1725 | int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode); | 1724 | int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
1726 | int security_inode_rmdir(struct inode *dir, struct dentry *dentry); | 1725 | int security_inode_rmdir(struct inode *dir, struct dentry *dentry); |
1727 | int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev); | 1726 | int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev); |
1728 | int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, | 1727 | int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, |
1729 | struct inode *new_dir, struct dentry *new_dentry); | 1728 | struct inode *new_dir, struct dentry *new_dentry); |
1730 | int security_inode_readlink(struct dentry *dentry); | 1729 | int security_inode_readlink(struct dentry *dentry); |
@@ -2061,7 +2060,7 @@ static inline int security_old_inode_init_security(struct inode *inode, | |||
2061 | 2060 | ||
2062 | static inline int security_inode_create(struct inode *dir, | 2061 | static inline int security_inode_create(struct inode *dir, |
2063 | struct dentry *dentry, | 2062 | struct dentry *dentry, |
2064 | int mode) | 2063 | umode_t mode) |
2065 | { | 2064 | { |
2066 | return 0; | 2065 | return 0; |
2067 | } | 2066 | } |
@@ -2855,9 +2854,9 @@ static inline void security_skb_classify_flow(struct sk_buff *skb, struct flowi | |||
2855 | 2854 | ||
2856 | #ifdef CONFIG_SECURITY_PATH | 2855 | #ifdef CONFIG_SECURITY_PATH |
2857 | int security_path_unlink(struct path *dir, struct dentry *dentry); | 2856 | int security_path_unlink(struct path *dir, struct dentry *dentry); |
2858 | int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode); | 2857 | int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode); |
2859 | int security_path_rmdir(struct path *dir, struct dentry *dentry); | 2858 | int security_path_rmdir(struct path *dir, struct dentry *dentry); |
2860 | int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, | 2859 | int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, |
2861 | unsigned int dev); | 2860 | unsigned int dev); |
2862 | int security_path_truncate(struct path *path); | 2861 | int security_path_truncate(struct path *path); |
2863 | int security_path_symlink(struct path *dir, struct dentry *dentry, | 2862 | int security_path_symlink(struct path *dir, struct dentry *dentry, |
@@ -2866,8 +2865,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, | |||
2866 | struct dentry *new_dentry); | 2865 | struct dentry *new_dentry); |
2867 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | 2866 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, |
2868 | struct path *new_dir, struct dentry *new_dentry); | 2867 | struct path *new_dir, struct dentry *new_dentry); |
2869 | int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | 2868 | int security_path_chmod(struct path *path, umode_t mode); |
2870 | mode_t mode); | ||
2871 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); | 2869 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); |
2872 | int security_path_chroot(struct path *path); | 2870 | int security_path_chroot(struct path *path); |
2873 | #else /* CONFIG_SECURITY_PATH */ | 2871 | #else /* CONFIG_SECURITY_PATH */ |
@@ -2877,7 +2875,7 @@ static inline int security_path_unlink(struct path *dir, struct dentry *dentry) | |||
2877 | } | 2875 | } |
2878 | 2876 | ||
2879 | static inline int security_path_mkdir(struct path *dir, struct dentry *dentry, | 2877 | static inline int security_path_mkdir(struct path *dir, struct dentry *dentry, |
2880 | int mode) | 2878 | umode_t mode) |
2881 | { | 2879 | { |
2882 | return 0; | 2880 | return 0; |
2883 | } | 2881 | } |
@@ -2888,7 +2886,7 @@ static inline int security_path_rmdir(struct path *dir, struct dentry *dentry) | |||
2888 | } | 2886 | } |
2889 | 2887 | ||
2890 | static inline int security_path_mknod(struct path *dir, struct dentry *dentry, | 2888 | static inline int security_path_mknod(struct path *dir, struct dentry *dentry, |
2891 | int mode, unsigned int dev) | 2889 | umode_t mode, unsigned int dev) |
2892 | { | 2890 | { |
2893 | return 0; | 2891 | return 0; |
2894 | } | 2892 | } |
@@ -2919,9 +2917,7 @@ static inline int security_path_rename(struct path *old_dir, | |||
2919 | return 0; | 2917 | return 0; |
2920 | } | 2918 | } |
2921 | 2919 | ||
2922 | static inline int security_path_chmod(struct dentry *dentry, | 2920 | static inline int security_path_chmod(struct path *path, umode_t mode) |
2923 | struct vfsmount *mnt, | ||
2924 | mode_t mode) | ||
2925 | { | 2921 | { |
2926 | return 0; | 2922 | return 0; |
2927 | } | 2923 | } |
@@ -3010,7 +3006,7 @@ static inline void security_audit_rule_free(void *lsmrule) | |||
3010 | 3006 | ||
3011 | #ifdef CONFIG_SECURITYFS | 3007 | #ifdef CONFIG_SECURITYFS |
3012 | 3008 | ||
3013 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, | 3009 | extern struct dentry *securityfs_create_file(const char *name, umode_t mode, |
3014 | struct dentry *parent, void *data, | 3010 | struct dentry *parent, void *data, |
3015 | const struct file_operations *fops); | 3011 | const struct file_operations *fops); |
3016 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); | 3012 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); |
@@ -3025,7 +3021,7 @@ static inline struct dentry *securityfs_create_dir(const char *name, | |||
3025 | } | 3021 | } |
3026 | 3022 | ||
3027 | static inline struct dentry *securityfs_create_file(const char *name, | 3023 | static inline struct dentry *securityfs_create_file(const char *name, |
3028 | mode_t mode, | 3024 | umode_t mode, |
3029 | struct dentry *parent, | 3025 | struct dentry *parent, |
3030 | void *data, | 3026 | void *data, |
3031 | const struct file_operations *fops) | 3027 | const struct file_operations *fops) |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 0b69a4684216..44f1514b00ba 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -74,7 +74,7 @@ static inline void seq_commit(struct seq_file *m, int num) | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | char *mangle_path(char *s, char *p, char *esc); | 77 | char *mangle_path(char *s, const char *p, const char *esc); |
78 | int seq_open(struct file *, const struct seq_operations *); | 78 | int seq_open(struct file *, const struct seq_operations *); |
79 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); | 79 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); |
80 | loff_t seq_lseek(struct file *, loff_t, int); | 80 | loff_t seq_lseek(struct file *, loff_t, int); |
@@ -86,10 +86,10 @@ int seq_write(struct seq_file *seq, const void *data, size_t len); | |||
86 | 86 | ||
87 | __printf(2, 3) int seq_printf(struct seq_file *, const char *, ...); | 87 | __printf(2, 3) int seq_printf(struct seq_file *, const char *, ...); |
88 | 88 | ||
89 | int seq_path(struct seq_file *, struct path *, char *); | 89 | int seq_path(struct seq_file *, const struct path *, const char *); |
90 | int seq_dentry(struct seq_file *, struct dentry *, char *); | 90 | int seq_dentry(struct seq_file *, struct dentry *, const char *); |
91 | int seq_path_root(struct seq_file *m, struct path *path, struct path *root, | 91 | int seq_path_root(struct seq_file *m, const struct path *path, |
92 | char *esc); | 92 | const struct path *root, const char *esc); |
93 | int seq_bitmap(struct seq_file *m, const unsigned long *bits, | 93 | int seq_bitmap(struct seq_file *m, const unsigned long *bits, |
94 | unsigned int nr_bits); | 94 | unsigned int nr_bits); |
95 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) | 95 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 9291ac3cc627..e4c711c6f321 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -30,7 +30,7 @@ struct shmem_sb_info { | |||
30 | spinlock_t stat_lock; /* Serialize shmem_sb_info changes */ | 30 | spinlock_t stat_lock; /* Serialize shmem_sb_info changes */ |
31 | uid_t uid; /* Mount uid for root directory */ | 31 | uid_t uid; /* Mount uid for root directory */ |
32 | gid_t gid; /* Mount gid for root directory */ | 32 | gid_t gid; /* Mount gid for root directory */ |
33 | mode_t mode; /* Mount mode for root directory */ | 33 | umode_t mode; /* Mount mode for root directory */ |
34 | struct mempolicy *mpol; /* default memory policy for mappings */ | 34 | struct mempolicy *mpol; /* default memory policy for mappings */ |
35 | }; | 35 | }; |
36 | 36 | ||
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 5efd8cef389e..57531f8e5956 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -203,7 +203,7 @@ extern void cache_unregister(struct cache_detail *cd); | |||
203 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); | 203 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); |
204 | 204 | ||
205 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, | 205 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, |
206 | mode_t, struct cache_detail *); | 206 | umode_t, struct cache_detail *); |
207 | extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); | 207 | extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); |
208 | 208 | ||
209 | extern void qword_add(char **bpp, int *lp, char *str); | 209 | extern void qword_add(char **bpp, int *lp, char *str); |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index e4ea43058d8f..2bb03d77375a 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -55,7 +55,7 @@ extern int rpc_remove_client_dir(struct dentry *); | |||
55 | struct cache_detail; | 55 | struct cache_detail; |
56 | extern struct dentry *rpc_create_cache_dir(struct dentry *, | 56 | extern struct dentry *rpc_create_cache_dir(struct dentry *, |
57 | struct qstr *, | 57 | struct qstr *, |
58 | mode_t umode, | 58 | umode_t umode, |
59 | struct cache_detail *); | 59 | struct cache_detail *); |
60 | extern void rpc_remove_cache_dir(struct dentry *); | 60 | extern void rpc_remove_cache_dir(struct dentry *); |
61 | 61 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 86a24b1166d1..515669fa3c1d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -475,7 +475,7 @@ asmlinkage long sys_mincore(unsigned long start, size_t len, | |||
475 | asmlinkage long sys_pivot_root(const char __user *new_root, | 475 | asmlinkage long sys_pivot_root(const char __user *new_root, |
476 | const char __user *put_old); | 476 | const char __user *put_old); |
477 | asmlinkage long sys_chroot(const char __user *filename); | 477 | asmlinkage long sys_chroot(const char __user *filename); |
478 | asmlinkage long sys_mknod(const char __user *filename, int mode, | 478 | asmlinkage long sys_mknod(const char __user *filename, umode_t mode, |
479 | unsigned dev); | 479 | unsigned dev); |
480 | asmlinkage long sys_link(const char __user *oldname, | 480 | asmlinkage long sys_link(const char __user *oldname, |
481 | const char __user *newname); | 481 | const char __user *newname); |
@@ -483,8 +483,8 @@ asmlinkage long sys_symlink(const char __user *old, const char __user *new); | |||
483 | asmlinkage long sys_unlink(const char __user *pathname); | 483 | asmlinkage long sys_unlink(const char __user *pathname); |
484 | asmlinkage long sys_rename(const char __user *oldname, | 484 | asmlinkage long sys_rename(const char __user *oldname, |
485 | const char __user *newname); | 485 | const char __user *newname); |
486 | asmlinkage long sys_chmod(const char __user *filename, mode_t mode); | 486 | asmlinkage long sys_chmod(const char __user *filename, umode_t mode); |
487 | asmlinkage long sys_fchmod(unsigned int fd, mode_t mode); | 487 | asmlinkage long sys_fchmod(unsigned int fd, umode_t mode); |
488 | 488 | ||
489 | asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg); | 489 | asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg); |
490 | #if BITS_PER_LONG == 32 | 490 | #if BITS_PER_LONG == 32 |
@@ -517,9 +517,9 @@ asmlinkage long sys_sendfile64(int out_fd, int in_fd, | |||
517 | loff_t __user *offset, size_t count); | 517 | loff_t __user *offset, size_t count); |
518 | asmlinkage long sys_readlink(const char __user *path, | 518 | asmlinkage long sys_readlink(const char __user *path, |
519 | char __user *buf, int bufsiz); | 519 | char __user *buf, int bufsiz); |
520 | asmlinkage long sys_creat(const char __user *pathname, int mode); | 520 | asmlinkage long sys_creat(const char __user *pathname, umode_t mode); |
521 | asmlinkage long sys_open(const char __user *filename, | 521 | asmlinkage long sys_open(const char __user *filename, |
522 | int flags, int mode); | 522 | int flags, umode_t mode); |
523 | asmlinkage long sys_close(unsigned int fd); | 523 | asmlinkage long sys_close(unsigned int fd); |
524 | asmlinkage long sys_access(const char __user *filename, int mode); | 524 | asmlinkage long sys_access(const char __user *filename, int mode); |
525 | asmlinkage long sys_vhangup(void); | 525 | asmlinkage long sys_vhangup(void); |
@@ -582,7 +582,7 @@ asmlinkage long sys_preadv(unsigned long fd, const struct iovec __user *vec, | |||
582 | asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec, | 582 | asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec, |
583 | unsigned long vlen, unsigned long pos_l, unsigned long pos_h); | 583 | unsigned long vlen, unsigned long pos_l, unsigned long pos_h); |
584 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); | 584 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); |
585 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); | 585 | asmlinkage long sys_mkdir(const char __user *pathname, umode_t mode); |
586 | asmlinkage long sys_chdir(const char __user *filename); | 586 | asmlinkage long sys_chdir(const char __user *filename); |
587 | asmlinkage long sys_fchdir(unsigned int fd); | 587 | asmlinkage long sys_fchdir(unsigned int fd); |
588 | asmlinkage long sys_rmdir(const char __user *pathname); | 588 | asmlinkage long sys_rmdir(const char __user *pathname); |
@@ -679,7 +679,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | |||
679 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, | 679 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, |
680 | unsigned long third, void __user *ptr, long fifth); | 680 | unsigned long third, void __user *ptr, long fifth); |
681 | 681 | ||
682 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 682 | asmlinkage long sys_mq_open(const char __user *name, int oflag, umode_t mode, struct mq_attr __user *attr); |
683 | asmlinkage long sys_mq_unlink(const char __user *name); | 683 | asmlinkage long sys_mq_unlink(const char __user *name); |
684 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); | 684 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); |
685 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); | 685 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); |
@@ -753,11 +753,11 @@ asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd); | |||
753 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, | 753 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, |
754 | __u32 __user *ustatus); | 754 | __u32 __user *ustatus); |
755 | asmlinkage long sys_spu_create(const char __user *name, | 755 | asmlinkage long sys_spu_create(const char __user *name, |
756 | unsigned int flags, mode_t mode, int fd); | 756 | unsigned int flags, umode_t mode, int fd); |
757 | 757 | ||
758 | asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode, | 758 | asmlinkage long sys_mknodat(int dfd, const char __user * filename, umode_t mode, |
759 | unsigned dev); | 759 | unsigned dev); |
760 | asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode); | 760 | asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, umode_t mode); |
761 | asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); | 761 | asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); |
762 | asmlinkage long sys_symlinkat(const char __user * oldname, | 762 | asmlinkage long sys_symlinkat(const char __user * oldname, |
763 | int newdfd, const char __user * newname); | 763 | int newdfd, const char __user * newname); |
@@ -769,11 +769,11 @@ asmlinkage long sys_futimesat(int dfd, const char __user *filename, | |||
769 | struct timeval __user *utimes); | 769 | struct timeval __user *utimes); |
770 | asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); | 770 | asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); |
771 | asmlinkage long sys_fchmodat(int dfd, const char __user * filename, | 771 | asmlinkage long sys_fchmodat(int dfd, const char __user * filename, |
772 | mode_t mode); | 772 | umode_t mode); |
773 | asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, | 773 | asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, |
774 | gid_t group, int flag); | 774 | gid_t group, int flag); |
775 | asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | 775 | asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, |
776 | int mode); | 776 | umode_t mode); |
777 | asmlinkage long sys_newfstatat(int dfd, const char __user *filename, | 777 | asmlinkage long sys_newfstatat(int dfd, const char __user *filename, |
778 | struct stat __user *statbuf, int flag); | 778 | struct stat __user *statbuf, int flag); |
779 | asmlinkage long sys_fstatat64(int dfd, const char __user *filename, | 779 | asmlinkage long sys_fstatat64(int dfd, const char __user *filename, |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 703cfa33a3ca..bb9127dd814b 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -1038,7 +1038,7 @@ struct ctl_table | |||
1038 | const char *procname; /* Text ID for /proc/sys, or zero */ | 1038 | const char *procname; /* Text ID for /proc/sys, or zero */ |
1039 | void *data; | 1039 | void *data; |
1040 | int maxlen; | 1040 | int maxlen; |
1041 | mode_t mode; | 1041 | umode_t mode; |
1042 | struct ctl_table *child; | 1042 | struct ctl_table *child; |
1043 | struct ctl_table *parent; /* Automatically set */ | 1043 | struct ctl_table *parent; /* Automatically set */ |
1044 | proc_handler *proc_handler; /* Callback for text formatting */ | 1044 | proc_handler *proc_handler; /* Callback for text formatting */ |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index dac0859e6440..0010009b2f00 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -25,7 +25,7 @@ enum kobj_ns_type; | |||
25 | 25 | ||
26 | struct attribute { | 26 | struct attribute { |
27 | const char *name; | 27 | const char *name; |
28 | mode_t mode; | 28 | umode_t mode; |
29 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 29 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
30 | struct lock_class_key *key; | 30 | struct lock_class_key *key; |
31 | struct lock_class_key skey; | 31 | struct lock_class_key skey; |
@@ -55,7 +55,7 @@ do { \ | |||
55 | 55 | ||
56 | struct attribute_group { | 56 | struct attribute_group { |
57 | const char *name; | 57 | const char *name; |
58 | mode_t (*is_visible)(struct kobject *, | 58 | umode_t (*is_visible)(struct kobject *, |
59 | struct attribute *, int); | 59 | struct attribute *, int); |
60 | struct attribute **attrs; | 60 | struct attribute **attrs; |
61 | }; | 61 | }; |
@@ -133,7 +133,7 @@ int __must_check sysfs_create_file(struct kobject *kobj, | |||
133 | int __must_check sysfs_create_files(struct kobject *kobj, | 133 | int __must_check sysfs_create_files(struct kobject *kobj, |
134 | const struct attribute **attr); | 134 | const struct attribute **attr); |
135 | int __must_check sysfs_chmod_file(struct kobject *kobj, | 135 | int __must_check sysfs_chmod_file(struct kobject *kobj, |
136 | const struct attribute *attr, mode_t mode); | 136 | const struct attribute *attr, umode_t mode); |
137 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); | 137 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); |
138 | void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); | 138 | void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); |
139 | 139 | ||
@@ -221,7 +221,7 @@ static inline int sysfs_create_files(struct kobject *kobj, | |||
221 | } | 221 | } |
222 | 222 | ||
223 | static inline int sysfs_chmod_file(struct kobject *kobj, | 223 | static inline int sysfs_chmod_file(struct kobject *kobj, |
224 | const struct attribute *attr, mode_t mode) | 224 | const struct attribute *attr, umode_t mode) |
225 | { | 225 | { |
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
diff --git a/include/linux/types.h b/include/linux/types.h index 57a97234bec1..f0ac9bda0f78 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -24,6 +24,7 @@ typedef __kernel_fd_set fd_set; | |||
24 | typedef __kernel_dev_t dev_t; | 24 | typedef __kernel_dev_t dev_t; |
25 | typedef __kernel_ino_t ino_t; | 25 | typedef __kernel_ino_t ino_t; |
26 | typedef __kernel_mode_t mode_t; | 26 | typedef __kernel_mode_t mode_t; |
27 | typedef unsigned short umode_t; | ||
27 | typedef __kernel_nlink_t nlink_t; | 28 | typedef __kernel_nlink_t nlink_t; |
28 | typedef __kernel_off_t off_t; | 29 | typedef __kernel_off_t off_t; |
29 | typedef __kernel_pid_t pid_t; | 30 | typedef __kernel_pid_t pid_t; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5d258c3180ae..7f8d4d61ca47 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -935,7 +935,7 @@ extern struct bus_type usb_bus_type; | |||
935 | */ | 935 | */ |
936 | struct usb_class_driver { | 936 | struct usb_class_driver { |
937 | char *name; | 937 | char *name; |
938 | char *(*devnode)(struct device *dev, mode_t *mode); | 938 | char *(*devnode)(struct device *dev, umode_t *mode); |
939 | const struct file_operations *fops; | 939 | const struct file_operations *fops; |
940 | int minor_base; | 940 | int minor_base; |
941 | }; | 941 | }; |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 5994bcc1b017..87f34c3d447d 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -142,7 +142,7 @@ struct iscsi_transport { | |||
142 | int (*get_iface_param) (struct iscsi_iface *iface, | 142 | int (*get_iface_param) (struct iscsi_iface *iface, |
143 | enum iscsi_param_type param_type, | 143 | enum iscsi_param_type param_type, |
144 | int param, char *buf); | 144 | int param, char *buf); |
145 | mode_t (*attr_is_visible)(int param_type, int param); | 145 | umode_t (*attr_is_visible)(int param_type, int param); |
146 | int (*bsg_request)(struct bsg_job *job); | 146 | int (*bsg_request)(struct bsg_job *job); |
147 | }; | 147 | }; |
148 | 148 | ||
diff --git a/include/sound/info.h b/include/sound/info.h index 5492cc40dc57..9ca1a493d370 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -72,7 +72,7 @@ struct snd_info_entry_ops { | |||
72 | 72 | ||
73 | struct snd_info_entry { | 73 | struct snd_info_entry { |
74 | const char *name; | 74 | const char *name; |
75 | mode_t mode; | 75 | umode_t mode; |
76 | long size; | 76 | long size; |
77 | unsigned short content; | 77 | unsigned short content; |
78 | union { | 78 | union { |