switch vfs_mkdir() and ->mkdir() to umode_t

vfs_mkdir() gets int, but immediately drops everything that might not
fit into umode_t and that's the only caller of ->mkdir()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2011-07-26 01:41:39 -04:00
Родитель 8208a22bb8
Коммит 18bb1db3e7
56 изменённых файлов: 70 добавлений и 70 удалений

Просмотреть файл

@ -43,7 +43,7 @@ ata *);
int (*link) (struct dentry *,struct inode *,struct dentry *); int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *); int (*symlink) (struct inode *,struct dentry *,const char *);
int (*mkdir) (struct inode *,struct dentry *,int); int (*mkdir) (struct inode *,struct dentry *,umode_t);
int (*rmdir) (struct inode *,struct dentry *); int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*mknod) (struct inode *,struct dentry *,int,dev_t);
int (*rename) (struct inode *, struct dentry *, int (*rename) (struct inode *, struct dentry *,

Просмотреть файл

@ -346,7 +346,7 @@ struct inode_operations {
int (*link) (struct dentry *,struct inode *,struct dentry *); int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *); int (*symlink) (struct inode *,struct dentry *,const char *);
int (*mkdir) (struct inode *,struct dentry *,int); int (*mkdir) (struct inode *,struct dentry *,umode_t);
int (*rmdir) (struct inode *,struct dentry *); int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*mknod) (struct inode *,struct dentry *,int,dev_t);
int (*rename) (struct inode *, struct dentry *, int (*rename) (struct inode *, struct dentry *,

Просмотреть файл

@ -667,7 +667,7 @@ static int pohmelfs_create(struct inode *dir, struct dentry *dentry, int mode,
return pohmelfs_create_entry(dir, dentry, 0, mode); return pohmelfs_create_entry(dir, dentry, 0, mode);
} }
static int pohmelfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int pohmelfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int err; int err;

Просмотреть файл

@ -785,7 +785,7 @@ error:
* *
*/ */
static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int err; int err;
u32 perm; u32 perm;

Просмотреть файл

@ -395,7 +395,7 @@ err_clunk_old_fid:
*/ */
static int v9fs_vfs_mkdir_dotl(struct inode *dir, static int v9fs_vfs_mkdir_dotl(struct inode *dir,
struct dentry *dentry, int omode) struct dentry *dentry, umode_t omode)
{ {
int err; int err;
struct v9fs_session_info *v9ses; struct v9fs_session_info *v9ses;

Просмотреть файл

@ -157,7 +157,7 @@ extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int l
extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *); 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_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, int mode, struct nameidata *);
extern int affs_mkdir(struct inode *dir, struct dentry *dentry, int mode); 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_rmdir(struct inode *dir, struct dentry *dentry);
extern int affs_link(struct dentry *olddentry, struct inode *dir, extern int affs_link(struct dentry *olddentry, struct inode *dir,
struct dentry *dentry); struct dentry *dentry);

Просмотреть файл

@ -285,12 +285,12 @@ affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata
} }
int int
affs_mkdir(struct inode *dir, struct dentry *dentry, int mode) affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
int error; int error;
pr_debug("AFFS: mkdir(%lu,\"%.*s\",0%o)\n",dir->i_ino, pr_debug("AFFS: mkdir(%lu,\"%.*s\",0%ho)\n",dir->i_ino,
(int)dentry->d_name.len,dentry->d_name.name,mode); (int)dentry->d_name.len,dentry->d_name.name,mode);
inode = affs_new_inode(dir); inode = affs_new_inode(dir);

Просмотреть файл

