| /linux/fs/squashfs/ |
| H A D | inode.c | 68 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode() 72 if (inode->i_mode & S_IFMT) in squashfs_new_inode() 172 inode->i_mode |= S_IFREG; in squashfs_read_inode() 230 inode->i_mode |= S_IFREG; in squashfs_read_inode() 260 inode->i_mode |= S_IFDIR; in squashfs_read_inode() 285 inode->i_mode |= S_IFDIR; in squashfs_read_inode() 318 inode->i_mode |= S_IFLNK; in squashfs_read_inode() 353 inode->i_mode |= S_IFCHR; in squashfs_read_inode() 355 inode->i_mode |= S_IFBLK; in squashfs_read_inode() 358 init_special_inode(inode, inode->i_mode, new_decode_dev(rdev)); in squashfs_read_inode() [all …]
|
| /linux/fs/f2fs/ |
| H A D | inode.c | 89 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || in __get_inode_rdev() 90 S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { in __get_inode_rdev() 102 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) { in __set_inode_rdev() 311 if (S_ISDIR(inode->i_mode) && unlikely(inode->i_nlink == 1)) { in sanity_check_inode() 380 __func__, inode->i_ino, inode->i_mode); in sanity_check_inode() 384 if (f2fs_has_inline_dentry(inode) && !S_ISDIR(inode->i_mode)) { in sanity_check_inode() 386 __func__, inode->i_ino, inode->i_mode); in sanity_check_inode() 445 inode->i_mode = le16_to_cpu(ri->i_mode); in do_read_inode() 459 if (S_ISDIR(inode->i_mode)) in do_read_inode() 461 else if (S_ISREG(inode->i_mode)) in do_read_inode() [all …]
|
| H A D | namei.c | 168 if (S_ISDIR(inode->i_mode)) in set_compress_new_inode() 267 if (S_ISDIR(inode->i_mode)) in f2fs_new_inode() 321 if (S_ISDIR(inode->i_mode)) in f2fs_new_inode() 540 (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && in f2fs_lookup() 599 } else if (S_ISDIR(inode->i_mode) && unlikely(inode->i_nlink == 1)) { in __do_unlink() 834 init_special_inode(inode, inode->i_mode, rdev); in f2fs_mknod() 878 init_special_inode(inode, inode->i_mode, WHITEOUT_DEV); in __f2fs_tmpfile() 976 bool old_is_dir = S_ISDIR(old_inode->i_mode); in f2fs_rename() 1143 if (S_ISDIR(old_inode->i_mode)) in f2fs_rename() 1227 if (S_ISDIR(old_inode->i_mode)) { in f2fs_cross_rename() [all …]
|
| /linux/fs/coda/ |
| H A D | cnode.c | 30 if (S_ISREG(inode->i_mode)) { in coda_fill_inode() 33 } else if (S_ISDIR(inode->i_mode)) { in coda_fill_inode() 36 } else if (S_ISLNK(inode->i_mode)) { in coda_fill_inode() 42 init_special_inode(inode, inode->i_mode, huge_decode_dev(attr->va_rdev)); in coda_fill_inode() 81 } else if ((inode->i_mode & S_IFMT) != inode_type) { in coda_iget() 174 inode->i_mode = 0444; in coda_cnode_makectl()
|
| /linux/fs/btrfs/ |
| H A D | acl.c | 71 if (!S_ISDIR(inode->i_mode)) in __btrfs_set_acl() 109 umode_t old_mode = inode->i_mode; in btrfs_set_acl() 116 &inode->i_mode, &acl); in btrfs_set_acl() 122 inode->i_mode = old_mode; in btrfs_set_acl()
|
| /linux/fs/ntfs3/ |
| H A D | xattr.c | 613 if (S_ISLNK(inode->i_mode)) in ntfs_set_acl_ex() 616 mode = inode->i_mode; in ntfs_set_acl_ex() 630 if (!S_ISDIR(inode->i_mode)) in ntfs_set_acl_ex() 658 if (inode->i_mode != mode) { in ntfs_set_acl_ex() 659 umode_t old_mode = inode->i_mode; in ntfs_set_acl_ex() 660 inode->i_mode = mode; in ntfs_set_acl_ex() 663 inode->i_mode = old_mode; in ntfs_set_acl_ex() 697 err = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); in ntfs_init_acl() 733 if (S_ISLNK(inode->i_mode)) in ntfs_acl_chmod() 736 return posix_acl_chmod(idmap, dentry, inode->i_mode); in ntfs_acl_chmod() [all …]
|
| /linux/fs/crypto/ |
| H A D | keysetup.c | 86 if (S_ISREG(inode->i_mode)) in select_encryption_mode() 89 if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) in select_encryption_mode() 93 inode->i_ino, (inode->i_mode & S_IFMT)); in select_encryption_mode() 251 if (mk->mk_secret.is_hw_wrapped && S_ISREG(inode->i_mode)) { in setup_per_mode_enc_key() 703 S_ISDIR(inode->i_mode)); in fscrypt_get_encryption_info() 748 if (WARN_ON_ONCE(inode->i_mode == 0)) in fscrypt_prepare_new_inode() 755 if (!S_ISREG(inode->i_mode) && in fscrypt_prepare_new_inode() 756 !S_ISDIR(inode->i_mode) && in fscrypt_prepare_new_inode() 757 !S_ISLNK(inode->i_mode)) in fscrypt_prepare_new_inode() 765 S_ISDIR(inode->i_mode)); in fscrypt_prepare_new_inode() [all …]
|
| /linux/fs/ |
| H A D | attr.c | 36 umode_t mode = inode->i_mode; in setattr_should_drop_sgid() 66 umode_t mode = inode->i_mode; in setattr_should_drop_suidgid() 354 inode->i_mode = mode; in setattr_copy() 431 umode_t mode = inode->i_mode; in notify_change() 457 if (S_ISLNK(inode->i_mode)) in notify_change() 502 attr->ia_mode = (inode->i_mode & ~S_ISUID); in notify_change() 509 attr->ia_mode = inode->i_mode; in notify_change()
|
| H A D | remap_range.c | 295 if (S_ISDIR(inode_in->i_mode) || S_ISDIR(inode_out->i_mode)) in __generic_remap_file_range_prep() 297 if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode)) in __generic_remap_file_range_prep() 471 if (S_ISDIR(file_inode(dst_file)->i_mode)) in vfs_dedupe_file_range_one() 512 if (S_ISDIR(src->i_mode)) in vfs_dedupe_file_range() 515 if (!S_ISREG(src->i_mode)) in vfs_dedupe_file_range()
|
| H A D | stack.c | 65 dest->i_mode = src->i_mode; in fsstack_copy_attr_all()
|
| /linux/fs/nfs/ |
| H A D | inode.c | 212 int mode = inode->i_mode; in nfs_zap_caches_locked() 325 inode->i_mode = fattr->mode; in nfs_init_locked() 463 inode->i_mode = fattr->mode; in nfs_fhget() 472 if (S_ISREG(inode->i_mode)) { in nfs_fhget() 477 } else if (S_ISDIR(inode->i_mode)) { in nfs_fhget() 492 } else if (S_ISLNK(inode->i_mode)) { in nfs_fhget() 496 init_special_inode(inode, inode->i_mode, fattr->rdev); in nfs_fhget() 568 else if (S_ISREG(inode->i_mode) && in nfs_fhget() 709 if (S_ISREG(inode->i_mode)) in nfs_setattr() 714 BUG_ON(!S_ISREG(inode->i_mode)); in nfs_setattr() [all …]
|
| H A D | nfs3acl.c | 82 if (S_ISDIR(inode->i_mode)) in nfs3_get_acl() 179 if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) in __nfs3_proc_setacls() 193 if (S_ISDIR(inode->i_mode)) { in __nfs3_proc_setacls() 264 if (S_ISDIR(inode->i_mode)) { in nfs3_set_acl() 284 alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfs3_set_acl()
|
| /linux/fs/ext4/ |
| H A D | acl.c | 204 if (!S_ISDIR(inode->i_mode)) in __ext4_set_acl() 235 umode_t mode = inode->i_mode; in ext4_set_acl() 255 if (mode != inode->i_mode) in ext4_set_acl() 261 inode->i_mode = mode; in ext4_set_acl() 284 error = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); in ext4_init_acl()
|
| /linux/fs/udf/ |
| H A D | inode.c | 149 inode->i_ino, inode->i_mode, in udf_evict_inode() 498 if (!S_ISREG(inode->i_mode)) in udf_get_block() 1286 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || in udf_setsize() 1287 S_ISLNK(inode->i_mode))) in udf_setsize() 1514 inode->i_mode = sbi->s_fmode; in udf_read_inode() 1517 inode->i_mode = sbi->s_dmode; in udf_read_inode() 1519 inode->i_mode = udf_convert_permissions(fe); in udf_read_inode() 1520 inode->i_mode &= ~sbi->s_umask; in udf_read_inode() 1610 inode->i_mode |= S_IFDIR; in udf_read_inode() 1620 inode->i_mode |= S_IFREG; in udf_read_inode() [all …]
|
| /linux/fs/ntfs/ |
| H A D | ea.c | 452 inode->i_mode = le32_to_cpu(v); in ntfs_ea_get_wsl_inode() 456 inode->i_mode |= 0777; in ntfs_ea_get_wsl_inode() 497 v = cpu_to_le32(inode->i_mode); in ntfs_ea_set_wsl_inode() 917 if (S_ISREG(inode->i_mode)) { in ntfs_setxattr() 926 if (S_ISDIR(inode->i_mode)) in ntfs_setxattr() 938 inode->i_mode &= ~0222; in ntfs_setxattr() 940 inode->i_mode |= 0222; in ntfs_setxattr() 1035 if (S_ISLNK(inode->i_mode)) in ntfs_set_acl_ex() 1038 mode = inode->i_mode; in ntfs_set_acl_ex() 1052 if (!S_ISDIR(inode->i_mode)) in ntfs_set_acl_ex() [all …]
|
| /linux/fs/ext2/ |
| H A D | acl.c | 197 if (!S_ISDIR(inode->i_mode)) in __ext2_set_acl() 228 umode_t mode = inode->i_mode; in ext2_set_acl() 239 inode->i_mode = mode; in ext2_set_acl() 258 error = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); in ext2_init_acl()
|
| /linux/fs/afs/ |
| H A D | inode.c | 102 inode->i_mode = S_IFREG | (status->mode & S_IALLUGO); in afs_inode_init_from_status() 109 inode->i_mode = S_IFDIR | (status->mode & S_IALLUGO); in afs_inode_init_from_status() 124 inode->i_mode = S_IFDIR | 0555; in afs_inode_init_from_status() 128 inode->i_mode = S_IFLNK | status->mode; in afs_inode_init_from_status() 200 mode = inode->i_mode; in afs_apply_status() 203 WRITE_ONCE(inode->i_mode, mode); in afs_apply_status() 632 if (S_ISDIR(inode->i_mode)) in afs_getattr() 670 if ((S_ISDIR(inode->i_mode) || in afs_evict_inode() 671 S_ISLNK(inode->i_mode)) && in afs_evict_inode() 785 if (!S_ISREG(inode->i_mode)) in afs_setattr() [all …]
|
| H A D | security.c | 470 mask, access, S_ISDIR(inode->i_mode) ? "dir" : "file"); in afs_permission() 473 if (S_ISDIR(inode->i_mode)) { in afs_permission() 486 if ((mask & MAY_EXEC) && !(inode->i_mode & S_IXUSR)) in afs_permission() 491 if (!(inode->i_mode & S_IRUSR)) in afs_permission() 496 if (!(inode->i_mode & S_IWUSR)) in afs_permission()
|
| /linux/fs/overlayfs/ |
| H A D | inode.c | 139 if (S_ISDIR(dentry->d_inode->i_mode)) { in ovl_map_dev_ino() 179 bool is_dir = S_ISDIR(inode->i_mode); in ovl_getattr() 330 !special_file(realinode->i_mode) && mask & MAY_WRITE) { in ovl_permission() 551 if (type == ACL_TYPE_DEFAULT && !S_ISDIR(inode->i_mode)) in ovl_set_acl() 560 if (unlikely(inode->i_mode & S_ISGID) && type == ACL_TYPE_ACCESS && in ovl_set_acl() 833 if (S_ISDIR(inode->i_mode)) in ovl_lockdep_annotate_inode_mutex_key() 881 if (S_ISDIR(inode->i_mode)) { in ovl_map_ino() 909 inode->i_mode = mode; in ovl_fill_inode() 1072 if (S_ISDIR(inode->i_mode) && strict) { in ovl_verify_inode() 1160 trap->i_mode = S_IFDIR; in ovl_get_trap_inode() [all …]
|
| /linux/fs/jffs2/ |
| H A D | acl.c | 247 if (inode->i_mode != mode) { in jffs2_set_acl() 261 if (!S_ISDIR(inode->i_mode)) in jffs2_set_acl() 273 int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, umode_t *i_mode) in jffs2_init_acl_pre() argument 280 rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl); in jffs2_init_acl_pre()
|
| /linux/include/uapi/linux/ |
| H A D | minix_fs.h | 36 __u16 i_mode; member 52 __u16 i_mode; member
|
| /linux/fs/xfs/ |
| H A D | xfs_iops.c | 386 error = xfs_dentry_mode_to_name(&name, dentry, inode->i_mode); in xfs_vn_link() 487 omode = d_inode(ndentry)->i_mode; in xfs_vn_rename() 494 d_inode(odentry)->i_mode); in xfs_vn_rename() 701 stat->mode = inode->i_mode; in xfs_vn_getattr() 734 switch (inode->i_mode & S_IFMT) { in xfs_vn_getattr() 888 error = posix_acl_chmod(idmap, dentry, inode->i_mode); in xfs_setattr_nonsize() 923 ASSERT(S_ISREG(inode->i_mode)); in xfs_vn_setattr_size() 1351 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_inode_supports_dax() 1444 if (S_ISDIR(inode->i_mode)) { in xfs_setup_inode() 1470 if (S_ISREG(inode->i_mode) && XFS_IS_REALTIME_INODE(ip)) in xfs_setup_inode() [all …]
|
| /linux/fs/smb/client/ |
| H A D | dir.c | 242 if ((oflags & __O_REGULAR) && !S_ISREG(newinode->i_mode)) { 248 if (S_ISDIR(newinode->i_mode)) { 254 if (!S_ISREG(newinode->i_mode)) { 407 if (dir->i_mode & S_ISGID) 441 if ((*oplock & CIFS_CREATE_ACTION) && S_ISREG(newinode->i_mode)) { 443 newinode->i_mode = mode; 446 if (dir->i_mode & S_ISGID) 465 if ((oflags & __O_REGULAR) && !S_ISREG(newinode->i_mode)) { 469 if (S_ISDIR(newinode->i_mode)) { 594 is_regular = S_ISREG(inode->i_mode); [all …]
|
| /linux/fs/xfs/scrub/ |
| H A D | findparent.c | 150 if (!S_ISDIR(VFS_IC(dp)->i_mode)) in xrep_findparent_want_scan_file() 330 ASSERT(S_ISDIR(VFS_IC(sc->ip)->i_mode)); in xrep_findparent_scan() 417 if (!S_ISDIR(VFS_I(fpi.dp)->i_mode)) { in xrep_findparent_confirm() 479 if (S_ISDIR(pip->i_mode)) { in xrep_findparent_from_dcache()
|
| /linux/fs/ocfs2/ |
| H A D | namei.c | 567 fe->i_mode = cpu_to_le16(inode->i_mode); in __ocfs2_mknod_locked() 568 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) in __ocfs2_mknod_locked() 588 if (S_ISDIR(inode->i_mode) && ocfs2_supports_inline_data(osb)) { in __ocfs2_mknod_locked() 706 if (S_ISDIR(inode->i_mode)) in ocfs2_link() 868 if (S_ISDIR(inode->i_mode)) { in ocfs2_inode_is_unlinkable() 948 if (S_ISDIR(inode->i_mode)) { in ocfs2_unlink() 1002 if (S_ISDIR(inode->i_mode)) in ocfs2_unlink() 1010 if (S_ISDIR(inode->i_mode)) in ocfs2_unlink() 1016 if (S_ISDIR(inode->i_mode)) in ocfs2_unlink() 1278 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() [all …]
|