Commit 4acdaf27ebe2034c342f3be57ef49aed1ad885ef
1 parent
18bb1db3e7
Exists in
master
and in
20 other branches
switch ->create() to umode_t
vfs_create() ignores everything outside of 16bit subset of its mode argument; switching it to umode_t is obviously equivalent and it's the only caller of the method Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 54 changed files with 72 additions and 72 deletions Side-by-side Diff
- Documentation/filesystems/Locking
- Documentation/filesystems/vfs.txt
- drivers/staging/pohmelfs/dir.c
- fs/9p/vfs_inode.c
- fs/9p/vfs_inode_dotl.c
- fs/affs/affs.h
- fs/affs/namei.c
- fs/afs/dir.c
- fs/bad_inode.c
- fs/bfs/dir.c
- fs/btrfs/inode.c
- fs/ceph/dir.c
- fs/cifs/cifsfs.h
- fs/cifs/dir.c
- fs/coda/dir.c
- fs/ecryptfs/inode.c
- fs/exofs/namei.c
- fs/ext2/namei.c
- fs/ext3/namei.c
- fs/ext4/namei.c
- fs/fat/namei_msdos.c
- fs/fat/namei_vfat.c
- fs/fuse/dir.c
- fs/gfs2/inode.c
- fs/hfs/dir.c
- fs/hfsplus/dir.c
- fs/hostfs/hostfs_kern.c
- fs/hpfs/namei.c
- fs/hugetlbfs/inode.c
- fs/jffs2/dir.c
- fs/jfs/namei.c
- fs/logfs/dir.c
- fs/minix/namei.c
- fs/namei.c
- fs/ncpfs/dir.c
- fs/nfs/dir.c
- fs/nilfs2/namei.c
- fs/ocfs2/dlmfs/dlmfs.c
- fs/ocfs2/namei.c
- fs/omfs/dir.c
- fs/ramfs/inode.c
- fs/reiserfs/namei.c
- fs/sysv/namei.c
- fs/ubifs/dir.c
- fs/udf/namei.c
- fs/ufs/namei.c
- fs/xfs/xfs_iops.c
- include/linux/fs.h
- include/linux/security.h
- ipc/mqueue.c
- mm/shmem.c
- security/capability.c
- security/security.c
- security/selinux/hooks.c
Documentation/filesystems/Locking
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | |
38 | 38 | --------------------------- inode_operations --------------------------- |
39 | 39 | prototypes: |
40 | - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | |
40 | + int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); | |
41 | 41 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid |
42 | 42 | ata *); |
43 | 43 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
Documentation/filesystems/vfs.txt
... | ... | @@ -341,7 +341,7 @@ |
341 | 341 | filesystem. As of kernel 2.6.22, the following members are defined: |
342 | 342 | |
343 | 343 | struct inode_operations { |
344 | - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | |
344 | + int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); | |
345 | 345 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); |
346 | 346 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
347 | 347 | int (*unlink) (struct inode *,struct dentry *); |
drivers/staging/pohmelfs/dir.c
... | ... | @@ -661,7 +661,7 @@ |
661 | 661 | /* |
662 | 662 | * VFS create and mkdir callbacks. |
663 | 663 | */ |
664 | -static int pohmelfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
664 | +static int pohmelfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
665 | 665 | struct nameidata *nd) |
666 | 666 | { |
667 | 667 | return pohmelfs_create_entry(dir, dentry, 0, mode); |
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | */ |
254 | 254 | |
255 | 255 | static int |
256 | -v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, | |
256 | +v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, | |
257 | 257 | struct nameidata *nd) |
258 | 258 | { |
259 | 259 | int err = 0; |
... | ... | @@ -284,7 +284,7 @@ |
284 | 284 | |
285 | 285 | name = (char *) dentry->d_name.name; |
286 | 286 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x " |
287 | - "mode:0x%x\n", name, flags, omode); | |
287 | + "mode:0x%hx\n", name, flags, omode); | |
288 | 288 | |
289 | 289 | dfid = v9fs_fid_lookup(dentry->d_parent); |
290 | 290 | if (IS_ERR(dfid)) { |
fs/affs/affs.h
... | ... | @@ -156,7 +156,7 @@ |
156 | 156 | extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); |
157 | 157 | extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *); |
158 | 158 | extern int affs_unlink(struct inode *dir, struct dentry *dentry); |
159 | -extern int affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *); | |
159 | +extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *); | |
160 | 160 | extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
161 | 161 | extern int affs_rmdir(struct inode *dir, struct dentry *dentry); |
162 | 162 | extern int affs_link(struct dentry *olddentry, struct inode *dir, |
fs/affs/namei.c
... | ... | @@ -255,13 +255,13 @@ |
255 | 255 | } |
256 | 256 | |
257 | 257 | int |
258 | -affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) | |
258 | +affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | |
259 | 259 | { |
260 | 260 | struct super_block *sb = dir->i_sb; |
261 | 261 | struct inode *inode; |
262 | 262 | int error; |
263 | 263 | |
264 | - pr_debug("AFFS: create(%lu,\"%.*s\",0%o)\n",dir->i_ino,(int)dentry->d_name.len, | |
264 | + pr_debug("AFFS: create(%lu,\"%.*s\",0%ho)\n",dir->i_ino,(int)dentry->d_name.len, | |
265 | 265 | dentry->d_name.name,mode); |
266 | 266 | |
267 | 267 | inode = affs_new_inode(dir); |
fs/afs/dir.c
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | static void afs_d_release(struct dentry *dentry); |
29 | 29 | static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, |
30 | 30 | loff_t fpos, u64 ino, unsigned dtype); |
31 | -static int afs_create(struct inode *dir, struct dentry *dentry, int mode, | |
31 | +static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
32 | 32 | struct nameidata *nd); |
33 | 33 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
34 | 34 | static int afs_rmdir(struct inode *dir, struct dentry *dentry); |
... | ... | @@ -948,7 +948,7 @@ |
948 | 948 | /* |
949 | 949 | * create a regular file on an AFS filesystem |
950 | 950 | */ |
951 | -static int afs_create(struct inode *dir, struct dentry *dentry, int mode, | |
951 | +static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
952 | 952 | struct nameidata *nd) |
953 | 953 | { |
954 | 954 | struct afs_file_status status; |
... | ... | @@ -962,7 +962,7 @@ |
962 | 962 | |
963 | 963 | dvnode = AFS_FS_I(dir); |
964 | 964 | |
965 | - _enter("{%x:%u},{%s},%o,", | |
965 | + _enter("{%x:%u},{%s},%ho,", | |
966 | 966 | dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); |
967 | 967 | |
968 | 968 | ret = -ENAMETOOLONG; |
fs/bad_inode.c
fs/bfs/dir.c
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | |
85 | 85 | extern void dump_imap(const char *, struct super_block *); |
86 | 86 | |
87 | -static int bfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
87 | +static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
88 | 88 | struct nameidata *nd) |
89 | 89 | { |
90 | 90 | int err; |
fs/btrfs/inode.c
... | ... | @@ -4665,7 +4665,7 @@ |
4665 | 4665 | } |
4666 | 4666 | |
4667 | 4667 | static int btrfs_create(struct inode *dir, struct dentry *dentry, |
4668 | - int mode, struct nameidata *nd) | |
4668 | + umode_t mode, struct nameidata *nd) | |
4669 | 4669 | { |
4670 | 4670 | struct btrfs_trans_handle *trans; |
4671 | 4671 | struct btrfs_root *root = BTRFS_I(dir)->root; |
fs/ceph/dir.c
... | ... | @@ -699,7 +699,7 @@ |
699 | 699 | return err; |
700 | 700 | } |
701 | 701 | |
702 | -static int ceph_create(struct inode *dir, struct dentry *dentry, int mode, | |
702 | +static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
703 | 703 | struct nameidata *nd) |
704 | 704 | { |
705 | 705 | dout("create in dir %p dentry %p name '%.*s'\n", |
fs/cifs/cifsfs.h
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | /* Functions related to inodes */ |
45 | 45 | extern const struct inode_operations cifs_dir_inode_ops; |
46 | 46 | extern struct inode *cifs_root_iget(struct super_block *); |
47 | -extern int cifs_create(struct inode *, struct dentry *, int, | |
47 | +extern int cifs_create(struct inode *, struct dentry *, umode_t, | |
48 | 48 | struct nameidata *); |
49 | 49 | extern struct dentry *cifs_lookup(struct inode *, struct dentry *, |
50 | 50 | struct nameidata *); |
fs/cifs/dir.c
... | ... | @@ -136,7 +136,7 @@ |
136 | 136 | /* Inode operations in similar order to how they appear in Linux file fs.h */ |
137 | 137 | |
138 | 138 | int |
139 | -cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |
139 | +cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode, | |
140 | 140 | struct nameidata *nd) |
141 | 141 | { |
142 | 142 | int rc = -ENOENT; |
fs/coda/dir.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | #include "coda_int.h" |
31 | 31 | |
32 | 32 | /* dir inode-ops */ |
33 | -static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd); | |
33 | +static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd); | |
34 | 34 | static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); |
35 | 35 | static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, |
36 | 36 | struct dentry *entry); |
... | ... | @@ -191,7 +191,7 @@ |
191 | 191 | } |
192 | 192 | |
193 | 193 | /* creation routines: create, mknod, mkdir, link, symlink */ |
194 | -static int coda_create(struct inode *dir, struct dentry *de, int mode, struct nameidata *nd) | |
194 | +static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd) | |
195 | 195 | { |
196 | 196 | int error; |
197 | 197 | const char *name=de->d_name.name; |
fs/ecryptfs/inode.c
fs/exofs/namei.c
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | return d_splice_alias(inode, dentry); |
60 | 60 | } |
61 | 61 | |
62 | -static int exofs_create(struct inode *dir, struct dentry *dentry, int mode, | |
62 | +static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
63 | 63 | struct nameidata *nd) |
64 | 64 | { |
65 | 65 | struct inode *inode = exofs_new_inode(dir, mode); |
fs/ext2/namei.c
... | ... | @@ -94,7 +94,7 @@ |
94 | 94 | * If the create succeeds, we fill in the inode information |
95 | 95 | * with d_instantiate(). |
96 | 96 | */ |
97 | -static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) | |
97 | +static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) | |
98 | 98 | { |
99 | 99 | struct inode *inode; |
100 | 100 |
fs/ext3/namei.c
... | ... | @@ -1698,7 +1698,7 @@ |
1698 | 1698 | * If the create succeeds, we fill in the inode information |
1699 | 1699 | * with d_instantiate(). |
1700 | 1700 | */ |
1701 | -static int ext3_create (struct inode * dir, struct dentry * dentry, int mode, | |
1701 | +static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode, | |
1702 | 1702 | struct nameidata *nd) |
1703 | 1703 | { |
1704 | 1704 | handle_t *handle; |
fs/ext4/namei.c
... | ... | @@ -1736,7 +1736,7 @@ |
1736 | 1736 | * If the create succeeds, we fill in the inode information |
1737 | 1737 | * with d_instantiate(). |
1738 | 1738 | */ |
1739 | -static int ext4_create(struct inode *dir, struct dentry *dentry, int mode, | |
1739 | +static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
1740 | 1740 | struct nameidata *nd) |
1741 | 1741 | { |
1742 | 1742 | handle_t *handle; |
fs/fat/namei_msdos.c
... | ... | @@ -264,7 +264,7 @@ |
264 | 264 | } |
265 | 265 | |
266 | 266 | /***** Create a file */ |
267 | -static int msdos_create(struct inode *dir, struct dentry *dentry, int mode, | |
267 | +static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
268 | 268 | struct nameidata *nd) |
269 | 269 | { |
270 | 270 | struct super_block *sb = dir->i_sb; |
fs/fat/namei_vfat.c
... | ... | @@ -781,7 +781,7 @@ |
781 | 781 | return ERR_PTR(err); |
782 | 782 | } |
783 | 783 | |
784 | -static int vfat_create(struct inode *dir, struct dentry *dentry, int mode, | |
784 | +static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
785 | 785 | struct nameidata *nd) |
786 | 786 | { |
787 | 787 | struct super_block *sb = dir->i_sb; |
fs/fuse/dir.c
... | ... | @@ -573,7 +573,7 @@ |
573 | 573 | return create_new_entry(fc, req, dir, entry, mode); |
574 | 574 | } |
575 | 575 | |
576 | -static int fuse_create(struct inode *dir, struct dentry *entry, int mode, | |
576 | +static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, | |
577 | 577 | struct nameidata *nd) |
578 | 578 | { |
579 | 579 | if (nd) { |
fs/gfs2/inode.c
fs/hfs/dir.c
... | ... | @@ -186,7 +186,7 @@ |
186 | 186 | * a directory and return a corresponding inode, given the inode for |
187 | 187 | * the directory and the name (and its length) of the new file. |
188 | 188 | */ |
189 | -static int hfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
189 | +static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
190 | 190 | struct nameidata *nd) |
191 | 191 | { |
192 | 192 | struct inode *inode; |
fs/hfsplus/dir.c
... | ... | @@ -453,7 +453,7 @@ |
453 | 453 | return res; |
454 | 454 | } |
455 | 455 | |
456 | -static int hfsplus_create(struct inode *dir, struct dentry *dentry, int mode, | |
456 | +static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
457 | 457 | struct nameidata *nd) |
458 | 458 | { |
459 | 459 | return hfsplus_mknod(dir, dentry, mode, 0); |
fs/hostfs/hostfs_kern.c
fs/hpfs/namei.c
... | ... | @@ -115,7 +115,7 @@ |
115 | 115 | return err; |
116 | 116 | } |
117 | 117 | |
118 | -static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) | |
118 | +static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | |
119 | 119 | { |
120 | 120 | const unsigned char *name = dentry->d_name.name; |
121 | 121 | unsigned len = dentry->d_name.len; |
fs/hugetlbfs/inode.c
... | ... | @@ -531,7 +531,7 @@ |
531 | 531 | return retval; |
532 | 532 | } |
533 | 533 | |
534 | -static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) | |
534 | +static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | |
535 | 535 | { |
536 | 536 | return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0); |
537 | 537 | } |
fs/jffs2/dir.c
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | |
23 | 23 | static int jffs2_readdir (struct file *, void *, filldir_t); |
24 | 24 | |
25 | -static int jffs2_create (struct inode *,struct dentry *,int, | |
25 | +static int jffs2_create (struct inode *,struct dentry *,umode_t, | |
26 | 26 | struct nameidata *); |
27 | 27 | static struct dentry *jffs2_lookup (struct inode *,struct dentry *, |
28 | 28 | struct nameidata *); |
... | ... | @@ -169,8 +169,8 @@ |
169 | 169 | /***********************************************************************/ |
170 | 170 | |
171 | 171 | |
172 | -static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, | |
173 | - struct nameidata *nd) | |
172 | +static int jffs2_create(struct inode *dir_i, struct dentry *dentry, | |
173 | + umode_t mode, struct nameidata *nd) | |
174 | 174 | { |
175 | 175 | struct jffs2_raw_inode *ri; |
176 | 176 | struct jffs2_inode_info *f, *dir_f; |
fs/jfs/namei.c
fs/logfs/dir.c
... | ... | @@ -501,7 +501,7 @@ |
501 | 501 | return __logfs_create(dir, dentry, inode, NULL, 0); |
502 | 502 | } |
503 | 503 | |
504 | -static int logfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
504 | +static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
505 | 505 | struct nameidata *nd) |
506 | 506 | { |
507 | 507 | struct inode *inode; |
fs/minix/namei.c
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | return error; |
55 | 55 | } |
56 | 56 | |
57 | -static int minix_create(struct inode * dir, struct dentry *dentry, int mode, | |
57 | +static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
58 | 58 | struct nameidata *nd) |
59 | 59 | { |
60 | 60 | return minix_mknod(dir, dentry, mode, 0); |
fs/namei.c
... | ... | @@ -1976,7 +1976,7 @@ |
1976 | 1976 | } |
1977 | 1977 | } |
1978 | 1978 | |
1979 | -int vfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
1979 | +int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
1980 | 1980 | struct nameidata *nd) |
1981 | 1981 | { |
1982 | 1982 | int error = may_create(dir, dentry); |
fs/ncpfs/dir.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | |
31 | 31 | static int ncp_readdir(struct file *, void *, filldir_t); |
32 | 32 | |
33 | -static int ncp_create(struct inode *, struct dentry *, int, struct nameidata *); | |
33 | +static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | |
34 | 34 | static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *); |
35 | 35 | static int ncp_unlink(struct inode *, struct dentry *); |
36 | 36 | static int ncp_mkdir(struct inode *, struct dentry *, umode_t); |
... | ... | @@ -979,7 +979,7 @@ |
979 | 979 | return error; |
980 | 980 | } |
981 | 981 | |
982 | -static int ncp_create(struct inode *dir, struct dentry *dentry, int mode, | |
982 | +static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
983 | 983 | struct nameidata *nd) |
984 | 984 | { |
985 | 985 | return ncp_create_new(dir, dentry, mode, 0, 0); |
fs/nfs/dir.c
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | static int nfs_closedir(struct inode *, struct file *); |
48 | 48 | static int nfs_readdir(struct file *, void *, filldir_t); |
49 | 49 | static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *); |
50 | -static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *); | |
50 | +static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | |
51 | 51 | static int nfs_mkdir(struct inode *, struct dentry *, umode_t); |
52 | 52 | static int nfs_rmdir(struct inode *, struct dentry *); |
53 | 53 | static int nfs_unlink(struct inode *, struct dentry *); |
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | #ifdef CONFIG_NFS_V4 |
113 | 113 | |
114 | 114 | static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *); |
115 | -static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd); | |
115 | +static int nfs_open_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd); | |
116 | 116 | const struct inode_operations nfs4_dir_inode_operations = { |
117 | 117 | .create = nfs_open_create, |
118 | 118 | .lookup = nfs_atomic_lookup, |
... | ... | @@ -1573,8 +1573,8 @@ |
1573 | 1573 | return nfs_lookup_revalidate(dentry, nd); |
1574 | 1574 | } |
1575 | 1575 | |
1576 | -static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, | |
1577 | - struct nameidata *nd) | |
1576 | +static int nfs_open_create(struct inode *dir, struct dentry *dentry, | |
1577 | + umode_t mode, struct nameidata *nd) | |
1578 | 1578 | { |
1579 | 1579 | struct nfs_open_context *ctx = NULL; |
1580 | 1580 | struct iattr attr; |
... | ... | @@ -1664,8 +1664,8 @@ |
1664 | 1664 | * that the operation succeeded on the server, but an error in the |
1665 | 1665 | * reply path made it appear to have failed. |
1666 | 1666 | */ |
1667 | -static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
1668 | - struct nameidata *nd) | |
1667 | +static int nfs_create(struct inode *dir, struct dentry *dentry, | |
1668 | + umode_t mode, struct nameidata *nd) | |
1669 | 1669 | { |
1670 | 1670 | struct iattr attr; |
1671 | 1671 | int error; |
fs/nilfs2/namei.c
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | * If the create succeeds, we fill in the inode information |
85 | 85 | * with d_instantiate(). |
86 | 86 | */ |
87 | -static int nilfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
87 | +static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
88 | 88 | struct nameidata *nd) |
89 | 89 | { |
90 | 90 | struct inode *inode; |
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/namei.c
fs/omfs/dir.c
... | ... | @@ -284,7 +284,7 @@ |
284 | 284 | return omfs_add_node(dir, dentry, mode | S_IFDIR); |
285 | 285 | } |
286 | 286 | |
287 | -static int omfs_create(struct inode *dir, struct dentry *dentry, int mode, | |
287 | +static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
288 | 288 | struct nameidata *nd) |
289 | 289 | { |
290 | 290 | return omfs_add_node(dir, dentry, mode | S_IFREG); |
fs/ramfs/inode.c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | return retval; |
115 | 115 | } |
116 | 116 | |
117 | -static int ramfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) | |
117 | +static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | |
118 | 118 | { |
119 | 119 | return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); |
120 | 120 | } |
fs/reiserfs/namei.c
fs/sysv/namei.c
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | return err; |
81 | 81 | } |
82 | 82 | |
83 | -static int sysv_create(struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) | |
83 | +static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) | |
84 | 84 | { |
85 | 85 | return sysv_mknod(dir, dentry, mode, 0); |
86 | 86 | } |
fs/ubifs/dir.c
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | return ERR_PTR(err); |
254 | 254 | } |
255 | 255 | |
256 | -static int ubifs_create(struct inode *dir, struct dentry *dentry, int mode, | |
256 | +static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
257 | 257 | struct nameidata *nd) |
258 | 258 | { |
259 | 259 | struct inode *inode; |
... | ... | @@ -268,7 +268,7 @@ |
268 | 268 | * parent directory inode. |
269 | 269 | */ |
270 | 270 | |
271 | - dbg_gen("dent '%.*s', mode %#x in dir ino %lu", | |
271 | + dbg_gen("dent '%.*s', mode %#hx in dir ino %lu", | |
272 | 272 | dentry->d_name.len, dentry->d_name.name, mode, dir->i_ino); |
273 | 273 | |
274 | 274 | err = ubifs_budget_space(c, &req); |
fs/udf/namei.c
... | ... | @@ -552,7 +552,7 @@ |
552 | 552 | return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); |
553 | 553 | } |
554 | 554 | |
555 | -static int udf_create(struct inode *dir, struct dentry *dentry, int mode, | |
555 | +static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
556 | 556 | struct nameidata *nd) |
557 | 557 | { |
558 | 558 | struct udf_fileident_bh fibh; |
fs/ufs/namei.c
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | * If the create succeeds, we fill in the inode information |
71 | 71 | * with d_instantiate(). |
72 | 72 | */ |
73 | -static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, | |
73 | +static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, | |
74 | 74 | struct nameidata *nd) |
75 | 75 | { |
76 | 76 | struct inode *inode; |
fs/xfs/xfs_iops.c
include/linux/fs.h
... | ... | @@ -1516,7 +1516,7 @@ |
1516 | 1516 | /* |
1517 | 1517 | * VFS helper functions.. |
1518 | 1518 | */ |
1519 | -extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | |
1519 | +extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | |
1520 | 1520 | extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); |
1521 | 1521 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); |
1522 | 1522 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); |
... | ... | @@ -1619,7 +1619,7 @@ |
1619 | 1619 | int (*readlink) (struct dentry *, char __user *,int); |
1620 | 1620 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1621 | 1621 | |
1622 | - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | |
1622 | + int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); | |
1623 | 1623 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
1624 | 1624 | int (*unlink) (struct inode *,struct dentry *); |
1625 | 1625 | int (*symlink) (struct inode *,struct dentry *,const char *); |
include/linux/security.h
... | ... | @@ -1447,7 +1447,7 @@ |
1447 | 1447 | const struct qstr *qstr, char **name, |
1448 | 1448 | void **value, size_t *len); |
1449 | 1449 | int (*inode_create) (struct inode *dir, |
1450 | - struct dentry *dentry, int mode); | |
1450 | + struct dentry *dentry, umode_t mode); | |
1451 | 1451 | int (*inode_link) (struct dentry *old_dentry, |
1452 | 1452 | struct inode *dir, struct dentry *new_dentry); |
1453 | 1453 | int (*inode_unlink) (struct inode *dir, struct dentry *dentry); |
... | ... | @@ -1716,7 +1716,7 @@ |
1716 | 1716 | int security_old_inode_init_security(struct inode *inode, struct inode *dir, |
1717 | 1717 | const struct qstr *qstr, char **name, |
1718 | 1718 | void **value, size_t *len); |
1719 | -int security_inode_create(struct inode *dir, struct dentry *dentry, int mode); | |
1719 | +int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode); | |
1720 | 1720 | int security_inode_link(struct dentry *old_dentry, struct inode *dir, |
1721 | 1721 | struct dentry *new_dentry); |
1722 | 1722 | int security_inode_unlink(struct inode *dir, struct dentry *dentry); |
... | ... | @@ -2061,7 +2061,7 @@ |
2061 | 2061 | |
2062 | 2062 | static inline int security_inode_create(struct inode *dir, |
2063 | 2063 | struct dentry *dentry, |
2064 | - int mode) | |
2064 | + umode_t mode) | |
2065 | 2065 | { |
2066 | 2066 | return 0; |
2067 | 2067 | } |
ipc/mqueue.c
... | ... | @@ -295,7 +295,7 @@ |
295 | 295 | } |
296 | 296 | |
297 | 297 | static int mqueue_create(struct inode *dir, struct dentry *dentry, |
298 | - int mode, struct nameidata *nd) | |
298 | + umode_t mode, struct nameidata *nd) | |
299 | 299 | { |
300 | 300 | struct inode *inode; |
301 | 301 | struct mq_attr *attr = dentry->d_fsdata; |
... | ... | @@ -610,7 +610,7 @@ |
610 | 610 | * Invoked when creating a new queue via sys_mq_open |
611 | 611 | */ |
612 | 612 | static struct file *do_create(struct ipc_namespace *ipc_ns, struct dentry *dir, |
613 | - struct dentry *dentry, int oflag, mode_t mode, | |
613 | + struct dentry *dentry, int oflag, umode_t mode, | |
614 | 614 | struct mq_attr *attr) |
615 | 615 | { |
616 | 616 | const struct cred *cred = current_cred(); |
mm/shmem.c
... | ... | @@ -1499,7 +1499,7 @@ |
1499 | 1499 | return 0; |
1500 | 1500 | } |
1501 | 1501 | |
1502 | -static int shmem_create(struct inode *dir, struct dentry *dentry, int mode, | |
1502 | +static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |
1503 | 1503 | struct nameidata *nd) |
1504 | 1504 | { |
1505 | 1505 | return shmem_mknod(dir, dentry, mode | S_IFREG, 0); |
security/capability.c
security/security.c
security/selinux/hooks.c
... | ... | @@ -2598,7 +2598,7 @@ |
2598 | 2598 | return 0; |
2599 | 2599 | } |
2600 | 2600 | |
2601 | -static int selinux_inode_create(struct inode *dir, struct dentry *dentry, int mask) | |
2601 | +static int selinux_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode) | |
2602 | 2602 | { |
2603 | 2603 | return may_create(dir, dentry, SECCLASS_FILE); |
2604 | 2604 | } |