@ -30,7 +30,7 @@ static int afs_lookup_filldir(void *_cookie, const char *name, int nlen,
loff_t fpos, u64 ino, unsigned dtype); 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, int mode,
struct nameidata *nd); struct nameidata *nd);
static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode); static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
static int afs_rmdir(struct inode *dir, struct dentry *dentry); static int afs_rmdir(struct inode *dir, struct dentry *dentry);
static int afs_unlink(struct inode *dir, struct dentry *dentry); static int afs_unlink(struct inode *dir, struct dentry *dentry);
static int afs_link(struct dentry *from, struct inode *dir, static int afs_link(struct dentry *from, struct inode *dir,
@ -764,7 +764,7 @@ static void afs_d_release(struct dentry *dentry)
/* /*
* create a directory on an AFS filesystem * create a directory on an AFS filesystem
*/ */
static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct afs_file_status status; struct afs_file_status status;
struct afs_callback cb; struct afs_callback cb;
@ -777,7 +777,7 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
dvnode = AFS_FS_I(dir); 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); dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
ret = -ENAMETOOLONG; ret = -ENAMETOOLONG;

Просмотреть файл

@ -26,7 +26,7 @@
static int autofs4_dir_symlink(struct inode *,struct dentry *,const char *); static int autofs4_dir_symlink(struct inode *,struct dentry *,const char *);
static int autofs4_dir_unlink(struct inode *,struct dentry *); static int autofs4_dir_unlink(struct inode *,struct dentry *);
static int autofs4_dir_rmdir(struct inode *,struct dentry *); static int autofs4_dir_rmdir(struct inode *,struct dentry *);
static int autofs4_dir_mkdir(struct inode *,struct dentry *,int); static int autofs4_dir_mkdir(struct inode *,struct dentry *,umode_t);
static long autofs4_root_ioctl(struct file *,unsigned int,unsigned long); static long autofs4_root_ioctl(struct file *,unsigned int,unsigned long);
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long); static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long);
@ -699,7 +699,7 @@ static int autofs4_dir_rmdir(struct inode *dir, struct dentry *dentry)
return 0; return 0;
} }
static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct autofs_sb_info *sbi = autofs4_sbi(dir->i_sb); struct autofs_sb_info *sbi = autofs4_sbi(dir->i_sb);
struct autofs_info *ino = autofs4_dentry_ino(dentry); struct autofs_info *ino = autofs4_dentry_ino(dentry);

Просмотреть файл

@ -202,7 +202,7 @@ static int bad_inode_symlink (struct inode *dir, struct dentry *dentry,
} }
static int bad_inode_mkdir(struct inode *dir, struct dentry *dentry, static int bad_inode_mkdir(struct inode *dir, struct dentry *dentry,
int mode) umode_t mode)
{ {
return -EIO; return -EIO;
} }

Просмотреть файл

@ -4792,7 +4792,7 @@ fail:
return err; return err;
} }
static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode = NULL; struct inode *inode = NULL;
struct btrfs_trans_handle *trans; struct btrfs_trans_handle *trans;

Просмотреть файл

@ -753,7 +753,7 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry,
return err; return err;
} }
static int ceph_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
struct ceph_mds_client *mdsc = fsc->mdsc; struct ceph_mds_client *mdsc = fsc->mdsc;
@ -767,7 +767,7 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, int mode)
dout("mksnap dir %p snap '%.*s' dn %p\n", dir, dout("mksnap dir %p snap '%.*s' dn %p\n", dir,
dentry->d_name.len, dentry->d_name.name, dentry); dentry->d_name.len, dentry->d_name.name, dentry);
} else if (ceph_snap(dir) == CEPH_NOSNAP) { } else if (ceph_snap(dir) == CEPH_NOSNAP) {
dout("mkdir dir %p dn %p mode 0%o\n", dir, dentry, mode); dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode);
op = CEPH_MDS_OP_MKDIR; op = CEPH_MDS_OP_MKDIR;
} else { } else {
goto out; goto out;

Просмотреть файл

@ -51,7 +51,7 @@ extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
extern int cifs_unlink(struct inode *dir, struct dentry *dentry); extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *);
extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t);
extern int cifs_mkdir(struct inode *, struct dentry *, int); extern int cifs_mkdir(struct inode *, struct dentry *, umode_t);
extern int cifs_rmdir(struct inode *, struct dentry *); extern int cifs_rmdir(struct inode *, struct dentry *);
extern int cifs_rename(struct inode *, struct dentry *, struct inode *, extern int cifs_rename(struct inode *, struct dentry *, struct inode *,
struct dentry *); struct dentry *);

