Home
last modified time | relevance | path

Searched refs:S_IFMT (Results 1 – 93 of 93) sorted by relevance

/linux-4.4.14/include/uapi/linux/
Dstat.h7 #define S_IFMT 00170000 macro
19 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
20 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
21 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
22 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
23 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
24 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
25 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
Dgfs2_ondisk.h213 #define DT2IF(dt) (((dt) << 12) & S_IFMT)
214 #define IF2DT(sif) (((sif) & S_IFMT) >> 12)
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/
Dobdo.c94 (src->i_mode & S_IFMT); in obdo_from_inode()
98 dst->o_mode = (dst->o_mode & S_IFMT) | in obdo_from_inode()
157 attr->ia_mode = (attr->ia_mode & ~S_IFMT)|(oa->o_mode & S_IFMT); in iattr_from_obdo()
162 attr->ia_mode = (attr->ia_mode & S_IFMT)|(oa->o_mode & ~S_IFMT); in iattr_from_obdo()
/linux-4.4.14/fs/nfsd/
Dnfsproc.c296 type = attr->ia_mode & S_IFMT; in nfsd_proc_create()
297 mode = attr->ia_mode & ~S_IFMT; in nfsd_proc_create()
302 type = inode->i_mode & S_IFMT; in nfsd_proc_create()
328 type = inode->i_mode & S_IFMT; in nfsd_proc_create()
329 mode = inode->i_mode & ~S_IFMT; in nfsd_proc_create()
358 if (inode && type != (inode->i_mode & S_IFMT)) in nfsd_proc_create()
Dnfs3proc.c227 attr->ia_mode &= ~S_IFMT; in nfsd3_proc_create()
232 attr->ia_mode = (attr->ia_mode & ~S_IFMT) | S_IFREG; in nfsd3_proc_create()
Dnfsfh.c64 mode &= S_IFMT; in nfsd_mode_check()
Dnfsxdr.c152 type = (stat->mode & S_IFMT); in encode_fattr()
Dnfs3xdr.c167 *p++ = htonl(nfs3_ftypes[(stat->mode & S_IFMT) >> 12]); in encode_fattr3()
Dvfs.c1731 type = d_inode(rdentry)->i_mode & S_IFMT; in nfsd_unlink()
Dnfs4xdr.c351 iattr->ia_mode &= (S_IFMT | S_IALLUGO); in nfsd4_decode_fattr()
2122 switch (mode & S_IFMT) { in nfs4_file_type()
/linux-4.4.14/fs/xfs/
Dxfs_iops.c105 namep->type = xfs_mode_to_ftype[(mode & S_IFMT) >> S_SHIFT]; in xfs_dentry_to_name()
469 switch (inode->i_mode & S_IFMT) { in xfs_vn_getattr()
504 ip->i_d.di_mode &= S_IFMT; in xfs_setattr_mode()
505 ip->i_d.di_mode |= mode & ~S_IFMT; in xfs_setattr_mode()
507 inode->i_mode &= S_IFMT; in xfs_setattr_mode()
508 inode->i_mode |= mode & ~S_IFMT; in xfs_setattr_mode()
1236 switch (inode->i_mode & S_IFMT) { in xfs_setup_inode()
1260 switch (inode->i_mode & S_IFMT) { in xfs_setup_inode()
Dxfs_symlink.c280 error = xfs_dir_ialloc(&tp, dp, S_IFLNK | (mode & ~S_IFMT), 1, 0, in xfs_symlink()
Dxfs_bmap_util.c1740 if ((ip->i_d.di_mode & S_IFMT) != (tip->i_d.di_mode & S_IFMT)) { in xfs_swap_extents()
Dxfs_icache.c101 switch (ip->i_d.di_mode & S_IFMT) { in xfs_inode_free()
Dxfs_inode.c852 switch (mode & S_IFMT) { in xfs_ialloc()
/linux-4.4.14/security/tomoyo/
Dtomoyo.c236 switch (mode & S_IFMT) { in tomoyo_path_mknod()
248 switch (mode & S_IFMT) { in tomoyo_path_mknod()
Daudit.c117 switch (mode & S_IFMT) { in tomoyo_filetype()
Dcondition.c997 value = stat->mode & S_IFMT; in tomoyo_condition()
/linux-4.4.14/fs/9p/
Dvfs_inode.c282 switch (mode & S_IFMT) { in v9fs_init_inode()
354 mode, mode & S_IFMT); in v9fs_init_inode()
476 if ((inode->i_mode & S_IFMT) != (umode & S_IFMT)) in v9fs_test_inode()
1401 if ((inode->i_mode & S_IFMT) != (umode & S_IFMT)) in v9fs_refresh_inode()
Dvfs_inode_dotl.c77 if ((inode->i_mode & S_IFMT) != (st->st_mode & S_IFMT)) in v9fs_test_inode_dotl()
937 if ((inode->i_mode & S_IFMT) != (st->st_mode & S_IFMT)) in v9fs_refresh_inode_dotl()
/linux-4.4.14/fs/cifs/
Dinode.c41 switch (inode->i_mode & S_IFMT) {
240 fattr->cf_mode &= ~S_IFMT;
413 if (unlikely(((*pinode)->i_mode & S_IFMT) !=
414 (fattr.cf_mode & S_IFMT))) {
444 fattr->cf_mode &= ~S_IFMT;
860 if (unlikely(((*inode)->i_mode & S_IFMT) !=
861 (fattr.cf_mode & S_IFMT))) {
893 if ((inode->i_mode & S_IFMT) != (fattr->cf_mode & S_IFMT))
Dreaddir.c106 (inode->i_mode & S_IFMT) == in cifs_prime_dcache()
107 (fattr->cf_mode & S_IFMT)) { in cifs_prime_dcache()
180 fattr->cf_mode &= ~S_IFMT; in cifs_fill_common_info()
Dlink.c312 fattr->cf_mode &= ~S_IFMT; in check_mf_symlink()
/linux-4.4.14/fs/fat/
Dfile.c336 perm = *mode_ptr & ~(S_IFMT | mask); in fat_sanitize_mode()
354 *mode_ptr &= S_IFMT | perm; in fat_sanitize_mode()
/linux-4.4.14/fs/nfs/
Dinode.c263 if ((S_IFMT & inode->i_mode) != (S_IFMT & fattr->mode)) in nfs_find_actor()
1245 if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) in nfs_check_inode_attributes()
1663 if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) { in nfs_update_inode()
1767 umode_t newmode = inode->i_mode & S_IFMT; in nfs_update_inode()
Dproc.c272 sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR; in nfs_proc_mknod()
Dnfs2xdr.c306 fattr->mode = (fattr->mode & ~S_IFMT) | S_IFIFO; in decode_fattr()
Dnfs3proc.c696 switch (sattr->ia_mode & S_IFMT) { in nfs3_proc_mknod()
Dnfs3xdr.c658 fattr->mode = (be32_to_cpup(p++) & ~S_IFMT) | fmode; in decode_fattr3()
Ddir.c2448 switch (inode->i_mode & S_IFMT) { in nfs_permission()
Dnfs4xdr.c3819 *mode = tmp & ~S_IFMT; in decode_attr_mode()
Dnfs4proc.c2036 switch (data->o_res.f_attr->mode & S_IFMT) { in nfs4_open_done()
/linux-4.4.14/fs/efivarfs/
Dinode.c28 switch (mode & S_IFMT) { in efivarfs_get_inode()
/linux-4.4.14/fs/tracefs/
Dinode.c399 if (!(mode & S_IFMT)) in tracefs_create_file()
510 switch (dentry->d_inode->i_mode & S_IFMT) { in __tracefs_remove()
/linux-4.4.14/drivers/staging/lustre/lustre/llite/
Dnamei.c92 inode->i_mode = (inode->i_mode & ~S_IFMT) | (body->mode & S_IFMT); in ll_set_inode()
818 switch (mode & S_IFMT) { in ll_mknod()
913 oa->o_mode = body->mode & S_IFMT; in ll_objects_destroy()
Dllite_lib.c1564 inode->i_mode = (inode->i_mode & S_IFMT)|(body->mode & ~S_IFMT); in ll_update_inode()
1566 inode->i_mode = (inode->i_mode & ~S_IFMT)|(body->mode & S_IFMT); in ll_update_inode()
/linux-4.4.14/fs/coda/
Ddir.c533 if ((old_mode & S_IFMT) != (inode->i_mode & S_IFMT)) { in coda_revalidate_inode()
/linux-4.4.14/fs/cramfs/
Dinode.c69 switch (cino->mode & S_IFMT) { in cramino()
92 switch (cramfs_inode->mode & S_IFMT) { in get_cramfs_inode()
/linux-4.4.14/fs/ramfs/
Dinode.c65 switch (mode & S_IFMT) { in ramfs_get_inode()
/linux-4.4.14/fs/fuse/
Ddir.c243 if (ret || (outarg.attr.mode ^ inode->i_mode) & S_IFMT) in fuse_dentry_revalidate()
398 BUG_ON((mode & S_IFMT) != S_IFREG); in fuse_create_open()
545 if ((outarg.attr.mode ^ mode) & S_IFMT) in create_new_entry()
842 stat->mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777); in fuse_fillattr()
895 if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) { in fuse_do_getattr()
1212 ((o->attr.mode ^ inode->i_mode) & S_IFMT)) { in fuse_direntplus_link()
1647 if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) { in fuse_do_setattr()
Dinode.c167 inode->i_mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777); in fuse_change_attributes_common()
255 inode->i_mode = attr->mode & S_IFMT; in fuse_init_inode()
313 } else if ((inode->i_mode ^ attr->mode) & S_IFMT) { in fuse_iget()
/linux-4.4.14/fs/jffs2/
Ddir.c259 type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12; in jffs2_link()
720 rd->type = (mode & S_IFMT) >> 12; in jffs2_mknod()
795 type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12; in jffs2_rename()
Dfs.c290 switch (inode->i_mode & S_IFMT) { in jffs2_iget()
Dreadinode.c1220 switch(jemode_to_cpu(latest_node->mode) & S_IFMT) { in jffs2_do_read_inode_internal()
/linux-4.4.14/init/
Dinitramfs.c81 if (((*p)->mode ^ mode) & S_IFMT) in find_link()
316 if (!sys_newlstat(path, &st) && (st.st_mode ^ fmode) & S_IFMT) { in clean_path()
/linux-4.4.14/fs/nilfs2/
Ddir.c237 nilfs_type_by_mode[S_IFMT >> S_SHIFT] = {
251 de->file_type = nilfs_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in nilfs_set_de_type()
/linux-4.4.14/fs/ext2/
Ddir.c265 static unsigned char ext2_type_by_mode[S_IFMT >> S_SHIFT] = {
279 de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in ext2_set_de_type()
/linux-4.4.14/fs/exofs/
Ddir.c218 static unsigned char exofs_type_by_mode[S_IFMT >> S_SHIFT] = {
232 de->file_type = exofs_type_by_mode[(mode & S_IFMT) >> S_SHIFT]; in exofs_set_de_type()
/linux-4.4.14/fs/efs/
Dinode.c143 switch (inode->i_mode & S_IFMT) { in efs_iget()
/linux-4.4.14/fs/logfs/
Dinode.c55 switch (inode->i_mode & S_IFMT) { in logfs_inode_setops()
Dreadwrite.c132 switch (inode->i_mode & S_IFMT) { in logfs_disk_to_inode()
169 switch (inode->i_mode & S_IFMT) { in logfs_inode_to_disk()
/linux-4.4.14/kernel/bpf/
Dinode.c87 switch (mode & S_IFMT) { in bpf_get_inode()
/linux-4.4.14/fs/overlayfs/
Dcopy_up.c230 stat->mode &= S_IFMT; in ovl_copy_up_locked()
Dinode.c415 mode &= S_IFMT; in ovl_new_inode()
Ddir.c84 switch (stat->mode & S_IFMT) { in ovl_create_real()
/linux-4.4.14/fs/ocfs2/
Docfs2_fs.h429 static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
1633 de->file_type = ocfs2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in ocfs2_set_de_type()
Dinode.c344 switch (inode->i_mode & S_IFMT) { in ocfs2_populate_inode()
/linux-4.4.14/net/sunrpc/
Drpc_pipe.c481 switch (mode & S_IFMT) { in rpc_get_inode()
684 switch (d_inode(dentry)->i_mode & S_IFMT) { in __rpc_depopulate()
724 switch (files[i].mode & S_IFMT) { in rpc_populate()
/linux-4.4.14/fs/f2fs/
Ddir.c52 static unsigned char f2fs_type_by_mode[S_IFMT >> S_SHIFT] = {
64 de->file_type = f2fs_type_by_mode[(mode & S_IFMT) >> S_SHIFT]; in set_de_type()
/linux-4.4.14/fs/hostfs/
Dhostfs_kern.c529 switch (st.mode & S_IFMT) { in read_name()
541 init_special_inode(ino, st.mode & S_IFMT, rdev); in read_name()
/linux-4.4.14/fs/ocfs2/dlmfs/
Ddlmfs.c429 switch (mode & S_IFMT) { in dlmfs_get_inode()
/linux-4.4.14/fs/debugfs/
Dinode.c330 if (!(mode & S_IFMT)) in debugfs_create_file()
/linux-4.4.14/fs/jfs/
Dnamei.c645 filetype = ip->i_mode & S_IFMT; in commitZeroLink()
713 type = ip->i_mode & S_IFMT; in jfs_free_zero_link()
/linux-4.4.14/fs/proc/
Dgeneric.c487 if ((mode & S_IFMT) == 0) in proc_create_data()
Dproc_sysctl.c776 stat->mode = (stat->mode & S_IFMT) | table->mode; in proc_sys_getattr()
/linux-4.4.14/fs/omfs/
Dinode.c53 switch (mode & S_IFMT) { in omfs_new_inode()
/linux-4.4.14/fs/gfs2/
Dglops.c338 switch (ip->i_inode.i_mode & S_IFMT) { in gfs2_dinode_in()
Dinode.c485 switch(ip->i_inode.i_mode & S_IFMT) { in init_dinode()
675 switch(mode & S_IFMT) { in gfs2_create_inode()
/linux-4.4.14/fs/xfs/libxfs/
Dxfs_dir2.c43 const unsigned char xfs_mode_to_ftype[S_IFMT >> S_SHIFT] = {
Dxfs_inode_fork.c123 switch (ip->i_d.di_mode & S_IFMT) { in xfs_iformat_fork()
/linux-4.4.14/fs/ufs/
Dutil.h163 switch (mode & S_IFMT) { in ufs_set_de_type()
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/
Dpack_generic.c2091 oa->o_mode & ((valid & OBD_MD_FLTYPE ? S_IFMT : 0) | in dump_obdo()
2092 (valid & OBD_MD_FLMODE ? ~S_IFMT : 0))); in dump_obdo()
/linux-4.4.14/fs/ubifs/
Ddir.c112 switch (mode & S_IFMT) { in ubifs_new_inode()
Djournal.c429 switch (mode & S_IFMT) { in get_dent_type()
Dsuper.c162 switch (inode->i_mode & S_IFMT) { in ubifs_iget()
/linux-4.4.14/fs/ncpfs/
Dinode.c186 inode->i_mode = (inode->i_mode & ~S_IFMT) | S_IFLNK; in ncp_update_attrs()
/linux-4.4.14/fs/ntfs/
Dinode.c1253 vi->i_mode = base_vi->i_mode & ~S_IFMT; in ntfs_read_locked_attr_inode()
1519 vi->i_mode = base_vi->i_mode & ~S_IFMT; in ntfs_read_locked_index_inode()
/linux-4.4.14/fs/hugetlbfs/
Dinode.c749 switch (mode & S_IFMT) { in hugetlbfs_get_inode()
/linux-4.4.14/arch/s390/kernel/
Ddebug.c345 rc->mode = mode & ~S_IFMT; in debug_info_create()
/linux-4.4.14/kernel/
Dauditfilter.c401 if (f->val & ~S_IFMT) in audit_field_valid()
Dauditsc.c184 ((n->mode & S_IFMT) == mode)) in audit_match_filetype()
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/
Dmdc_locks.c286 it->it_create_mode = (it->it_create_mode & ~S_IFMT) | S_IFREG; in mdc_intent_open_pack()
/linux-4.4.14/fs/
Dnamei.c2684 switch (inode->i_mode & S_IFMT) { in may_open()
3517 switch (mode & S_IFMT) { in may_mknod()
3553 switch (mode & S_IFMT) { in SYSCALL_DEFINE4()
/linux-4.4.14/fs/ext4/
Dext4.h3082 static unsigned char ext4_type_by_mode[S_IFMT >> S_SHIFT] = {
3096 de->file_type = ext4_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in ext4_set_de_type()
/linux-4.4.14/fs/ceph/
Dfile.c144 switch (inode->i_mode & S_IFMT) { in ceph_init_file()
Dinode.c790 switch (inode->i_mode & S_IFMT) { in fill_inode()
/linux-4.4.14/mm/
Dnommu.c964 switch (file_inode(file)->i_mode & S_IFMT) { in validate_mmap_request()
Dshmem.c1440 switch (mode & S_IFMT) { in shmem_get_inode()
/linux-4.4.14/drivers/staging/lustre/lustre/include/lustre/
Dlustre_idl.h957 #define IFTODT(type) (((type) & S_IFMT) >> IFSHIFT)
/linux-4.4.14/fs/btrfs/
Dinode.c87 static unsigned char btrfs_type_by_mode[S_IFMT >> S_SHIFT] = {
3757 switch (inode->i_mode & S_IFMT) { in btrfs_read_locked_inode()
6255 return btrfs_type_by_mode[(inode->i_mode & S_IFMT) >> S_SHIFT]; in btrfs_inode_type()
Dsend.c2578 (int)(mode & S_IFMT)); in send_create_inode()
Dioctl.c2578 switch (inode->i_mode & S_IFMT) { in btrfs_ioctl_defrag()
/linux-4.4.14/security/selinux/
Dhooks.c1142 switch (mode & S_IFMT) { in inode_mode_to_security_class()