/fs/ |
D | open.c | 230 int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in vfs_fallocate() argument 239 if (mode & ~FALLOC_FL_SUPPORTED_MASK) in vfs_fallocate() 243 if ((mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_ZERO_RANGE)) == in vfs_fallocate() 248 if ((mode & FALLOC_FL_PUNCH_HOLE) && in vfs_fallocate() 249 !(mode & FALLOC_FL_KEEP_SIZE)) in vfs_fallocate() 253 if ((mode & FALLOC_FL_COLLAPSE_RANGE) && in vfs_fallocate() 254 (mode & ~FALLOC_FL_COLLAPSE_RANGE)) in vfs_fallocate() 258 if ((mode & FALLOC_FL_INSERT_RANGE) && in vfs_fallocate() 259 (mode & ~FALLOC_FL_INSERT_RANGE)) in vfs_fallocate() 263 if ((mode & FALLOC_FL_UNSHARE_RANGE) && in vfs_fallocate() [all …]
|
D | posix_acl.c | 282 umode_t mode = 0; in posix_acl_equiv_mode() local 294 mode |= (pa->e_perm & S_IRWXO) << 6; in posix_acl_equiv_mode() 297 mode |= (pa->e_perm & S_IRWXO) << 3; in posix_acl_equiv_mode() 300 mode |= pa->e_perm & S_IRWXO; in posix_acl_equiv_mode() 303 mode = (mode & ~S_IRWXG) | in posix_acl_equiv_mode() 316 *mode_p = (*mode_p & ~S_IRWXUGO) | mode; in posix_acl_equiv_mode() 325 posix_acl_from_mode(umode_t mode, gfp_t flags) in posix_acl_from_mode() argument 332 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6; in posix_acl_from_mode() 335 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3; in posix_acl_from_mode() 338 acl->a_entries[2].e_perm = (mode & S_IRWXO); in posix_acl_from_mode() [all …]
|
D | init.c | 100 int __init init_chmod(const char *filename, umode_t mode) in init_chmod() argument 108 error = chmod_common(&path, mode); in init_chmod() 141 int __init init_mknod(const char *filename, umode_t mode, unsigned int dev) in init_mknod() argument 147 if (S_ISFIFO(mode) || S_ISSOCK(mode)) in init_mknod() 149 else if (!(S_ISBLK(mode) || S_ISCHR(mode))) in init_mknod() 157 mode &= ~current_umask(); in init_mknod() 158 error = security_path_mknod(&path, dentry, mode, dev); in init_mknod() 160 error = vfs_mknod(path.dentry->d_inode, dentry, mode, in init_mknod() 220 int __init init_mkdir(const char *pathname, umode_t mode) in init_mkdir() argument 230 mode &= ~current_umask(); in init_mkdir() [all …]
|
D | attr.c | 37 umode_t mode = inode->i_mode; in setattr_should_drop_sgid() local 39 if (!(mode & S_ISGID)) in setattr_should_drop_sgid() 41 if (mode & S_IXGRP) in setattr_should_drop_sgid() 64 umode_t mode = inode->i_mode; in setattr_should_drop_suidgid() local 68 if (unlikely(mode & S_ISUID)) in setattr_should_drop_suidgid() 73 if (unlikely(kill && !capable(CAP_FSETID) && S_ISREG(mode))) in setattr_should_drop_suidgid() 253 umode_t mode = attr->ia_mode; in setattr_copy() local 255 mode &= ~S_ISGID; in setattr_copy() 256 inode->i_mode = mode; in setattr_copy() 284 umode_t mode = inode->i_mode; in notify_change() local [all …]
|
D | namei.c | 301 unsigned int mode = inode->i_mode; in acl_permission_check() local 306 mode >>= 6; in acl_permission_check() 307 return (mask & ~mode) ? -EACCES : 0; in acl_permission_check() 311 if (IS_POSIXACL(inode) && (mode & S_IRWXG)) { in acl_permission_check() 325 if (mask & (mode ^ (mode >> 3))) { in acl_permission_check() 327 mode >>= 3; in acl_permission_check() 331 return (mask & ~mode) ? -EACCES : 0; in acl_permission_check() 422 umode_t mode = inode->i_mode; in sb_permission() local 425 if (sb_rdonly(sb) && (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) in sb_permission() 1088 umode_t mode = inode->i_mode; in safe_hardlink_source() local [all …]
|
/fs/xfs/scrub/ |
D | inode.c | 73 uint16_t mode, in xchk_inode_extsize() argument 79 mode, flags); in xchk_inode_extsize() 95 uint16_t mode, in xchk_inode_cowextsize() argument 102 be32_to_cpu(dip->di_cowextsize), mode, flags, in xchk_inode_cowextsize() 114 uint16_t mode, in xchk_inode_flags() argument 136 !S_ISDIR(mode)) in xchk_inode_flags() 141 !S_ISREG(mode)) in xchk_inode_flags() 159 uint16_t mode, in xchk_inode_flags2() argument 177 if ((flags2 & XFS_DIFLAG2_DAX) && !(S_ISREG(mode) || S_ISDIR(mode))) in xchk_inode_flags2() 181 if ((flags2 & XFS_DIFLAG2_REFLINK) && !S_ISREG(mode)) in xchk_inode_flags2() [all …]
|
/fs/xfs/ |
D | xfs_sysctl.c | 90 .mode = 0644, 99 .mode = 0644, 108 .mode = 0644, 118 .mode = 0644, 127 .mode = 0644, 136 .mode = 0644, 145 .mode = 0644, 154 .mode = 0644, 163 .mode = 0644, 172 .mode = 0644, [all …]
|
/fs/f2fs/ |
D | acl.c | 207 umode_t mode = inode->i_mode; in f2fs_acl_update_mode() local 211 mode = F2FS_I(inode)->i_acl_mode; in f2fs_acl_update_mode() 213 error = posix_acl_equiv_mode(*acl, &mode); in f2fs_acl_update_mode() 220 mode &= ~S_ISGID; in f2fs_acl_update_mode() 221 *mode_p = mode; in f2fs_acl_update_mode() 232 umode_t mode = inode->i_mode; in __f2fs_set_acl() local 238 error = f2fs_acl_update_mode(inode, &mode, &acl); in __f2fs_set_acl() 241 set_acl_inode(inode, mode); in __f2fs_set_acl() 304 umode_t mode = *mode_p; in f2fs_acl_create_masq() local 312 pa->e_perm &= (mode >> 6) | ~S_IRWXO; in f2fs_acl_create_masq() [all …]
|
/fs/dlm/ |
D | ast.c | 28 lkb->lkb_last_bast.mode, in dlm_dump_lkb_callbacks() 36 lkb->lkb_last_cast.mode, in dlm_dump_lkb_callbacks() 45 lkb->lkb_callbacks[i].mode, in dlm_dump_lkb_callbacks() 51 int dlm_add_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode, in dlm_add_lkb_callback() argument 74 prev_mode = lkb->lkb_callbacks[i-1].mode; in dlm_add_lkb_callback() 76 if ((prev_mode == mode) || in dlm_add_lkb_callback() 77 (prev_mode > mode && prev_mode > DLM_LOCK_PR)) { in dlm_add_lkb_callback() 83 mode, in dlm_add_lkb_callback() 93 lkb->lkb_callbacks[i].mode = mode; in dlm_add_lkb_callback() 103 flags, mode, status, sbflags); in dlm_add_lkb_callback() [all …]
|
/fs/9p/ |
D | vfs_inode.c | 49 static u32 unixmode2p9mode(struct v9fs_session_info *v9ses, umode_t mode) in unixmode2p9mode() argument 52 res = mode & 0777; in unixmode2p9mode() 53 if (S_ISDIR(mode)) in unixmode2p9mode() 57 if (S_ISSOCK(mode)) in unixmode2p9mode() 59 if (S_ISFIFO(mode)) in unixmode2p9mode() 61 if (S_ISBLK(mode)) in unixmode2p9mode() 63 if (S_ISCHR(mode)) in unixmode2p9mode() 67 if ((mode & S_ISUID) == S_ISUID) in unixmode2p9mode() 69 if ((mode & S_ISGID) == S_ISGID) in unixmode2p9mode() 71 if ((mode & S_ISVTX) == S_ISVTX) in unixmode2p9mode() [all …]
|
/fs/ramfs/ |
D | inode.c | 44 umode_t mode; member 64 const struct inode *dir, umode_t mode, dev_t dev) in ramfs_get_inode() argument 70 inode_init_owner(inode, dir, mode); in ramfs_get_inode() 75 switch (mode & S_IFMT) { in ramfs_get_inode() 77 init_special_inode(inode, mode, dev); in ramfs_get_inode() 104 ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) in ramfs_mknod() argument 106 struct inode * inode = ramfs_get_inode(dir->i_sb, dir, mode, dev); in ramfs_mknod() 118 static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) in ramfs_mkdir() argument 120 int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); in ramfs_mkdir() 126 static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) in ramfs_create() argument [all …]
|
/fs/vboxsf/ |
D | utils.c | 53 int mode; in vboxsf_init_inode() local 57 #define mode_set(r) ((attr->mode & (SHFL_UNIX_##r)) ? (S_##r) : 0) in vboxsf_init_inode() 59 mode = mode_set(IRUSR); in vboxsf_init_inode() 60 mode |= mode_set(IWUSR); in vboxsf_init_inode() 61 mode |= mode_set(IXUSR); in vboxsf_init_inode() 63 mode |= mode_set(IRGRP); in vboxsf_init_inode() 64 mode |= mode_set(IWGRP); in vboxsf_init_inode() 65 mode |= mode_set(IXGRP); in vboxsf_init_inode() 67 mode |= mode_set(IROTH); in vboxsf_init_inode() 68 mode |= mode_set(IWOTH); in vboxsf_init_inode() [all …]
|
/fs/ceph/ |
D | util.c | 57 int mode; in ceph_flags_to_mode() local 66 mode = CEPH_FILE_MODE_WR; in ceph_flags_to_mode() 69 mode = CEPH_FILE_MODE_RD; in ceph_flags_to_mode() 73 mode = CEPH_FILE_MODE_RDWR; in ceph_flags_to_mode() 78 mode |= CEPH_FILE_MODE_LAZY; in ceph_flags_to_mode() 81 return mode; in ceph_flags_to_mode() 84 int ceph_caps_for_mode(int mode) in ceph_caps_for_mode() argument 88 if (mode & CEPH_FILE_MODE_RD) in ceph_caps_for_mode() 91 if (mode & CEPH_FILE_MODE_WR) in ceph_caps_for_mode() 96 if (mode & CEPH_FILE_MODE_LAZY) in ceph_caps_for_mode()
|
/fs/hostfs/ |
D | hostfs_user.c | 24 p->mode = buf->st_mode; in stat64_to_hostfs() 57 int mode = 0; in access_file() local 60 mode = R_OK; in access_file() 62 mode |= W_OK; in access_file() 64 mode |= X_OK; in access_file() 65 if (access(path, mode) != 0) in access_file() 72 int mode = 0, fd; in open_file() local 75 mode = O_RDONLY; in open_file() 77 mode = O_WRONLY; in open_file() 79 mode = O_RDWR; in open_file() [all …]
|
D | hostfs_kern.c | 25 fmode_t mode; member 227 hi->mode = 0; in hostfs_alloc_inode() 299 fmode_t mode; in hostfs_open() local 303 mode = file->f_mode & (FMODE_READ | FMODE_WRITE); in hostfs_open() 304 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open() 307 mode |= HOSTFS_I(ino)->mode; in hostfs_open() 312 if (mode & FMODE_READ) in hostfs_open() 314 if (mode & FMODE_WRITE) in hostfs_open() 328 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open() 333 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open() [all …]
|
/fs/debugfs/ |
D | file.c | 420 static struct dentry *debugfs_create_mode_unsafe(const char *name, umode_t mode, in debugfs_create_mode_unsafe() argument 427 if (!(mode & S_IWUGO)) in debugfs_create_mode_unsafe() 428 return debugfs_create_file_unsafe(name, mode, parent, value, in debugfs_create_mode_unsafe() 431 if (!(mode & S_IRUGO)) in debugfs_create_mode_unsafe() 432 return debugfs_create_file_unsafe(name, mode, parent, value, in debugfs_create_mode_unsafe() 435 return debugfs_create_file_unsafe(name, mode, parent, value, fops); in debugfs_create_mode_unsafe() 466 void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, in debugfs_create_u8() argument 469 debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u8, in debugfs_create_u8() 502 void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, in debugfs_create_u16() argument 505 debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u16, in debugfs_create_u16() [all …]
|
D | inode.c | 80 umode_t mode; member 110 opts->mode = DEBUGFS_DEFAULT_MODE; in debugfs_parse_options() 137 opts->mode = option & S_IALLUGO; in debugfs_parse_options() 156 inode->i_mode |= opts->mode; in debugfs_apply_options() 191 if (opts->mode != DEBUGFS_DEFAULT_MODE) in debugfs_show_options() 192 seq_printf(m, ",mode=%o", opts->mode); in debugfs_show_options() 384 static struct dentry *__debugfs_create_file(const char *name, umode_t mode, in __debugfs_create_file() argument 392 if (!(mode & S_IFMT)) in __debugfs_create_file() 393 mode |= S_IFREG; in __debugfs_create_file() 394 BUG_ON(!S_ISREG(mode)); in __debugfs_create_file() [all …]
|
/fs/proc/ |
D | generic.c | 39 if (S_ISLNK(pde->mode)) in pde_free() 132 de->mode = inode->i_mode; in proc_notify_change() 316 de->low_ino, de->mode >> 12)) { in proc_readdir_de() 399 umode_t mode, in __proc_create() argument 447 ent->mode = mode; in __proc_create() 487 struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode, in _proc_mkdir() argument 492 if (mode == 0) in _proc_mkdir() 493 mode = S_IRUGO | S_IXUGO; in _proc_mkdir() 495 ent = __proc_create(&parent, name, S_IFDIR | mode, 2); in _proc_mkdir() 509 struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode, in proc_mkdir_data() argument [all …]
|
/fs/xfs/libxfs/ |
D | xfs_inode_buf.c | 361 mode_t mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify_fork() local 373 if (S_ISDIR(mode) || S_ISLNK(mode)) { in xfs_dinode_verify_fork() 389 if (S_ISREG(mode) && whichfork == XFS_DATA_FORK) in xfs_dinode_verify_fork() 444 uint16_t mode; in xfs_dinode_verify() local 470 mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify() 471 if (mode && xfs_mode_to_ftype(mode) == XFS_DIR3_FT_UNKNOWN) in xfs_dinode_verify() 475 if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0) in xfs_dinode_verify() 479 if (mode && in xfs_dinode_verify() 484 if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize) in xfs_dinode_verify() 489 if (mode && (flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp) in xfs_dinode_verify() [all …]
|
/fs/adfs/ |
D | inode.c | 90 umode_t mode, rmask; in adfs_atts2mode() local 94 mode = S_IRUGO & asb->s_owner_mask; in adfs_atts2mode() 95 return S_IFDIR | S_IXUGO | mode; in adfs_atts2mode() 110 mode = S_IFREG; in adfs_atts2mode() 113 mode |= rmask & asb->s_owner_mask; in adfs_atts2mode() 116 mode |= S_IWUGO & asb->s_owner_mask; in adfs_atts2mode() 119 mode |= rmask & asb->s_other_mask; in adfs_atts2mode() 122 mode |= S_IWUGO & asb->s_other_mask; in adfs_atts2mode() 123 return mode; in adfs_atts2mode() 134 umode_t mode; in adfs_mode2atts() local [all …]
|
/fs/affs/ |
D | amigaffs.c | 393 umode_t mode = 0; in affs_prot_to_mode() local 396 mode |= 0200; in affs_prot_to_mode() 398 mode |= 0400; in affs_prot_to_mode() 400 mode |= 0100; in affs_prot_to_mode() 402 mode |= 0020; in affs_prot_to_mode() 404 mode |= 0040; in affs_prot_to_mode() 406 mode |= 0010; in affs_prot_to_mode() 408 mode |= 0002; in affs_prot_to_mode() 410 mode |= 0004; in affs_prot_to_mode() 412 mode |= 0001; in affs_prot_to_mode() [all …]
|
/fs/sysfs/ |
D | group.c | 44 umode_t mode = (*attr)->mode; in create_files() local 54 mode = grp->is_visible(kobj, *attr, i); in create_files() 55 if (!mode) in create_files() 59 WARN(mode & ~(SYSFS_PREALLOC | 0664), in create_files() 61 (*attr)->name, mode); in create_files() 63 mode &= SYSFS_PREALLOC | 0664; in create_files() 65 mode, uid, gid, NULL); in create_files() 77 umode_t mode = (*bin_attr)->attr.mode; in create_files() local 83 mode = grp->is_bin_visible(kobj, *bin_attr, i); in create_files() 84 if (!mode) in create_files() [all …]
|
/fs/crypto/ |
D | keysetup.c | 78 fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, in fscrypt_allocate_skcipher() argument 84 tfm = crypto_alloc_skcipher(mode->cipher_str, 0, 0); in fscrypt_allocate_skcipher() 89 mode->friendly_name, mode->cipher_str); in fscrypt_allocate_skcipher() 93 mode->cipher_str, PTR_ERR(tfm)); in fscrypt_allocate_skcipher() 96 if (!xchg(&mode->logged_impl_name, 1)) { in fscrypt_allocate_skcipher() 104 mode->friendly_name, crypto_skcipher_driver_name(tfm)); in fscrypt_allocate_skcipher() 106 if (WARN_ON(crypto_skcipher_ivsize(tfm) != mode->ivsize)) { in fscrypt_allocate_skcipher() 111 err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize); in fscrypt_allocate_skcipher() 177 struct fscrypt_mode *mode = ci->ci_mode; in setup_per_mode_enc_key() local 178 const u8 mode_num = mode - fscrypt_modes; in setup_per_mode_enc_key() [all …]
|
/fs/hfsplus/ |
D | dir.c | 225 u16 mode; in hfsplus_readdir() local 234 mode = be16_to_cpu(entry.file.permissions.mode); in hfsplus_readdir() 235 if (S_ISREG(mode)) in hfsplus_readdir() 237 else if (S_ISLNK(mode)) in hfsplus_readdir() 239 else if (S_ISFIFO(mode)) in hfsplus_readdir() 241 else if (S_ISCHR(mode)) in hfsplus_readdir() 243 else if (S_ISBLK(mode)) in hfsplus_readdir() 245 else if (S_ISSOCK(mode)) in hfsplus_readdir() 480 umode_t mode, dev_t rdev) in hfsplus_mknod() argument 487 inode = hfsplus_new_inode(dir->i_sb, dir, mode); in hfsplus_mknod() [all …]
|
/fs/configfs/ |
D | inode.c | 85 umode_t mode = iattr->ia_mode; in configfs_setattr() local 88 mode &= ~S_ISGID; in configfs_setattr() 89 sd_iattr->ia_mode = sd->s_mode = mode; in configfs_setattr() 95 static inline void set_default_inode_attr(struct inode * inode, umode_t mode) in set_default_inode_attr() argument 97 inode->i_mode = mode; in set_default_inode_attr() 112 struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd, in configfs_new_inode() argument 128 set_default_inode_attr(inode, mode); in configfs_new_inode() 164 struct inode *configfs_create(struct dentry *dentry, umode_t mode) in configfs_create() argument 177 inode = configfs_new_inode(mode, sd, dentry->d_sb); in configfs_create()
|