Browse Source

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>
master
Al Viro 10 years ago
parent
commit
4acdaf27eb
  1. 2
      Documentation/filesystems/Locking
  2. 2
      Documentation/filesystems/vfs.txt
  3. 2
      drivers/staging/pohmelfs/dir.c
  4. 2
      fs/9p/vfs_inode.c
  5. 4
      fs/9p/vfs_inode_dotl.c
  6. 2
      fs/affs/affs.h
  7. 4
      fs/affs/namei.c
  8. 6
      fs/afs/dir.c
  9. 2
      fs/bad_inode.c
  10. 2
      fs/bfs/dir.c
  11. 2
      fs/btrfs/inode.c
  12. 2
      fs/ceph/dir.c
  13. 2
      fs/cifs/cifsfs.h
  14. 2
      fs/cifs/dir.c
  15. 4
      fs/coda/dir.c
  16. 2
      fs/ecryptfs/inode.c
  17. 2
      fs/exofs/namei.c
  18. 2
      fs/ext2/namei.c
  19. 2
      fs/ext3/namei.c
  20. 2
      fs/ext4/namei.c
  21. 2
      fs/fat/namei_msdos.c
  22. 2
      fs/fat/namei_vfat.c
  23. 2
      fs/fuse/dir.c
  24. 2
      fs/gfs2/inode.c
  25. 2
      fs/hfs/dir.c
  26. 2
      fs/hfsplus/dir.c
  27. 2
      fs/hostfs/hostfs_kern.c
  28. 2
      fs/hpfs/namei.c
  29. 2
      fs/hugetlbfs/inode.c
  30. 6
      fs/jffs2/dir.c
  31. 2
      fs/jfs/namei.c
  32. 2
      fs/logfs/dir.c
  33. 2
      fs/minix/namei.c
  34. 2
      fs/namei.c
  35. 4
      fs/ncpfs/dir.c
  36. 12
      fs/nfs/dir.c
  37. 2
      fs/nilfs2/namei.c
  38. 2
      fs/ocfs2/dlmfs/dlmfs.c
  39. 2
      fs/ocfs2/namei.c
  40. 2
      fs/omfs/dir.c
  41. 2
      fs/ramfs/inode.c
  42. 2
      fs/reiserfs/namei.c
  43. 2
      fs/sysv/namei.c
  44. 4
      fs/ubifs/dir.c
  45. 2
      fs/udf/namei.c
  46. 2
      fs/ufs/namei.c
  47. 2
      fs/xfs/xfs_iops.c
  48. 4
      include/linux/fs.h
  49. 6
      include/linux/security.h
  50. 4
      ipc/mqueue.c
  51. 2
      mm/shmem.c
  52. 2
      security/capability.c
  53. 2
      security/security.c
  54. 2
      security/selinux/hooks.c

2
Documentation/filesystems/Locking

@ -37,7 +37,7 @@ d_manage: no no yes (ref-walk) maybe
--------------------------- inode_operations ---------------------------
prototypes:
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid
ata *);
int (*link) (struct dentry *,struct inode *,struct dentry *);

2
Documentation/filesystems/vfs.txt

@ -341,7 +341,7 @@ This describes how the VFS can manipulate an inode in your
filesystem. As of kernel 2.6.22, the following members are defined:
struct inode_operations {
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *);

2
drivers/staging/pohmelfs/dir.c