Просмотреть файл

@ -1264,7 +1264,7 @@ unlink_out:
return rc; return rc;
} }
int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode)
{ {
int rc = 0, tmprc; int rc = 0, tmprc;
int xid; int xid;
@ -1275,7 +1275,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
struct inode *newinode = NULL; struct inode *newinode = NULL;
struct cifs_fattr fattr; struct cifs_fattr fattr;
cFYI(1, "In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode); cFYI(1, "In cifs_mkdir, mode = 0x%hx inode = 0x%p", mode, inode);
cifs_sb = CIFS_SB(inode->i_sb); cifs_sb = CIFS_SB(inode->i_sb);
tlink = cifs_sb_tlink(cifs_sb); tlink = cifs_sb_tlink(cifs_sb);

Просмотреть файл

@ -37,7 +37,7 @@ static int coda_link(struct dentry *old_dentry, struct inode *dir_inode,
static int coda_unlink(struct inode *dir_inode, struct dentry *entry); static int coda_unlink(struct inode *dir_inode, struct dentry *entry);
static int coda_symlink(struct inode *dir_inode, struct dentry *entry, static int coda_symlink(struct inode *dir_inode, struct dentry *entry,
const char *symname); const char *symname);
static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, int mode); static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, umode_t mode);
static int coda_rmdir(struct inode *dir_inode, struct dentry *entry); static int coda_rmdir(struct inode *dir_inode, struct dentry *entry);
static int coda_rename(struct inode *old_inode, struct dentry *old_dentry, static int coda_rename(struct inode *old_inode, struct dentry *old_dentry,
struct inode *new_inode, struct dentry *new_dentry); struct inode *new_inode, struct dentry *new_dentry);
@ -223,7 +223,7 @@ err_out:
return error; return error;
} }
static int coda_mkdir(struct inode *dir, struct dentry *de, int mode) static int coda_mkdir(struct inode *dir, struct dentry *de, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
struct coda_vattr attrs; struct coda_vattr attrs;

Просмотреть файл

@ -1170,7 +1170,7 @@ void configfs_undepend_item(struct configfs_subsystem *subsys,
} }
EXPORT_SYMBOL(configfs_undepend_item); EXPORT_SYMBOL(configfs_undepend_item);
static int configfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int configfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int ret = 0; int ret = 0;
int module_got = 0; int module_got = 0;

Просмотреть файл

@ -559,7 +559,7 @@ out_lock:
return rc; return rc;
} }
static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int rc; int rc;
struct dentry *lower_dentry; struct dentry *lower_dentry;

Просмотреть файл

@ -153,7 +153,7 @@ static int exofs_link(struct dentry *old_dentry, struct inode *dir,
return exofs_add_nondir(dentry, inode); return exofs_add_nondir(dentry, inode);
} }
static int exofs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int exofs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
int err = -EMLINK; int err = -EMLINK;

Просмотреть файл

@ -214,7 +214,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir,
return err; return err;
} }
static int ext2_mkdir(struct inode * dir, struct dentry * dentry, int mode) static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
{ {
struct inode * inode; struct inode * inode;
int err = -EMLINK; int err = -EMLINK;

Просмотреть файл

@ -1768,7 +1768,7 @@ retry:
return err; return err;
} }
static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode) static int ext3_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
{ {
handle_t *handle; handle_t *handle;
struct inode * inode; struct inode * inode;

Просмотреть файл

@ -1806,7 +1806,7 @@ retry:
return err; return err;
} }
static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
handle_t *handle; handle_t *handle;
struct inode *inode; struct inode *inode;

Просмотреть файл

