Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Al Viro 4acdaf27 18bb1db3

+72 -72
+1 -1
Documentation/filesystems/Locking
··· 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 *);
+1 -1
Documentation/filesystems/vfs.txt
··· 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 *);
+1 -1
drivers/staging/pohmelfs/dir.c
··· 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);
+1 -1
fs/9p/vfs_inode.c
··· 702 702 */ 703 703 704 704 static int 705 - v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode, 705 + v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 706 706 struct nameidata *nd) 707 707 { 708 708 int err;
+2 -2
fs/9p/vfs_inode_dotl.c
··· 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 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)) {
+1 -1
fs/affs/affs.h
··· 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,
+2 -2
fs/affs/namei.c
··· 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);
+3 -3
fs/afs/dir.c
··· 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 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 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;
+1 -1
fs/bad_inode.c
··· 173 173 }; 174 174 175 175 static int bad_inode_create (struct inode *dir, struct dentry *dentry, 176 - int mode, struct nameidata *nd) 176 + umode_t mode, struct nameidata *nd) 177 177 { 178 178 return -EIO; 179 179 }
+1 -1
fs/bfs/dir.c
··· 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;
+1 -1
fs/btrfs/inode.c
··· 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;
+1 -1
fs/ceph/dir.c
··· 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",
+1 -1
fs/cifs/cifsfs.h
··· 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 *);
+1 -1
fs/cifs/dir.c
··· 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;
+2 -2
fs/coda/dir.c
··· 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 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;
+1 -1
fs/ecryptfs/inode.c
··· 267 267 */ 268 268 static int 269 269 ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, 270 - int mode, struct nameidata *nd) 270 + umode_t mode, struct nameidata *nd) 271 271 { 272 272 struct inode *ecryptfs_inode; 273 273 int rc;
+1 -1
fs/exofs/namei.c
··· 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);
+1 -1
fs/ext2/namei.c
··· 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
+1 -1
fs/ext3/namei.c
··· 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;
+1 -1
fs/ext4/namei.c
··· 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;
+1 -1
fs/fat/namei_msdos.c
··· 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;
+1 -1
fs/fat/namei_vfat.c
··· 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;
+1 -1
fs/fuse/dir.c
··· 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) {
+1 -1
fs/gfs2/inode.c
··· 760 760 */ 761 761 762 762 static int gfs2_create(struct inode *dir, struct dentry *dentry, 763 - int mode, struct nameidata *nd) 763 + umode_t mode, struct nameidata *nd) 764 764 { 765 765 int excl = 0; 766 766 if (nd && (nd->flags & LOOKUP_EXCL))
+1 -1
fs/hfs/dir.c
··· 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;
+1 -1
fs/hfsplus/dir.c
··· 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);
+1 -1
fs/hostfs/hostfs_kern.c
··· 551 551 return 0; 552 552 } 553 553 554 - int hostfs_create(struct inode *dir, struct dentry *dentry, int mode, 554 + int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 555 555 struct nameidata *nd) 556 556 { 557 557 struct inode *inode;
+1 -1
fs/hpfs/namei.c
··· 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;
+1 -1
fs/hugetlbfs/inode.c
··· 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 }
+3 -3
fs/jffs2/dir.c
··· 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 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;
+1 -1
fs/jfs/namei.c
··· 72 72 * RETURN: Errors from subroutines 73 73 * 74 74 */ 75 - static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, 75 + static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, 76 76 struct nameidata *nd) 77 77 { 78 78 int rc = 0;
+1 -1
fs/logfs/dir.c
··· 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;
+1 -1
fs/minix/namei.c
··· 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);
+1 -1
fs/namei.c
··· 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);
+2 -2
fs/ncpfs/dir.c
··· 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 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);
+6 -6
fs/nfs/dir.c
··· 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 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 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 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;
+1 -1
fs/nilfs2/namei.c
··· 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;
+1 -1
fs/ocfs2/dlmfs/dlmfs.c
··· 536 536 537 537 static int dlmfs_create(struct inode *dir, 538 538 struct dentry *dentry, 539 - int mode, 539 + umode_t mode, 540 540 struct nameidata *nd) 541 541 { 542 542 int status = 0;
+1 -1
fs/ocfs2/namei.c
··· 617 617 618 618 static int ocfs2_create(struct inode *dir, 619 619 struct dentry *dentry, 620 - int mode, 620 + umode_t mode, 621 621 struct nameidata *nd) 622 622 { 623 623 int ret;
+1 -1
fs/omfs/dir.c
··· 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);
+1 -1
fs/ramfs/inode.c
··· 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 }
+1 -1
fs/reiserfs/namei.c
··· 572 572 return 0; 573 573 } 574 574 575 - static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode, 575 + static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, 576 576 struct nameidata *nd) 577 577 { 578 578 int retval;
+1 -1
fs/sysv/namei.c
··· 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 }
+2 -2
fs/ubifs/dir.c
··· 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 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);
+1 -1
fs/udf/namei.c
··· 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;
+1 -1
fs/ufs/namei.c
··· 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;
+1 -1
fs/xfs/xfs_iops.c
··· 231 231 xfs_vn_create( 232 232 struct inode *dir, 233 233 struct dentry *dentry, 234 - int mode, 234 + umode_t mode, 235 235 struct nameidata *nd) 236 236 { 237 237 return xfs_vn_mknod(dir, dentry, mode, 0);
+2 -2
include/linux/fs.h
··· 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 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 *);
+3 -3
include/linux/security.h
··· 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 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 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 }
+2 -2
ipc/mqueue.c
··· 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 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();
+1 -1
mm/shmem.c
··· 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);
+1 -1
security/capability.c
··· 125 125 } 126 126 127 127 static int cap_inode_create(struct inode *inode, struct dentry *dentry, 128 - int mask) 128 + umode_t mask) 129 129 { 130 130 return 0; 131 131 }
+1 -1
security/security.c
··· 475 475 } 476 476 #endif 477 477 478 - int security_inode_create(struct inode *dir, struct dentry *dentry, int mode) 478 + int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode) 479 479 { 480 480 if (unlikely(IS_PRIVATE(dir))) 481 481 return 0;
+1 -1
security/selinux/hooks.c
··· 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 }