@ -661,7 +661,7 @@ static int pohmelfs_create_entry(struct inode *dir, struct dentry *dentry, u64 s
/*
* VFS create and mkdir callbacks.
*/
static int pohmelfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int pohmelfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return pohmelfs_create_entry(dir, dentry, 0, mode);

2
fs/9p/vfs_inode.c

@ -702,7 +702,7 @@ error:
*/
static int
v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
int err;

4
fs/9p/vfs_inode_dotl.c

@ -253,7 +253,7 @@ int v9fs_open_to_dotl_flags(int flags)
*/
static int
v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
struct nameidata *nd)
{
int err = 0;
@ -284,7 +284,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
name = (char *) dentry->d_name.name;
P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x "
"mode:0x%x\n", name, flags, omode);
"mode:0x%hx\n", name, flags, omode);
dfid = v9fs_fid_lookup(dentry->d_parent);
if (IS_ERR(dfid)) {

2
fs/affs/affs.h

@ -156,7 +156,7 @@ extern void affs_free_bitmap(struct super_block *sb);
extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *);
extern int affs_unlink(struct inode *dir, struct dentry *dentry);
extern int affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *);
extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
extern int affs_link(struct dentry *olddentry, struct inode *dir,

4
fs/affs/namei.c

@ -255,13 +255,13 @@ affs_unlink(struct inode *dir, struct dentry *dentry)
}
int
affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
{
struct super_block *sb = dir->i_sb;
struct inode *inode;
int error;
pr_debug("AFFS: create(%lu,\"%.*s\",0%o)\n",dir->i_ino,(int)dentry->d_name.len,
pr_debug("AFFS: create(%lu,\"%.*s\",0%ho)\n",dir->i_ino,(int)dentry->d_name.len,
dentry->d_name.name,mode);
inode = affs_new_inode(dir);

6
fs/afs/dir.c

@ -28,7 +28,7 @@ static int afs_d_delete(const struct dentry *dentry);
static void afs_d_release(struct dentry *dentry);
static int afs_lookup_filldir(void *_cookie, const char *name, int nlen,
loff_t fpos, u64 ino, unsigned dtype);
static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd);
static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
static int afs_rmdir(struct inode *dir, struct dentry *dentry);
@ -948,7 +948,7 @@ error:
/*
* create a regular file on an AFS filesystem
*/
static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct afs_file_status status;
@ -962,7 +962,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
dvnode = AFS_FS_I(dir);
_enter("{%x:%u},{%s},%o,",
_enter("{%x:%u},{%s},%ho,",
dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
ret = -ENAMETOOLONG;

2
fs/bad_inode.c

@ -173,7 +173,7 @@ static const struct file_operations bad_file_ops =
};
static int bad_inode_create (struct inode *dir, struct dentry *dentry,
int mode, struct nameidata *nd)
umode_t mode, struct nameidata *nd)
{
return -EIO;
}

2
fs/bfs/dir.c

@ -84,7 +84,7 @@ const struct file_operations bfs_dir_operations = {
extern void dump_imap(const char *, struct super_block *);
static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
int err;

2
fs/btrfs/inode.c

@ -4665,7 +4665,7 @@ out_unlock:
}
static int btrfs_create(struct inode *dir, struct dentry *dentry,
int mode, struct nameidata *nd)
umode_t mode, struct nameidata *nd)
{
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(dir)->root;

2
fs/ceph/dir.c

@ -699,7 +699,7 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry,
return err;
}
static int ceph_create(struct inode *dir, struct dentry *dentry, int mode,
static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
dout("create in dir %p dentry %p name '%.*s'\n",

2
fs/cifs/cifsfs.h

@ -44,7 +44,7 @@ extern const struct address_space_operations cifs_addr_ops_smallbuf;
/* Functions related to inodes */
extern const struct inode_operations cifs_dir_inode_ops;
extern struct inode *cifs_root_iget(struct super_block *);
extern int cifs_create(struct inode *, struct dentry *, int,
extern int cifs_create(struct inode *, struct dentry *, umode_t,
struct nameidata *);
extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
struct nameidata *);

2
fs/cifs/dir.c

@ -136,7 +136,7 @@ cifs_bp_rename_retry:
/* Inode operations in similar order to how they appear in Linux file fs.h */
int
cifs_create(struct inode *inode, struct dentry *direntry, int mode,
cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode,
struct nameidata *nd)
{
int rc = -ENOENT;

4
fs/coda/dir.c

@ -30,7 +30,7 @@
#include "coda_int.h"
/* dir inode-ops */
static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd);
static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd);
static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd);
static int coda_link(struct dentry *old_dentry, struct inode *dir_inode,
struct dentry *entry);
@ -191,7 +191,7 @@ static inline void coda_dir_drop_nlink(struct inode *dir)
}
/* creation routines: create, mknod, mkdir, link, symlink */
static int coda_create(struct inode *dir, struct dentry *de, int mode, struct nameidata *nd)
static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd)
{
int error;
const char *name=de->d_name.name;

2
fs/ecryptfs/inode.c

@ -267,7 +267,7 @@ out:
*/
static int
ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
int mode, struct nameidata *nd)
umode_t mode, struct nameidata *nd)
{
struct inode *ecryptfs_inode;
int rc;

2
fs/exofs/namei.c

@ -59,7 +59,7 @@ static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry,
return d_splice_alias(inode, dentry);
}
static int exofs_create(struct inode *dir, struct dentry *dentry, int mode,
static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode = exofs_new_inode(dir, mode);

2
fs/ext2/namei.c

@ -94,7 +94,7 @@ struct dentry *ext2_get_parent(struct dentry *child)
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd)
static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd)
{
struct inode *inode;

2
fs/ext3/namei.c

@ -1698,7 +1698,7 @@ static int ext3_add_nondir(handle_t *handle,
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
static int ext3_create (struct inode * dir, struct dentry * dentry, int mode,
static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode,
struct nameidata *nd)
{
handle_t *handle;

2
fs/ext4/namei.c

@ -1736,7 +1736,7 @@ static int ext4_add_nondir(handle_t *handle,
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
static int ext4_create(struct inode *dir, struct dentry *dentry, int mode,
static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
handle_t *handle;

2
fs/fat/namei_msdos.c

@ -264,7 +264,7 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
}
/***** Create a file */
static int msdos_create(struct inode *dir, struct dentry *dentry, int mode,
static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct super_block *sb = dir->i_sb;

2
fs/fat/namei_vfat.c

@ -781,7 +781,7 @@ error:
return ERR_PTR(err);
}
static int vfat_create(struct inode *dir, struct dentry *dentry, int mode,
static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct super_block *sb = dir->i_sb;

2
fs/fuse/dir.c

@ -573,7 +573,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode,
return create_new_entry(fc, req, dir, entry, mode);
}
static int fuse_create(struct inode *dir, struct dentry *entry, int mode,
static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode,
struct nameidata *nd)
{
if (nd) {

2
fs/gfs2/inode.c

@ -760,7 +760,7 @@ fail:
*/
static int gfs2_create(struct inode *dir, struct dentry *dentry,
int mode, struct nameidata *nd)
umode_t mode, struct nameidata *nd)
{
int excl = 0;
if (nd && (nd->flags & LOOKUP_EXCL))

2
fs/hfs/dir.c

@ -186,7 +186,7 @@ static int hfs_dir_release(struct inode *inode, struct file *file)
* a directory and return a corresponding inode, given the inode for
* the directory and the name (and its length) of the new file.
*/
static int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;

2
fs/hfsplus/dir.c

@ -453,7 +453,7 @@ out:
return res;
}
static int hfsplus_create(struct inode *dir, struct dentry *dentry, int mode,
static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return hfsplus_mknod(dir, dentry, mode, 0);

2
fs/hostfs/hostfs_kern.c

@ -551,7 +551,7 @@ static int read_name(struct inode *ino, char *name)
return 0;
}
int hostfs_create(struct inode *dir, struct dentry *dentry, int mode,
int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;

2
fs/hpfs/namei.c

@ -115,7 +115,7 @@ bail:
return err;
}
static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
{
const unsigned char *name = dentry->d_name.name;
unsigned len = dentry->d_name.len;

2
fs/hugetlbfs/inode.c

@ -531,7 +531,7 @@ static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mod
return retval;
}
static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
{
return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0);
}

6
fs/jffs2/dir.c

@ -22,7 +22,7 @@
static int jffs2_readdir (struct file *, void *, filldir_t);
static int jffs2_create (struct inode *,struct dentry *,int,
static int jffs2_create (struct inode *,struct dentry *,umode_t,
struct nameidata *);
static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
struct nameidata *);
@ -169,8 +169,8 @@ static int jffs2_readdir(struct file *filp, void *dirent, filldir_t filldir)
/***********************************************************************/
static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode,
struct nameidata *nd)
static int jffs2_create(struct inode *dir_i, struct dentry *dentry,
umode_t mode, struct nameidata *nd)
{
struct jffs2_raw_inode *ri;
struct jffs2_inode_info *f, *dir_f;

2
fs/jfs/namei.c

@ -72,7 +72,7 @@ static inline void free_ea_wmap(struct inode *inode)
* RETURN: Errors from subroutines
*
*/
static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
int rc = 0;

2
fs/logfs/dir.c

@ -501,7 +501,7 @@ static int logfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return __logfs_create(dir, dentry, inode, NULL, 0);
}
static int logfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;

2
fs/minix/namei.c

@ -54,7 +54,7 @@ static int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, dev_
return error;
}
static int minix_create(struct inode * dir, struct dentry *dentry, int mode,
static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return minix_mknod(dir, dentry, mode, 0);

2
fs/namei.c

@ -1976,7 +1976,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2)
}
}
int vfs_create(struct inode *dir, struct dentry *dentry, int mode,
int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
int error = may_create(dir, dentry);

4
fs/ncpfs/dir.c

@ -30,7 +30,7 @@ static void ncp_do_readdir(struct file *, void *, filldir_t,
static int ncp_readdir(struct file *, void *, filldir_t);
static int ncp_create(struct inode *, struct dentry *, int, struct nameidata *);
static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *);
static int ncp_unlink(struct inode *, struct dentry *);
static int ncp_mkdir(struct inode *, struct dentry *, umode_t);
@ -979,7 +979,7 @@ out:
return error;
}
static int ncp_create(struct inode *dir, struct dentry *dentry, int mode,
static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return ncp_create_new(dir, dentry, mode, 0, 0);

12
fs/nfs/dir.c

@ -47,7 +47,7 @@ static int nfs_opendir(struct inode *, struct file *);
static int nfs_closedir(struct inode *, struct file *);
static int nfs_readdir(struct file *, void *, filldir_t);
static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *);
static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *);
static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
static int nfs_mkdir(struct inode *, struct dentry *, umode_t);
static int nfs_rmdir(struct inode *, struct dentry *);
static int nfs_unlink(struct inode *, struct dentry *);
@ -112,7 +112,7 @@ const struct inode_operations nfs3_dir_inode_operations = {
#ifdef CONFIG_NFS_V4
static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *);
static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
static int nfs_open_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd);
const struct inode_operations nfs4_dir_inode_operations = {
.create = nfs_open_create,
.lookup = nfs_atomic_lookup,
@ -1573,8 +1573,8 @@ no_open:
return nfs_lookup_revalidate(dentry, nd);
}
static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode,
struct nameidata *nd)
static int nfs_open_create(struct inode *dir, struct dentry *dentry,
umode_t mode, struct nameidata *nd)
{
struct nfs_open_context *ctx = NULL;
struct iattr attr;
@ -1664,8 +1664,8 @@ out_error:
* that the operation succeeded on the server, but an error in the
* reply path made it appear to have failed.
*/
static int nfs_create(struct inode *dir, struct dentry *dentry, int mode,
struct nameidata *nd)
static int nfs_create(struct inode *dir, struct dentry *dentry,
umode_t mode, struct nameidata *nd)
{
struct iattr attr;
int error;

2
fs/nilfs2/namei.c

@ -84,7 +84,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
static int nilfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;

2
fs/ocfs2/dlmfs/dlmfs.c

@ -536,7 +536,7 @@ bail:
static int dlmfs_create(struct inode *dir,
struct dentry *dentry,
int mode,
umode_t mode,
struct nameidata *nd)
{
int status = 0;

2
fs/ocfs2/namei.c

@ -617,7 +617,7 @@ static int ocfs2_mkdir(struct inode *dir,
static int ocfs2_create(struct inode *dir,
struct dentry *dentry,
int mode,
umode_t mode,
struct nameidata *nd)
{
int ret;

2
fs/omfs/dir.c

@ -284,7 +284,7 @@ static int omfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return omfs_add_node(dir, dentry, mode | S_IFDIR);
}
static int omfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return omfs_add_node(dir, dentry, mode | S_IFREG);

2
fs/ramfs/inode.c

@ -114,7 +114,7 @@ static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
return retval;
}
static int ramfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
{
return ramfs_mknod(dir, dentry, mode | S_IFREG, 0);
}

2
fs/reiserfs/namei.c

@ -572,7 +572,7 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode)
return 0;
}
static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,
static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
int retval;

2
fs/sysv/namei.c

@ -80,7 +80,7 @@ static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, dev_
return err;
}
static int sysv_create(struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd)
static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd)
{
return sysv_mknod(dir, dentry, mode, 0);
}