@ -346,7 +346,7 @@ out:
} }
/***** Make a directory */ /***** Make a directory */
static int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int msdos_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct fat_slot_info sinfo; struct fat_slot_info sinfo;

Просмотреть файл

@ -870,7 +870,7 @@ out:
return err; return err;
} }
static int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct inode *inode; struct inode *inode;

Просмотреть файл

@ -585,7 +585,7 @@ static int fuse_create(struct inode *dir, struct dentry *entry, int mode,
return fuse_mknod(dir, entry, mode, 0); return fuse_mknod(dir, entry, mode, 0);
} }
static int fuse_mkdir(struct inode *dir, struct dentry *entry, int mode) static int fuse_mkdir(struct inode *dir, struct dentry *entry, umode_t mode)
{ {
struct fuse_mkdir_in inarg; struct fuse_mkdir_in inarg;
struct fuse_conn *fc = get_fuse_conn(dir); struct fuse_conn *fc = get_fuse_conn(dir);

Просмотреть файл

@ -1129,7 +1129,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry,
* Returns: errno * Returns: errno
*/ */
static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
return gfs2_create_inode(dir, dentry, S_IFDIR | mode, 0, NULL, 0, 0); return gfs2_create_inode(dir, dentry, S_IFDIR | mode, 0, NULL, 0, 0);
} }

Просмотреть файл

@ -216,7 +216,7 @@ static int hfs_create(struct inode *dir, struct dentry *dentry, int mode,
* in a directory, given the inode for the parent directory and the * in a directory, given the inode for the parent directory and the
* name (and its length) of the new directory. * name (and its length) of the new directory.
*/ */
static int hfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
int res; int res;

Просмотреть файл

@ -459,7 +459,7 @@ static int hfsplus_create(struct inode *dir, struct dentry *dentry, int mode,
return hfsplus_mknod(dir, dentry, mode, 0); return hfsplus_mknod(dir, dentry, mode, 0);
} }
static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
return hfsplus_mknod(dir, dentry, mode | S_IFDIR, 0); return hfsplus_mknod(dir, dentry, mode | S_IFDIR, 0);
} }

Просмотреть файл

