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

switch ->mknod() to umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 1a67aafb 4acdaf27

+51 -51
+1 -1
Documentation/filesystems/Locking
··· 45 45 int (*symlink) (struct inode *,struct dentry *,const char *); 46 46 int (*mkdir) (struct inode *,struct dentry *,umode_t); 47 47 int (*rmdir) (struct inode *,struct dentry *); 48 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 48 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 49 49 int (*rename) (struct inode *, struct dentry *, 50 50 struct inode *, struct dentry *); 51 51 int (*readlink) (struct dentry *, char __user *,int);
+1 -1
Documentation/filesystems/vfs.txt
··· 348 348 int (*symlink) (struct inode *,struct dentry *,const char *); 349 349 int (*mkdir) (struct inode *,struct dentry *,umode_t); 350 350 int (*rmdir) (struct inode *,struct dentry *); 351 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 351 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 352 352 int (*rename) (struct inode *, struct dentry *, 353 353 struct inode *, struct dentry *); 354 354 int (*readlink) (struct dentry *, char __user *,int);
+1 -1
fs/9p/vfs_inode.c
··· 1397 1397 */ 1398 1398 1399 1399 static int 1400 - v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 1400 + v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 1401 1401 { 1402 1402 int retval; 1403 1403 char *name;
+3 -3
fs/9p/vfs_inode_dotl.c
··· 48 48 #include "acl.h" 49 49 50 50 static int 51 - v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, 51 + v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, 52 52 dev_t rdev); 53 53 54 54 /** ··· 799 799 * 800 800 */ 801 801 static int 802 - v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, 802 + v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, 803 803 dev_t rdev) 804 804 { 805 805 int err; ··· 814 814 struct posix_acl *dacl = NULL, *pacl = NULL; 815 815 816 816 P9_DPRINTK(P9_DEBUG_VFS, 817 - " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", dir->i_ino, 817 + " %lu,%s mode: %hx MAJOR: %u MINOR: %u\n", dir->i_ino, 818 818 dentry->d_name.name, omode, MAJOR(rdev), MINOR(rdev)); 819 819 820 820 if (!new_valid_dev(rdev))
+1 -1
fs/bad_inode.c
··· 213 213 } 214 214 215 215 static int bad_inode_mknod (struct inode *dir, struct dentry *dentry, 216 - int mode, dev_t rdev) 216 + umode_t mode, dev_t rdev) 217 217 { 218 218 return -EIO; 219 219 }
+1 -1
fs/btrfs/inode.c
··· 4596 4596 } 4597 4597 4598 4598 static int btrfs_mknod(struct inode *dir, struct dentry *dentry, 4599 - int mode, dev_t rdev) 4599 + umode_t mode, dev_t rdev) 4600 4600 { 4601 4601 struct btrfs_trans_handle *trans; 4602 4602 struct btrfs_root *root = BTRFS_I(dir)->root;
+2 -2
fs/ceph/dir.c
··· 666 666 } 667 667 668 668 static int ceph_mknod(struct inode *dir, struct dentry *dentry, 669 - int mode, dev_t rdev) 669 + umode_t mode, dev_t rdev) 670 670 { 671 671 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); 672 672 struct ceph_mds_client *mdsc = fsc->mdsc; ··· 676 676 if (ceph_snap(dir) != CEPH_NOSNAP) 677 677 return -EROFS; 678 678 679 - dout("mknod in dir %p dentry %p mode 0%o rdev %d\n", 679 + dout("mknod in dir %p dentry %p mode 0%ho rdev %d\n", 680 680 dir, dentry, mode, rdev); 681 681 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); 682 682 if (IS_ERR(req)) {
+1 -1
fs/cifs/cifsfs.h
··· 50 50 struct nameidata *); 51 51 extern int cifs_unlink(struct inode *dir, struct dentry *dentry); 52 52 extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); 53 - extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); 53 + extern int cifs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 54 54 extern int cifs_mkdir(struct inode *, struct dentry *, umode_t); 55 55 extern int cifs_rmdir(struct inode *, struct dentry *); 56 56 extern int cifs_rename(struct inode *, struct dentry *, struct inode *,
+1 -1
fs/cifs/dir.c
··· 355 355 return rc; 356 356 } 357 357 358 - int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, 358 + int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode, 359 359 dev_t device_number) 360 360 { 361 361 int rc = -EPERM;
+1 -1
fs/ecryptfs/inode.c
··· 607 607 } 608 608 609 609 static int 610 - ecryptfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 610 + ecryptfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 611 611 { 612 612 int rc; 613 613 struct dentry *lower_dentry;
+1 -1
fs/exofs/namei.c
··· 74 74 return err; 75 75 } 76 76 77 - static int exofs_mknod(struct inode *dir, struct dentry *dentry, int mode, 77 + static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 78 78 dev_t rdev) 79 79 { 80 80 struct inode *inode;
+1 -1
fs/ext2/namei.c
··· 119 119 return ext2_add_nondir(dentry, inode); 120 120 } 121 121 122 - static int ext2_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 122 + static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) 123 123 { 124 124 struct inode * inode; 125 125 int err;
+1 -1
fs/ext3/namei.c
··· 1732 1732 } 1733 1733 1734 1734 static int ext3_mknod (struct inode * dir, struct dentry *dentry, 1735 - int mode, dev_t rdev) 1735 + umode_t mode, dev_t rdev) 1736 1736 { 1737 1737 handle_t *handle; 1738 1738 struct inode *inode;
+1 -1
fs/ext4/namei.c
··· 1770 1770 } 1771 1771 1772 1772 static int ext4_mknod(struct inode *dir, struct dentry *dentry, 1773 - int mode, dev_t rdev) 1773 + umode_t mode, dev_t rdev) 1774 1774 { 1775 1775 handle_t *handle; 1776 1776 struct inode *inode;
+1 -1
fs/fuse/dir.c
··· 547 547 return err; 548 548 } 549 549 550 - static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode, 550 + static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode, 551 551 dev_t rdev) 552 552 { 553 553 struct fuse_mknod_in inarg;
+1 -1
fs/gfs2/inode.c
··· 1143 1143 * 1144 1144 */ 1145 1145 1146 - static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, 1146 + static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 1147 1147 dev_t dev) 1148 1148 { 1149 1149 return gfs2_create_inode(dir, dentry, mode, dev, NULL, 0, 0);
+1 -1
fs/hfsplus/dir.c
··· 424 424 } 425 425 426 426 static int hfsplus_mknod(struct inode *dir, struct dentry *dentry, 427 - int mode, dev_t rdev) 427 + umode_t mode, dev_t rdev) 428 428 { 429 429 struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); 430 430 struct inode *inode;
+1 -1
fs/hostfs/hostfs_kern.c
··· 700 700 return err; 701 701 } 702 702 703 - int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 703 + static int hostfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 704 704 { 705 705 struct inode *inode; 706 706 char *name;
+1 -1
fs/hpfs/namei.c
··· 201 201 return err; 202 202 } 203 203 204 - static int hpfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 204 + static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 205 205 { 206 206 const unsigned char *name = dentry->d_name.name; 207 207 unsigned len = dentry->d_name.len;
+1 -1
fs/hugetlbfs/inode.c
··· 500 500 * File creation. Allocate an inode, and we're done.. 501 501 */ 502 502 static int hugetlbfs_mknod(struct inode *dir, 503 - struct dentry *dentry, int mode, dev_t dev) 503 + struct dentry *dentry, umode_t mode, dev_t dev) 504 504 { 505 505 struct inode *inode; 506 506 int error = -ENOSPC;
+2 -2
fs/jffs2/dir.c
··· 31 31 static int jffs2_symlink (struct inode *,struct dentry *,const char *); 32 32 static int jffs2_mkdir (struct inode *,struct dentry *,umode_t); 33 33 static int jffs2_rmdir (struct inode *,struct dentry *); 34 - static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t); 34 + static int jffs2_mknod (struct inode *,struct dentry *,umode_t,dev_t); 35 35 static int jffs2_rename (struct inode *, struct dentry *, 36 36 struct inode *, struct dentry *); 37 37 ··· 618 618 return ret; 619 619 } 620 620 621 - static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, dev_t rdev) 621 + static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode, dev_t rdev) 622 622 { 623 623 struct jffs2_inode_info *f, *dir_f; 624 624 struct jffs2_sb_info *c;
+1 -1
fs/jfs/namei.c
··· 1353 1353 * FUNCTION: Create a special file (device) 1354 1354 */ 1355 1355 static int jfs_mknod(struct inode *dir, struct dentry *dentry, 1356 - int mode, dev_t rdev) 1356 + umode_t mode, dev_t rdev) 1357 1357 { 1358 1358 struct jfs_inode_info *jfs_ip; 1359 1359 struct btstack btstack;
+1 -1
fs/logfs/dir.c
··· 517 517 return __logfs_create(dir, dentry, inode, NULL, 0); 518 518 } 519 519 520 - static int logfs_mknod(struct inode *dir, struct dentry *dentry, int mode, 520 + static int logfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 521 521 dev_t rdev) 522 522 { 523 523 struct inode *inode;
+1 -1
fs/minix/namei.c
··· 36 36 return NULL; 37 37 } 38 38 39 - static int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 39 + static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) 40 40 { 41 41 int error; 42 42 struct inode *inode;
+1 -1
fs/namei.c
··· 2444 2444 } 2445 2445 EXPORT_SYMBOL(user_path_create); 2446 2446 2447 - int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 2447 + int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 2448 2448 { 2449 2449 int error = may_create(dir, dentry); 2450 2450
+3 -3
fs/ncpfs/dir.c
··· 38 38 static int ncp_rename(struct inode *, struct dentry *, 39 39 struct inode *, struct dentry *); 40 40 static int ncp_mknod(struct inode * dir, struct dentry *dentry, 41 - int mode, dev_t rdev); 41 + umode_t mode, dev_t rdev); 42 42 #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) 43 43 extern int ncp_symlink(struct inode *, struct dentry *, const char *); 44 44 #else ··· 1201 1201 } 1202 1202 1203 1203 static int ncp_mknod(struct inode * dir, struct dentry *dentry, 1204 - int mode, dev_t rdev) 1204 + umode_t mode, dev_t rdev) 1205 1205 { 1206 1206 if (!new_valid_dev(rdev)) 1207 1207 return -EINVAL; 1208 1208 if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) { 1209 - DPRINTK(KERN_DEBUG "ncp_mknod: mode = 0%o\n", mode); 1209 + DPRINTK(KERN_DEBUG "ncp_mknod: mode = 0%ho\n", mode); 1210 1210 return ncp_create_new(dir, dentry, mode, rdev, 0); 1211 1211 } 1212 1212 return -EPERM; /* Strange, but true */
+2 -2
fs/nfs/dir.c
··· 53 53 static int nfs_unlink(struct inode *, struct dentry *); 54 54 static int nfs_symlink(struct inode *, struct dentry *, const char *); 55 55 static int nfs_link(struct dentry *, struct inode *, struct dentry *); 56 - static int nfs_mknod(struct inode *, struct dentry *, int, dev_t); 56 + static int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 57 57 static int nfs_rename(struct inode *, struct dentry *, 58 58 struct inode *, struct dentry *); 59 59 static int nfs_fsync_dir(struct file *, loff_t, loff_t, int); ··· 1693 1693 * See comments for nfs_proc_create regarding failed operations. 1694 1694 */ 1695 1695 static int 1696 - nfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 1696 + nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 1697 1697 { 1698 1698 struct iattr attr; 1699 1699 int status;
+1 -1
fs/nilfs2/namei.c
··· 112 112 } 113 113 114 114 static int 115 - nilfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) 115 + nilfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 116 116 { 117 117 struct inode *inode; 118 118 struct nilfs_transaction_info ti;
+1 -1
fs/ocfs2/namei.c
··· 207 207 208 208 static int ocfs2_mknod(struct inode *dir, 209 209 struct dentry *dentry, 210 - int mode, 210 + umode_t mode, 211 211 dev_t dev) 212 212 { 213 213 int status = 0;
+1 -1
fs/ramfs/inode.c
··· 92 92 */ 93 93 /* SMP-safe */ 94 94 static int 95 - ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 95 + ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 96 96 { 97 97 struct inode * inode = ramfs_get_inode(dir->i_sb, dir, mode, dev); 98 98 int error = -ENOSPC;
+1 -1
fs/reiserfs/namei.c
··· 643 643 return retval; 644 644 } 645 645 646 - static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode, 646 + static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 647 647 dev_t rdev) 648 648 { 649 649 int retval;
+1 -1
fs/sysv/namei.c
··· 61 61 return NULL; 62 62 } 63 63 64 - static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, dev_t rdev) 64 + static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, dev_t rdev) 65 65 { 66 66 struct inode * inode; 67 67 int err;
+1 -1
fs/ubifs/dir.c
··· 769 769 } 770 770 771 771 static int ubifs_mknod(struct inode *dir, struct dentry *dentry, 772 - int mode, dev_t rdev) 772 + umode_t mode, dev_t rdev) 773 773 { 774 774 struct inode *inode; 775 775 struct ubifs_inode *ui;
+1 -1
fs/udf/namei.c
··· 596 596 return 0; 597 597 } 598 598 599 - static int udf_mknod(struct inode *dir, struct dentry *dentry, int mode, 599 + static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 600 600 dev_t rdev) 601 601 { 602 602 struct inode *inode;
+1 -1
fs/ufs/namei.c
··· 94 94 return err; 95 95 } 96 96 97 - static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) 97 + static int ufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) 98 98 { 99 99 struct inode *inode; 100 100 int err;
+1 -1
fs/xfs/xfs_iops.c
··· 168 168 xfs_vn_mknod( 169 169 struct inode *dir, 170 170 struct dentry *dentry, 171 - int mode, 171 + umode_t mode, 172 172 dev_t rdev) 173 173 { 174 174 struct inode *inode;
+2 -2
include/linux/fs.h
··· 1518 1518 */ 1519 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 - extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); 1521 + extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 1522 1522 extern int vfs_symlink(struct inode *, struct dentry *, const char *); 1523 1523 extern int vfs_link(struct dentry *, struct inode *, struct dentry *); 1524 1524 extern int vfs_rmdir(struct inode *, struct dentry *); ··· 1625 1625 int (*symlink) (struct inode *,struct dentry *,const char *); 1626 1626 int (*mkdir) (struct inode *,struct dentry *,umode_t); 1627 1627 int (*rmdir) (struct inode *,struct dentry *); 1628 - int (*mknod) (struct inode *,struct dentry *,int,dev_t); 1628 + int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); 1629 1629 int (*rename) (struct inode *, struct dentry *, 1630 1630 struct inode *, struct dentry *); 1631 1631 void (*truncate) (struct inode *);
+2 -2
include/linux/security.h
··· 1456 1456 int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, umode_t mode); 1457 1457 int (*inode_rmdir) (struct inode *dir, struct dentry *dentry); 1458 1458 int (*inode_mknod) (struct inode *dir, struct dentry *dentry, 1459 - int mode, dev_t dev); 1459 + umode_t mode, dev_t dev); 1460 1460 int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry, 1461 1461 struct inode *new_dir, struct dentry *new_dentry); 1462 1462 int (*inode_readlink) (struct dentry *dentry); ··· 1724 1724 const char *old_name); 1725 1725 int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 1726 1726 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); 1727 + int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev); 1728 1728 int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, 1729 1729 struct inode *new_dir, struct dentry *new_dentry); 1730 1730 int security_inode_readlink(struct dentry *dentry);
+1 -1
mm/shmem.c
··· 1456 1456 * File creation. Allocate an inode, and we're done.. 1457 1457 */ 1458 1458 static int 1459 - shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 1459 + shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 1460 1460 { 1461 1461 struct inode *inode; 1462 1462 int error = -ENOSPC;
+1 -1
security/capability.c
··· 159 159 } 160 160 161 161 static int cap_inode_mknod(struct inode *inode, struct dentry *dentry, 162 - int mode, dev_t dev) 162 + umode_t mode, dev_t dev) 163 163 { 164 164 return 0; 165 165 }
+1 -1
security/security.c
··· 521 521 return security_ops->inode_rmdir(dir, dentry); 522 522 } 523 523 524 - int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 524 + int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 525 525 { 526 526 if (unlikely(IS_PRIVATE(dir))) 527 527 return 0;
+1 -1
security/selinux/hooks.c
··· 2628 2628 return may_link(dir, dentry, MAY_RMDIR); 2629 2629 } 2630 2630 2631 - static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 2631 + static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) 2632 2632 { 2633 2633 return may_create(dir, dentry, inode_mode_to_security_class(mode)); 2634 2634 }