4
fs/ubifs/dir.c

@ -253,7 +253,7 @@ out:
return ERR_PTR(err);
}
static int ubifs_create(struct inode *dir, struct dentry *dentry, int mode,
static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;
@ -268,7 +268,7 @@ static int ubifs_create(struct inode *dir, struct dentry *dentry, int mode,
* parent directory inode.
*/
dbg_gen("dent '%.*s', mode %#x in dir ino %lu",
dbg_gen("dent '%.*s', mode %#hx in dir ino %lu",
dentry->d_name.len, dentry->d_name.name, mode, dir->i_ino);
err = ubifs_budget_space(c, &req);

2
fs/udf/namei.c

@ -552,7 +552,7 @@ static int udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi,
return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL);
}
static int udf_create(struct inode *dir, struct dentry *dentry, int mode,
static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
struct udf_fileident_bh fibh;

2
fs/ufs/namei.c

@ -70,7 +70,7 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
static int ufs_create (struct inode * dir, struct dentry * dentry, int mode,
static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode,
struct nameidata *nd)
{
struct inode *inode;

2
fs/xfs/xfs_iops.c

@ -231,7 +231,7 @@ STATIC int
xfs_vn_create(
struct inode *dir,
struct dentry *dentry,
int mode,
umode_t mode,
struct nameidata *nd)
{
return xfs_vn_mknod(dir, dentry, mode, 0);

4
include/linux/fs.h

@ -1516,7 +1516,7 @@ extern void unlock_super(struct super_block *);
/*
* VFS helper functions..
*/
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);
extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
extern int vfs_symlink(struct inode *, struct dentry *, const char *);
@ -1619,7 +1619,7 @@ struct inode_operations {
int (*readlink) (struct dentry *, char __user *,int);
void (*put_link) (struct dentry *, struct nameidata *, void *);
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *);
int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *);

6
include/linux/security.h

@ -1447,7 +1447,7 @@ struct security_operations {
const struct qstr *qstr, char **name,
void **value, size_t *len);
int (*inode_create) (struct inode *dir,
struct dentry *dentry, int mode);
struct dentry *dentry, umode_t mode);
int (*inode_link) (struct dentry *old_dentry,
struct inode *dir, struct dentry *new_dentry);
int (*inode_unlink) (struct inode *dir, struct dentry *dentry);
@ -1716,7 +1716,7 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
int security_old_inode_init_security(struct inode *inode, struct inode *dir,
const struct qstr *qstr, char **name,
void **value, size_t *len);
int security_inode_create(struct inode *dir, struct dentry *dentry, int mode);
int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode);
int security_inode_link(struct dentry *old_dentry, struct inode *dir,
struct dentry *new_dentry);
int security_inode_unlink(struct inode *dir, struct dentry *dentry);
@ -2061,7 +2061,7 @@ static inline int security_old_inode_init_security(struct inode *inode,
static inline int security_inode_create(struct inode *dir,
struct dentry *dentry,
int mode)
umode_t mode)
{
return 0;
}