@ -676,7 +676,7 @@ int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to)
return err; return err;
} }
int hostfs_mkdir(struct inode *ino, struct dentry *dentry, int mode) int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
{ {
char *file; char *file;
int err; int err;

Просмотреть файл

@ -8,7 +8,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include "hpfs_fn.h" #include "hpfs_fn.h"
static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
const unsigned char *name = dentry->d_name.name; const unsigned char *name = dentry->d_name.name;
unsigned len = dentry->d_name.len; unsigned len = dentry->d_name.len;

Просмотреть файл

@ -523,7 +523,7 @@ static int hugetlbfs_mknod(struct inode *dir,
return error; return error;
} }
static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int retval = hugetlbfs_mknod(dir, dentry, mode | S_IFDIR, 0); int retval = hugetlbfs_mknod(dir, dentry, mode | S_IFDIR, 0);
if (!retval) if (!retval)

Просмотреть файл

@ -29,7 +29,7 @@ static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
static int jffs2_link (struct dentry *,struct inode *,struct dentry *); static int jffs2_link (struct dentry *,struct inode *,struct dentry *);
static int jffs2_unlink (struct inode *,struct dentry *); static int jffs2_unlink (struct inode *,struct dentry *);
static int jffs2_symlink (struct inode *,struct dentry *,const char *); static int jffs2_symlink (struct inode *,struct dentry *,const char *);
static int jffs2_mkdir (struct inode *,struct dentry *,int); static int jffs2_mkdir (struct inode *,struct dentry *,umode_t);
static int jffs2_rmdir (struct inode *,struct dentry *); static int jffs2_rmdir (struct inode *,struct dentry *);
static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t); static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t);
static int jffs2_rename (struct inode *, struct dentry *, static int jffs2_rename (struct inode *, struct dentry *,
@ -450,7 +450,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
} }
static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, umode_t mode)
{ {
struct jffs2_inode_info *f, *dir_f; struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c; struct jffs2_sb_info *c;

Просмотреть файл

@ -205,7 +205,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
* note: * note:
* EACCESS: user needs search+write permission on the parent directory * EACCESS: user needs search+write permission on the parent directory
*/ */
static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
{ {
int rc = 0; int rc = 0;
tid_t tid; /* transaction id */ tid_t tid; /* transaction id */

Просмотреть файл

@ -482,7 +482,7 @@ out:
return ret; return ret;
} }
static int logfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int logfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;

Просмотреть файл

@ -103,7 +103,7 @@ static int minix_link(struct dentry * old_dentry, struct inode * dir,
return add_nondir(dentry, inode); return add_nondir(dentry, inode);
} }
static int minix_mkdir(struct inode * dir, struct dentry *dentry, int mode) static int minix_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode)
{ {
struct inode * inode; struct inode * inode;
int err = -EMLINK; int err = -EMLINK;

Просмотреть файл

@ -2541,7 +2541,7 @@ SYSCALL_DEFINE3(mknod, const char __user *, filename, umode_t, mode, unsigned, d
return sys_mknodat(AT_FDCWD, filename, mode, dev); return sys_mknodat(AT_FDCWD, filename, mode, dev);
} }
int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int error = may_create(dir, dentry); int error = may_create(dir, dentry);

Просмотреть файл

@ -33,7 +33,7 @@ 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 *, int, struct nameidata *);
static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *); static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *);
static int ncp_unlink(struct inode *, struct dentry *); static int ncp_unlink(struct inode *, struct dentry *);
static int ncp_mkdir(struct inode *, struct dentry *, int); static int ncp_mkdir(struct inode *, struct dentry *, umode_t);
static int ncp_rmdir(struct inode *, struct dentry *); static int ncp_rmdir(struct inode *, struct dentry *);
static int ncp_rename(struct inode *, struct dentry *, static int ncp_rename(struct inode *, struct dentry *,
struct inode *, struct dentry *); struct inode *, struct dentry *);
@ -985,7 +985,7 @@ static int ncp_create(struct inode *dir, struct dentry *dentry, int mode,
return ncp_create_new(dir, dentry, mode, 0, 0); return ncp_create_new(dir, dentry, mode, 0, 0);
} }
static int ncp_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int ncp_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct ncp_entry_info finfo; struct ncp_entry_info finfo;
struct ncp_server *server = NCP_SERVER(dir); struct ncp_server *server = NCP_SERVER(dir);

Просмотреть файл

@ -48,7 +48,7 @@ static int nfs_closedir(struct inode *, struct file *);
static int nfs_readdir(struct file *, void *, filldir_t); static int nfs_readdir(struct file *, void *, filldir_t);
static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *); 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 *, int, struct nameidata *);
static int nfs_mkdir(struct inode *, struct dentry *, int); static int nfs_mkdir(struct inode *, struct dentry *, umode_t);
static int nfs_rmdir(struct inode *, struct dentry *); static int nfs_rmdir(struct inode *, struct dentry *);
static int nfs_unlink(struct inode *, struct dentry *); static int nfs_unlink(struct inode *, struct dentry *);
static int nfs_symlink(struct inode *, struct dentry *, const char *); static int nfs_symlink(struct inode *, struct dentry *, const char *);
@ -1719,7 +1719,7 @@ out_err:
/* /*
* See comments for nfs_proc_create regarding failed operations. * See comments for nfs_proc_create regarding failed operations.
*/ */
static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int nfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct iattr attr; struct iattr attr;
int error; int error;

Просмотреть файл

@ -213,7 +213,7 @@ static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
return err; return err;
} }
static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
struct nilfs_transaction_info ti; struct nilfs_transaction_info ti;

Просмотреть файл

