Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 255) sorted by relevance

1234567891011

/fs/
Dposix_acl.c150 mode_t mode = 0; in posix_acl_equiv_mode() local
156 mode |= (pa->e_perm & S_IRWXO) << 6; in posix_acl_equiv_mode()
159 mode |= (pa->e_perm & S_IRWXO) << 3; in posix_acl_equiv_mode()
162 mode |= pa->e_perm & S_IRWXO; in posix_acl_equiv_mode()
165 mode = (mode & ~S_IRWXG) | in posix_acl_equiv_mode()
178 *mode_p = (*mode_p & ~S_IRWXUGO) | mode; in posix_acl_equiv_mode()
186 posix_acl_from_mode(mode_t mode, gfp_t flags) in posix_acl_from_mode() argument
194 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6; in posix_acl_from_mode()
198 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3; in posix_acl_from_mode()
202 acl->a_entries[2].e_perm = (mode & S_IRWXO); in posix_acl_from_mode()
[all …]
Dopen.c380 SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) in SYSCALL_DEFINE()
391 if (mode && !(mode & FALLOC_FL_KEEP_SIZE)) in SYSCALL_DEFINE()
428 ret = inode->i_op->fallocate(inode, mode, offset, len); in SYSCALL_DEFINE()
438 asmlinkage long SyS_fallocate(long fd, long mode, loff_t offset, loff_t len) in SyS_fallocate() argument
440 return SYSC_fallocate((int)fd, (int)mode, offset, len); in SyS_fallocate()
450 SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) in SYSCALL_DEFINE3() argument
458 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ in SYSCALL_DEFINE3()
485 if ((mode & MAY_EXEC) && S_ISREG(inode->i_mode)) { in SYSCALL_DEFINE3()
495 res = inode_permission(inode, mode | MAY_ACCESS); in SYSCALL_DEFINE3()
497 if (res || !(mode & S_IWOTH) || special_file(inode->i_mode)) in SYSCALL_DEFINE3()
[all …]
Dgeneric_acl.c89 mode_t mode; in generic_acl_set() local
96 mode = inode->i_mode; in generic_acl_set()
97 error = posix_acl_equiv_mode(acl, &mode); in generic_acl_set()
100 inode->i_mode = mode; in generic_acl_set()
134 mode_t mode = inode->i_mode; in generic_acl_init() local
137 inode->i_mode = mode & ~current->fs->umask; in generic_acl_init()
155 error = posix_acl_create_masq(clone, &mode); in generic_acl_init()
157 inode->i_mode = mode; in generic_acl_init()
Dnamei.c185 umode_t mode = inode->i_mode; in generic_permission() local
190 mode >>= 6; in generic_permission()
192 if (IS_POSIXACL(inode) && (mode & S_IRWXG) && check_acl) { in generic_permission()
201 mode >>= 3; in generic_permission()
207 if ((mask & ~mode) == 0) in generic_permission()
244 umode_t mode = inode->i_mode; in inode_permission() local
250 (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) in inode_permission()
433 umode_t mode = inode->i_mode; in exec_permission_lite() local
439 mode >>= 6; in exec_permission_lite()
441 mode >>= 3; in exec_permission_lite()
[all …]
Dblock_dev.c846 struct block_device *open_by_devnum(dev_t dev, fmode_t mode) in open_by_devnum() argument
851 err = blkdev_get(bdev, mode); in open_by_devnum()
980 static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part);
989 static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) in __blkdev_get() argument
996 if (mode & FMODE_READ) in __blkdev_get()
998 if (mode & FMODE_WRITE) in __blkdev_get()
1030 ret = disk->fops->open(bdev, mode); in __blkdev_get()
1063 ret = __blkdev_get(whole, mode, 1); in __blkdev_get()
1083 ret = bdev->bd_disk->fops->open(bdev, mode); in __blkdev_get()
1104 __blkdev_put(bdev->bd_contains, mode, 1); in __blkdev_get()
[all …]
/fs/debugfs/
Dfile.c95 struct dentry *debugfs_create_u8(const char *name, mode_t mode, in debugfs_create_u8() argument
98 return debugfs_create_file(name, mode, parent, value, &fops_u8); in debugfs_create_u8()
138 struct dentry *debugfs_create_u16(const char *name, mode_t mode, in debugfs_create_u16() argument
141 return debugfs_create_file(name, mode, parent, value, &fops_u16); in debugfs_create_u16()
181 struct dentry *debugfs_create_u32(const char *name, mode_t mode, in debugfs_create_u32() argument
184 return debugfs_create_file(name, mode, parent, value, &fops_u32); in debugfs_create_u32()
225 struct dentry *debugfs_create_u64(const char *name, mode_t mode, in debugfs_create_u64() argument
228 return debugfs_create_file(name, mode, parent, value, &fops_u64); in debugfs_create_u64()
256 struct dentry *debugfs_create_x8(const char *name, mode_t mode, in debugfs_create_x8() argument
259 return debugfs_create_file(name, mode, parent, value, &fops_x8); in debugfs_create_x8()
[all …]
Dinode.c34 static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev) in debugfs_get_inode() argument
39 inode->i_mode = mode; in debugfs_get_inode()
41 switch (mode & S_IFMT) { in debugfs_get_inode()
43 init_special_inode(inode, mode, dev); in debugfs_get_inode()
66 int mode, dev_t dev) in debugfs_mknod() argument
74 inode = debugfs_get_inode(dir->i_sb, mode, dev); in debugfs_mknod()
83 static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) in debugfs_mkdir() argument
87 mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR; in debugfs_mkdir()
88 res = debugfs_mknod(dir, dentry, mode, 0); in debugfs_mkdir()
96 static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode) in debugfs_link() argument
[all …]
/fs/hostfs/
Dhostfs_user.c100 int mode = 0; in access_file() local
103 mode = R_OK; in access_file()
105 mode |= W_OK; in access_file()
107 mode |= X_OK; in access_file()
108 if (access(path, mode) != 0) in access_file()
115 int mode = 0, fd; in open_file() local
118 mode = O_RDONLY; in open_file()
120 mode = O_WRONLY; in open_file()
122 mode = O_RDWR; in open_file()
126 mode |= O_APPEND; in open_file()
[all …]
Dhostfs_kern.c23 fmode_t mode; member
296 .mode = 0 }); in hostfs_alloc_inode()
376 fmode_t mode = 0; in hostfs_file_open() local
379 mode = file->f_mode & (FMODE_READ | FMODE_WRITE); in hostfs_file_open()
380 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_file_open()
392 HOSTFS_I(ino)->mode |= mode; in hostfs_file_open()
393 if (HOSTFS_I(ino)->mode & FMODE_READ) in hostfs_file_open()
395 if (HOSTFS_I(ino)->mode & FMODE_WRITE) in hostfs_file_open()
596 int hostfs_create(struct inode *dir, struct dentry *dentry, int mode, in hostfs_create() argument
619 mode & S_IRUSR, mode & S_IWUSR, mode & S_IXUSR, in hostfs_create()
[all …]
/fs/9p/
Dvfs_inode.c56 static int unixmode2p9mode(struct v9fs_session_info *v9ses, int mode) in unixmode2p9mode() argument
59 res = mode & 0777; in unixmode2p9mode()
60 if (S_ISDIR(mode)) in unixmode2p9mode()
63 if (S_ISLNK(mode)) in unixmode2p9mode()
66 if (S_ISSOCK(mode)) in unixmode2p9mode()
68 if (S_ISFIFO(mode)) in unixmode2p9mode()
70 if (S_ISBLK(mode)) in unixmode2p9mode()
72 if (S_ISCHR(mode)) in unixmode2p9mode()
76 if ((mode & S_ISUID) == S_ISUID) in unixmode2p9mode()
78 if ((mode & S_ISGID) == S_ISGID) in unixmode2p9mode()
[all …]
/fs/xfs/linux-2.6/
Dxfs_sysctl.c63 .mode = 0644,
74 .mode = 0644,
85 .mode = 0644,
97 .mode = 0644,
108 .mode = 0644,
119 .mode = 0644,
130 .mode = 0644,
141 .mode = 0644,
152 .mode = 0644,
163 .mode = 0644,
[all …]
/fs/proc/
Dgeneric.c240 de->mode = inode->i_mode; in proc_notify_change()
472 de->low_ino, de->mode >> 12) < 0) { in proc_readdir_de()
526 if (S_ISDIR(dp->mode)) { in proc_register()
532 } else if (S_ISLNK(dp->mode)) { in proc_register()
535 } else if (S_ISREG(dp->mode)) { in proc_register()
561 mode_t mode, in __proc_create() argument
587 ent->mode = mode; in __proc_create()
623 struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, in proc_mkdir_mode() argument
628 ent = __proc_create(&parent, name, S_IFDIR | mode, 2); in proc_mkdir_mode()
661 struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, in create_proc_entry() argument
[all …]
/fs/adfs/
Dinode.c108 umode_t mode, rmask; in adfs_atts2mode() local
112 mode = S_IRUGO & asb->s_owner_mask; in adfs_atts2mode()
113 return S_IFDIR | S_IXUGO | mode; in adfs_atts2mode()
130 mode = S_IFREG; in adfs_atts2mode()
133 mode |= rmask & asb->s_owner_mask; in adfs_atts2mode()
136 mode |= S_IWUGO & asb->s_owner_mask; in adfs_atts2mode()
139 mode |= rmask & asb->s_other_mask; in adfs_atts2mode()
142 mode |= S_IWUGO & asb->s_other_mask; in adfs_atts2mode()
143 return mode; in adfs_atts2mode()
153 umode_t mode; in adfs_mode2atts() local
[all …]
/fs/affs/
Damigaffs.c392 int mode = 0; in prot_to_mode() local
395 mode |= S_IWUSR; in prot_to_mode()
397 mode |= S_IRUSR; in prot_to_mode()
399 mode |= S_IXUSR; in prot_to_mode()
401 mode |= S_IWGRP; in prot_to_mode()
403 mode |= S_IRGRP; in prot_to_mode()
405 mode |= S_IXGRP; in prot_to_mode()
407 mode |= S_IWOTH; in prot_to_mode()
409 mode |= S_IROTH; in prot_to_mode()
411 mode |= S_IXOTH; in prot_to_mode()
[all …]
/fs/ramfs/
Dinode.c52 struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev) in ramfs_get_inode() argument
57 inode->i_mode = mode; in ramfs_get_inode()
65 switch (mode & S_IFMT) { in ramfs_get_inode()
67 init_special_inode(inode, mode, dev); in ramfs_get_inode()
93 ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) in ramfs_mknod() argument
95 struct inode * inode = ramfs_get_inode(dir->i_sb, mode, dev); in ramfs_mknod()
101 if (S_ISDIR(mode)) in ramfs_mknod()
112 static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, int mode) in ramfs_mkdir() argument
114 int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); in ramfs_mkdir()
120 static int ramfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) in ramfs_create() argument
[all …]
/fs/configfs/
Dinode.c107 umode_t mode = iattr->ia_mode; in configfs_setattr() local
110 mode &= ~S_ISGID; in configfs_setattr()
111 sd_iattr->ia_mode = sd->s_mode = mode; in configfs_setattr()
117 static inline void set_default_inode_attr(struct inode * inode, mode_t mode) in set_default_inode_attr() argument
119 inode->i_mode = mode; in set_default_inode_attr()
133 struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent * sd) in configfs_new_inode() argument
148 set_default_inode_attr(inode, mode); in configfs_new_inode()
153 int configfs_create(struct dentry * dentry, int mode, int (*init)(struct inode *)) in configfs_create() argument
160 if ((inode = configfs_new_inode(mode, sd))) { in configfs_create()
180 if (S_ISDIR(mode) || S_ISLNK(mode)) in configfs_create()
/fs/gfs2/
Dacl.c36 int *remove, mode_t *mode) in gfs2_acl_validate_set() argument
61 error = posix_acl_equiv_mode(acl, mode); in gfs2_acl_validate_set()
173 static int munge_mode(struct gfs2_inode *ip, mode_t mode) in munge_mode() argument
186 (ip->i_inode.i_mode & S_IFMT) == (mode & S_IFMT)); in munge_mode()
187 ip->i_inode.i_mode = mode; in munge_mode()
203 mode_t mode = ip->i_inode.i_mode; in gfs2_acl_create() local
219 mode &= ~current->fs->umask; in gfs2_acl_create()
220 if (mode != ip->i_inode.i_mode) in gfs2_acl_create()
221 error = munge_mode(ip, mode); in gfs2_acl_create()
240 error = posix_acl_create_masq(acl, &mode); in gfs2_acl_create()
[all …]
/fs/nfs/
Dsysctl.c29 .mode = 0644,
39 .mode = 0644,
49 .mode = 0644,
58 .mode = 0644,
68 .mode = 0555,
78 .mode = 0555,
/fs/jfs/
Djfs_inode.c72 struct inode *ialloc(struct inode *parent, umode_t mode) in ialloc() argument
88 rc = diAlloc(parent, S_ISDIR(mode), inode); in ialloc()
104 if (S_ISDIR(mode)) in ialloc()
105 mode |= S_ISGID; in ialloc()
124 inode->i_mode = mode; in ialloc()
128 if (S_ISDIR(mode)) { in ialloc()
134 if (S_ISLNK(mode)) in ialloc()
137 jfs_inode->mode2 |= mode; in ialloc()
/fs/coda/
Dsysctl.c24 .mode = 0644,
32 .mode = 0644,
40 .mode = 0600,
51 .mode = 0555,
/fs/sysfs/
Dgroup.c36 mode_t mode = 0; in create_files() local
44 mode = grp->is_visible(kobj, *attr, i); in create_files()
45 if (!mode) in create_files()
49 (*attr)->mode | mode); in create_files()
/fs/squashfs/
Dsquashfs_fs.h247 __le16 mode; member
256 __le16 mode; member
266 __le16 mode; member
277 __le16 mode; member
289 __le16 mode; member
303 __le16 mode; member
320 __le16 mode; member
334 __le16 mode; member
/fs/btrfs/
Dacl.c118 mode_t mode; in btrfs_set_acl() local
129 mode = inode->i_mode; in btrfs_set_acl()
130 ret = posix_acl_equiv_mode(acl, &mode); in btrfs_set_acl()
134 inode->i_mode = mode; in btrfs_set_acl()
264 mode_t mode; in btrfs_init_acl() local
276 mode = inode->i_mode; in btrfs_init_acl()
277 ret = posix_acl_create_masq(clone, &mode); in btrfs_init_acl()
279 inode->i_mode = mode; in btrfs_init_acl()
/fs/xfs/
Dxfs_acl.c326 mode_t mode, in xfs_acl_iaccess() argument
353 rval = xfs_acl_access(ip->i_d.di_uid, ip->i_d.di_gid, acl, mode, cr); in xfs_acl_iaccess()
654 mode_t mode, in xfs_acl_inherit() argument
682 xfs_acl_filter_mode(mode, cacl); in xfs_acl_inherit()
797 mode_t mode, in xfs_acl_sync_mode() argument
811 ap->ae_perm = (mode >> 6) & 0x7; in xfs_acl_sync_mode()
818 ap->ae_perm = (mode >> 3) & 0x7; in xfs_acl_sync_mode()
821 ap->ae_perm = mode & 0x7; in xfs_acl_sync_mode()
829 gap->ae_perm = (mode >> 3) & 0x7; in xfs_acl_sync_mode()
841 mode_t mode, in xfs_acl_filter_mode() argument
[all …]
/fs/cifs/
Ddir.c133 struct super_block *sb, int mode, int oflags, in cifs_posix_open() argument
176 rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, in cifs_posix_open()
218 cifs_create(struct inode *inode, struct dentry *direntry, int mode, in cifs_create() argument
255 mode &= ~current->fs->umask; in cifs_create()
268 mode, oflags, &oplock, &fileHandle, xid); in cifs_create()
323 if (!tcon->unix_ext && (mode & S_IWUGO) == 0) in cifs_create()
350 .mode = mode, in cifs_create()
388 newinode->i_mode = mode; in cifs_create()
457 int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, in cifs_mknod() argument
480 .mode = mode & ~current->fs->umask, in cifs_mknod()
[all …]

1234567891011