4
ipc/mqueue.c

@ -295,7 +295,7 @@ static void mqueue_evict_inode(struct inode *inode)
}
static int mqueue_create(struct inode *dir, struct dentry *dentry,
int mode, struct nameidata *nd)
umode_t mode, struct nameidata *nd)
{
struct inode *inode;
struct mq_attr *attr = dentry->d_fsdata;
@ -610,7 +610,7 @@ static int mq_attr_ok(struct ipc_namespace *ipc_ns, struct mq_attr *attr)
* Invoked when creating a new queue via sys_mq_open
*/
static struct file *do_create(struct ipc_namespace *ipc_ns, struct dentry *dir,
struct dentry *dentry, int oflag, mode_t mode,
struct dentry *dentry, int oflag, umode_t mode,
struct mq_attr *attr)
{
const struct cred *cred = current_cred();

2
mm/shmem.c

@ -1499,7 +1499,7 @@ static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return 0;
}
static int shmem_create(struct inode *dir, struct dentry *dentry, int mode,
static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode,
struct nameidata *nd)
{
return shmem_mknod(dir, dentry, mode | S_IFREG, 0);

2
security/capability.c

@ -125,7 +125,7 @@ static int cap_inode_init_security(struct inode *inode, struct inode *dir,
}
static int cap_inode_create(struct inode *inode, struct dentry *dentry,
int mask)
umode_t mask)
{
return 0;
}

2
security/security.c

@ -475,7 +475,7 @@ int security_path_chroot(struct path *path)
}
#endif
int security_inode_create(struct inode *dir, struct dentry *dentry, int mode)
int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode)
{
if (unlikely(IS_PRIVATE(dir)))
return 0;

2
security/selinux/hooks.c

@ -2598,7 +2598,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
return 0;
}
static int selinux_inode_create(struct inode *dir, struct dentry *dentry, int mask)
static int selinux_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode)
{
return may_create(dir, dentry, SECCLASS_FILE);
}

Loading…
Cancel
Save