/fs/ |
D | open.c | 229 int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in vfs_fallocate() argument 238 if (mode & ~FALLOC_FL_SUPPORTED_MASK) in vfs_fallocate() 242 if ((mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_ZERO_RANGE)) == in vfs_fallocate() 247 if ((mode & FALLOC_FL_PUNCH_HOLE) && in vfs_fallocate() 248 !(mode & FALLOC_FL_KEEP_SIZE)) in vfs_fallocate() 252 if ((mode & FALLOC_FL_COLLAPSE_RANGE) && in vfs_fallocate() 253 (mode & ~FALLOC_FL_COLLAPSE_RANGE)) in vfs_fallocate() 257 if ((mode & FALLOC_FL_INSERT_RANGE) && in vfs_fallocate() 258 (mode & ~FALLOC_FL_INSERT_RANGE)) in vfs_fallocate() 262 if ((mode & FALLOC_FL_UNSHARE_RANGE) && in vfs_fallocate() [all …]
|
D | posix_acl.c | 294 umode_t mode = 0; in posix_acl_equiv_mode() local 306 mode |= (pa->e_perm & S_IRWXO) << 6; in posix_acl_equiv_mode() 309 mode |= (pa->e_perm & S_IRWXO) << 3; in posix_acl_equiv_mode() 312 mode |= pa->e_perm & S_IRWXO; in posix_acl_equiv_mode() 315 mode = (mode & ~S_IRWXG) | in posix_acl_equiv_mode() 328 *mode_p = (*mode_p & ~S_IRWXUGO) | mode; in posix_acl_equiv_mode() 337 posix_acl_from_mode(umode_t mode, gfp_t flags) in posix_acl_from_mode() argument 344 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6; in posix_acl_from_mode() 347 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3; in posix_acl_from_mode() 350 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() 161 dentry, mode, new_decode_dev(dev)); in init_mknod() 223 int __init init_mkdir(const char *pathname, umode_t mode) in init_mkdir() argument 233 mode &= ~current_umask(); in init_mkdir() [all …]
|
D | attr.c | 39 umode_t mode = inode->i_mode; in setattr_should_drop_sgid() local 41 if (!(mode & S_ISGID)) in setattr_should_drop_sgid() 43 if (mode & S_IXGRP) in setattr_should_drop_sgid() 70 umode_t mode = inode->i_mode; in setattr_should_drop_suidgid() local 74 if (unlikely(mode & S_ISUID)) in setattr_should_drop_suidgid() 79 if (unlikely(kill && !capable(CAP_FSETID) && S_ISREG(mode))) in setattr_should_drop_suidgid() 322 umode_t mode = attr->ia_mode; in setattr_copy() local 325 mode &= ~S_ISGID; in setattr_copy() 326 inode->i_mode = mode; in setattr_copy() 393 umode_t mode = inode->i_mode; in notify_change() local [all …]
|
/fs/vboxsf/ |
D | utils.c | 53 umode_t 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/xfs/scrub/ |
D | inode.c | 72 uint16_t mode, in xchk_inode_extsize() argument 78 fa = xfs_inode_validate_extsize(sc->mp, value, mode, flags); in xchk_inode_extsize() 108 uint16_t mode, in xchk_inode_cowextsize() argument 115 be32_to_cpu(dip->di_cowextsize), mode, flags, in xchk_inode_cowextsize() 127 uint16_t mode, in xchk_inode_flags() argument 149 !S_ISDIR(mode)) in xchk_inode_flags() 154 !S_ISREG(mode)) in xchk_inode_flags() 172 uint16_t mode, in xchk_inode_flags2() argument 190 if ((flags2 & XFS_DIFLAG2_DAX) && !(S_ISREG(mode) || S_ISDIR(mode))) in xchk_inode_flags2() 194 if ((flags2 & XFS_DIFLAG2_REFLINK) && !S_ISREG(mode)) in xchk_inode_flags2() [all …]
|
/fs/xfs/ |
D | xfs_sysctl.c | 74 .mode = 0644, 83 .mode = 0644, 92 .mode = 0644, 102 .mode = 0644, 111 .mode = 0644, 120 .mode = 0644, 129 .mode = 0644, 138 .mode = 0644, 147 .mode = 0644, 156 .mode = 0644, [all …]
|
/fs/ramfs/ |
D | inode.c | 44 umode_t mode; member 57 const struct inode *dir, umode_t mode, dev_t dev) in ramfs_get_inode() argument 63 inode_init_owner(&init_user_ns, inode, dir, mode); in ramfs_get_inode() 68 switch (mode & S_IFMT) { in ramfs_get_inode() 70 init_special_inode(inode, mode, dev); in ramfs_get_inode() 98 struct dentry *dentry, umode_t mode, dev_t dev) in ramfs_mknod() argument 100 struct inode * inode = ramfs_get_inode(dir->i_sb, dir, mode, dev); in ramfs_mknod() 113 struct dentry *dentry, umode_t mode) in ramfs_mkdir() argument 115 int retval = ramfs_mknod(&init_user_ns, dir, dentry, mode | S_IFDIR, 0); in ramfs_mkdir() 122 struct dentry *dentry, umode_t mode, bool excl) in ramfs_create() argument [all …]
|
/fs/f2fs/ |
D | acl.c | 211 umode_t mode = inode->i_mode; in f2fs_acl_update_mode() local 215 mode = F2FS_I(inode)->i_acl_mode; in f2fs_acl_update_mode() 217 error = posix_acl_equiv_mode(*acl, &mode); in f2fs_acl_update_mode() 224 mode &= ~S_ISGID; in f2fs_acl_update_mode() 225 *mode_p = mode; in f2fs_acl_update_mode() 237 umode_t mode = inode->i_mode; in __f2fs_set_acl() local 244 &mode, &acl); in __f2fs_set_acl() 247 set_acl_inode(inode, mode); in __f2fs_set_acl() 311 umode_t mode = *mode_p; in f2fs_acl_create_masq() local 319 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 53 res = mode & 0777; in unixmode2p9mode() 54 if (S_ISDIR(mode)) in unixmode2p9mode() 58 if (S_ISSOCK(mode)) in unixmode2p9mode() 60 if (S_ISFIFO(mode)) in unixmode2p9mode() 62 if (S_ISBLK(mode)) in unixmode2p9mode() 64 if (S_ISCHR(mode)) in unixmode2p9mode() 68 if ((mode & S_ISUID) == S_ISUID) in unixmode2p9mode() 70 if ((mode & S_ISGID) == S_ISGID) in unixmode2p9mode() 72 if ((mode & S_ISVTX) == S_ISVTX) in unixmode2p9mode() [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 229 hi->mode = 0; in hostfs_alloc_inode() 301 fmode_t mode; in hostfs_open() local 305 mode = file->f_mode & (FMODE_READ | FMODE_WRITE); in hostfs_open() 306 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open() 309 mode |= HOSTFS_I(ino)->mode; in hostfs_open() 314 if (mode & FMODE_READ) in hostfs_open() 316 if (mode & FMODE_WRITE) in hostfs_open() 330 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open() 335 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_inode_buf.c | 340 mode_t mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify_fork() local 352 if (S_ISDIR(mode) || S_ISLNK(mode)) { in xfs_dinode_verify_fork() 368 if (S_ISREG(mode) && whichfork == XFS_DATA_FORK) in xfs_dinode_verify_fork() 423 uint16_t mode; in xfs_dinode_verify() local 449 mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify() 450 if (mode && xfs_mode_to_ftype(mode) == XFS_DIR3_FT_UNKNOWN) in xfs_dinode_verify() 454 if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0) in xfs_dinode_verify() 458 if (mode && in xfs_dinode_verify() 463 if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize) in xfs_dinode_verify() 468 if (mode && (flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp) in xfs_dinode_verify() [all …]
|
/fs/proc/ |
D | generic.c | 39 if (S_ISLNK(pde->mode)) in pde_free() 133 de->mode = inode->i_mode; in proc_notify_change() 311 de->low_ino, de->mode >> 12)) { in proc_readdir_de() 394 umode_t mode, in __proc_create() argument 442 ent->mode = mode; in __proc_create() 482 struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode, in _proc_mkdir() argument 487 if (mode == 0) in _proc_mkdir() 488 mode = S_IRUGO | S_IXUGO; in _proc_mkdir() 490 ent = __proc_create(&parent, name, S_IFDIR | mode, 2); in _proc_mkdir() 504 struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode, in proc_mkdir_data() argument [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 | 84 umode_t mode; member 114 opts->mode = DEBUGFS_DEFAULT_MODE; in debugfs_parse_options() 141 opts->mode = option & S_IALLUGO; in debugfs_parse_options() 160 inode->i_mode |= opts->mode; in debugfs_apply_options() 195 if (opts->mode != DEBUGFS_DEFAULT_MODE) in debugfs_show_options() 196 seq_printf(m, ",mode=%o", opts->mode); in debugfs_show_options() 388 static struct dentry *__debugfs_create_file(const char *name, umode_t mode, in __debugfs_create_file() argument 396 if (!(mode & S_IFMT)) in __debugfs_create_file() 397 mode |= S_IFREG; in __debugfs_create_file() 398 BUG_ON(!S_ISREG(mode)); in __debugfs_create_file() [all …]
|
/fs/adfs/ |
D | inode.c | 91 umode_t mode, rmask; in adfs_atts2mode() local 95 mode = S_IRUGO & asb->s_owner_mask; in adfs_atts2mode() 96 return S_IFDIR | S_IXUGO | mode; in adfs_atts2mode() 111 mode = S_IFREG; in adfs_atts2mode() 114 mode |= rmask & asb->s_owner_mask; in adfs_atts2mode() 117 mode |= S_IWUGO & asb->s_owner_mask; in adfs_atts2mode() 120 mode |= rmask & asb->s_other_mask; in adfs_atts2mode() 123 mode |= S_IWUGO & asb->s_other_mask; in adfs_atts2mode() 124 return mode; in adfs_atts2mode() 135 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/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 struct dentry *dentry, 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/crypto/ |
D | keysetup.c | 100 fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, in fscrypt_allocate_skcipher() argument 106 tfm = crypto_alloc_skcipher(mode->cipher_str, 0, 0); in fscrypt_allocate_skcipher() 111 mode->friendly_name, mode->cipher_str); in fscrypt_allocate_skcipher() 115 mode->cipher_str, PTR_ERR(tfm)); in fscrypt_allocate_skcipher() 118 if (!xchg(&mode->logged_cryptoapi_impl, 1)) { in fscrypt_allocate_skcipher() 126 mode->friendly_name, crypto_skcipher_driver_name(tfm)); in fscrypt_allocate_skcipher() 128 if (WARN_ON_ONCE(crypto_skcipher_ivsize(tfm) != mode->ivsize)) { in fscrypt_allocate_skcipher() 133 err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize); in fscrypt_allocate_skcipher() 196 struct fscrypt_mode *mode = ci->ci_mode; in setup_per_mode_enc_key() local 197 const u8 mode_num = mode - fscrypt_modes; in setup_per_mode_enc_key() [all …]
|
/fs/configfs/ |
D | inode.c | 78 umode_t mode = iattr->ia_mode; in configfs_setattr() local 81 mode &= ~S_ISGID; in configfs_setattr() 82 sd_iattr->ia_mode = sd->s_mode = mode; in configfs_setattr() 88 static inline void set_default_inode_attr(struct inode * inode, umode_t mode) in set_default_inode_attr() argument 90 inode->i_mode = mode; in set_default_inode_attr() 105 struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd, in configfs_new_inode() argument 121 set_default_inode_attr(inode, mode); in configfs_new_inode() 157 struct inode *configfs_create(struct dentry *dentry, umode_t mode) in configfs_create() argument 170 inode = configfs_new_inode(mode, sd, dentry->d_sb); in configfs_create()
|
/fs/ksmbd/ |
D | smbacl.c | 137 umode_t mode = 0; in access_flags_to_mode() local 140 mode = 0777; in access_flags_to_mode() 142 return mode; in access_flags_to_mode() 146 mode = 0444; in access_flags_to_mode() 148 mode |= 0222; in access_flags_to_mode() 150 mode |= 0111; in access_flags_to_mode() 153 mode |= 0111; in access_flags_to_mode() 156 mode = ~mode; in access_flags_to_mode() 158 ksmbd_debug(SMB, "access flags 0x%x mode now %04o\n", flags, mode); in access_flags_to_mode() 160 return mode; in access_flags_to_mode() [all …]
|