@ -488,7 +488,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
/* SMP-safe */ /* SMP-safe */
static int dlmfs_mkdir(struct inode * dir, static int dlmfs_mkdir(struct inode * dir,
struct dentry * dentry, struct dentry * dentry,
int mode) umode_t mode)
{ {
int status; int status;
struct inode *inode = NULL; struct inode *inode = NULL;

Просмотреть файл

@ -602,7 +602,7 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
static int ocfs2_mkdir(struct inode *dir, static int ocfs2_mkdir(struct inode *dir,
struct dentry *dentry, struct dentry *dentry,
int mode) umode_t mode)
{ {
int ret; int ret;

Просмотреть файл

@ -279,7 +279,7 @@ out_free_inode:
return err; return err;
} }
static int omfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int omfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
return omfs_add_node(dir, dentry, mode | S_IFDIR); return omfs_add_node(dir, dentry, mode | S_IFDIR);
} }

Просмотреть файл

@ -106,7 +106,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
return error; return error;
} }
static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, int mode) static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
{ {
int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0);
if (!retval) if (!retval)

Просмотреть файл

@ -721,7 +721,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
return retval; return retval;
} }
static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int retval; int retval;
struct inode *inode; struct inode *inode;

Просмотреть файл

@ -66,7 +66,7 @@ static int xattr_create(struct inode *dir, struct dentry *dentry, int mode)
} }
#endif #endif
static int xattr_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
BUG_ON(!mutex_is_locked(&dir->i_mutex)); BUG_ON(!mutex_is_locked(&dir->i_mutex));
return dir->i_op->mkdir(dir, dentry, mode); return dir->i_op->mkdir(dir, dentry, mode);

Просмотреть файл

@ -131,7 +131,7 @@ static int sysv_link(struct dentry * old_dentry, struct inode * dir,
return add_nondir(dentry, inode); return add_nondir(dentry, inode);
} }
static int sysv_mkdir(struct inode * dir, struct dentry *dentry, int mode) static int sysv_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode)
{ {
struct inode * inode; struct inode * inode;
int err = -EMLINK; int err = -EMLINK;

Просмотреть файл

@ -712,7 +712,7 @@ out_cancel:
return err; return err;
} }
static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
struct ubifs_inode *dir_ui = ubifs_inode(dir); struct ubifs_inode *dir_ui = ubifs_inode(dir);
@ -725,7 +725,7 @@ static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
* directory inode. * 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); dentry->d_name.len, dentry->d_name.name, mode, dir->i_ino);
err = ubifs_budget_space(c, &req); err = ubifs_budget_space(c, &req);

Просмотреть файл

@ -640,7 +640,7 @@ out:
return err; return err;
} }
static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int udf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct inode *inode; struct inode *inode;
struct udf_fileident_bh fibh; struct udf_fileident_bh fibh;

Просмотреть файл

@ -180,7 +180,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
return error; return error;
} }
static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode) static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
{ {
struct inode * inode; struct inode * inode;
int err = -EMLINK; int err = -EMLINK;

Просмотреть файл

@ -241,7 +241,7 @@ STATIC int
xfs_vn_mkdir( xfs_vn_mkdir(
struct inode *dir, struct inode *dir,
struct dentry *dentry, struct dentry *dentry,
int mode) umode_t mode)
{ {
return xfs_vn_mknod(dir, dentry, mode|S_IFDIR, 0); return xfs_vn_mknod(dir, dentry, mode|S_IFDIR, 0);
} }

Просмотреть файл

@ -1517,7 +1517,7 @@ extern void unlock_super(struct super_block *);
* VFS helper functions.. * VFS helper functions..
*/ */
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
extern int vfs_mkdir(struct inode *, struct dentry *, int); extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);
extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
extern int vfs_symlink(struct inode *, struct dentry *, const char *); extern int vfs_symlink(struct inode *, struct dentry *, const char *);
extern int vfs_link(struct dentry *, struct inode *, struct dentry *); extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
@ -1623,7 +1623,7 @@ struct inode_operations {
int (*link) (struct dentry *,struct inode *,struct dentry *); int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *); int (*symlink) (struct inode *,struct dentry *,const char *);
int (*mkdir) (struct inode *,struct dentry *,int); int (*mkdir) (struct inode *,struct dentry *,umode_t);
int (*rmdir) (struct inode *,struct dentry *); int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*mknod) (struct inode *,struct dentry *,int,dev_t);
int (*rename) (struct inode *, struct dentry *, int (*rename) (struct inode *, struct dentry *,

Просмотреть файл

@ -1453,7 +1453,7 @@ struct security_operations {
int (*inode_unlink) (struct inode *dir, struct dentry *dentry); int (*inode_unlink) (struct inode *dir, struct dentry *dentry);
int (*inode_symlink) (struct inode *dir, int (*inode_symlink) (struct inode *dir,
struct dentry *dentry, const char *old_name); struct dentry *dentry, const char *old_name);
int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, int mode); int (*inode_mkdir) (struct inode *dir, struct dentry *dentry, umode_t mode);
int (*inode_rmdir) (struct inode *dir, struct dentry *dentry); int (*inode_rmdir) (struct inode *dir, struct dentry *dentry);
int (*inode_mknod) (struct inode *dir, struct dentry *dentry, int (*inode_mknod) (struct inode *dir, struct dentry *dentry,
int mode, dev_t dev); int mode, dev_t dev);
@ -1722,7 +1722,7 @@ int security_inode_link(struct dentry *old_dentry, struct inode *dir,
int security_inode_unlink(struct inode *dir, struct dentry *dentry); int security_inode_unlink(struct inode *dir, struct dentry *dentry);
int security_inode_symlink(struct inode *dir, struct dentry *dentry, int security_inode_symlink(struct inode *dir, struct dentry *dentry,
const char *old_name); const char *old_name);
int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode); int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
int security_inode_rmdir(struct inode *dir, struct dentry *dentry); int security_inode_rmdir(struct inode *dir, struct dentry *dentry);
int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev); int security_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev);
int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry,

Просмотреть файл

@ -760,7 +760,7 @@ EXPORT_SYMBOL_GPL(cgroup_unlock);
* -> cgroup_mkdir. * -> cgroup_mkdir.
*/ */
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode); static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
static struct dentry *cgroup_lookup(struct inode *, struct dentry *, struct nameidata *); static struct dentry *cgroup_lookup(struct inode *, struct dentry *, struct nameidata *);
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
static int cgroup_populate_dir(struct cgroup *cgrp); static int cgroup_populate_dir(struct cgroup *cgrp);
@ -3846,7 +3846,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
return err; return err;
} }
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
struct cgroup *c_parent = dentry->d_parent->d_fsdata; struct cgroup *c_parent = dentry->d_parent->d_fsdata;

Просмотреть файл

@ -1489,7 +1489,7 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
return error; return error;
} }
static int shmem_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int error; int error;

Просмотреть файл

@ -148,7 +148,7 @@ static int cap_inode_symlink(struct inode *inode, struct dentry *dentry,
} }
static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry, static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry,
int mask) umode_t mask)
{ {
return 0; return 0;
} }

Просмотреть файл

@ -506,7 +506,7 @@ int security_inode_symlink(struct inode *dir, struct dentry *dentry,
return security_ops->inode_symlink(dir, dentry, old_name); return security_ops->inode_symlink(dir, dentry, old_name);
} }
int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode) int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
if (unlikely(IS_PRIVATE(dir))) if (unlikely(IS_PRIVATE(dir)))
return 0; return 0;

Просмотреть файл

@ -2618,7 +2618,7 @@ static int selinux_inode_symlink(struct inode *dir, struct dentry *dentry, const
return may_create(dir, dentry, SECCLASS_LNK_FILE); return may_create(dir, dentry, SECCLASS_LNK_FILE);
} }
static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, int mask) static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mask)
{ {
return may_create(dir, dentry, SECCLASS_DIR); return may_create(dir, dentry, SECCLASS_DIR);
} }