Home
last modified time | relevance | path

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

12345678910>>...13

/fs/debugfs/
Dfile.c45 static struct dentry *debugfs_create_mode(const char *name, umode_t mode, in debugfs_create_mode() argument
52 if (!(mode & S_IWUGO)) in debugfs_create_mode()
53 return debugfs_create_file(name, mode, parent, value, fops_ro); in debugfs_create_mode()
55 if (!(mode & S_IRUGO)) in debugfs_create_mode()
56 return debugfs_create_file(name, mode, parent, value, fops_wo); in debugfs_create_mode()
58 return debugfs_create_file(name, mode, parent, value, fops); in debugfs_create_mode()
99 struct dentry *debugfs_create_u8(const char *name, umode_t mode, in debugfs_create_u8() argument
102 return debugfs_create_mode(name, mode, parent, value, &fops_u8, in debugfs_create_u8()
145 struct dentry *debugfs_create_u16(const char *name, umode_t mode, in debugfs_create_u16() argument
148 return debugfs_create_mode(name, mode, parent, value, &fops_u16, in debugfs_create_u16()
[all …]
/fs/xfs/
Dxfs_sysctl.c73 .mode = 0644,
82 .mode = 0644,
91 .mode = 0644,
101 .mode = 0644,
110 .mode = 0644,
119 .mode = 0644,
128 .mode = 0644,
137 .mode = 0644,
146 .mode = 0644,
155 .mode = 0644,
[all …]
Dxfs_iops.c101 int mode) in xfs_dentry_to_name() argument
105 namep->type = xfs_mode_to_ftype[(mode & S_IFMT) >> S_SHIFT]; in xfs_dentry_to_name()
130 umode_t mode, in xfs_generic_create() argument
144 if (S_ISCHR(mode) || S_ISBLK(mode)) { in xfs_generic_create()
152 error = posix_acl_create(dir, &mode, &default_acl, &acl); in xfs_generic_create()
157 xfs_dentry_to_name(&name, dentry, mode); in xfs_generic_create()
158 error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip); in xfs_generic_create()
160 error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip); in xfs_generic_create()
210 umode_t mode, in xfs_vn_mknod() argument
213 return xfs_generic_create(dir, dentry, mode, rdev, false); in xfs_vn_mknod()
[all …]
/fs/
Dposix_acl.c246 umode_t mode = 0; in posix_acl_equiv_mode() local
258 mode |= (pa->e_perm & S_IRWXO) << 6; in posix_acl_equiv_mode()
261 mode |= (pa->e_perm & S_IRWXO) << 3; in posix_acl_equiv_mode()
264 mode |= pa->e_perm & S_IRWXO; in posix_acl_equiv_mode()
267 mode = (mode & ~S_IRWXG) | in posix_acl_equiv_mode()
280 *mode_p = (*mode_p & ~S_IRWXUGO) | mode; in posix_acl_equiv_mode()
289 posix_acl_from_mode(umode_t mode, gfp_t flags) in posix_acl_from_mode() argument
296 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6; in posix_acl_from_mode()
299 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3; in posix_acl_from_mode()
302 acl->a_entries[2].e_perm = (mode & S_IRWXO); in posix_acl_from_mode()
[all …]
Dopen.c236 int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in vfs_fallocate() argument
245 if (mode & ~FALLOC_FL_SUPPORTED_MASK) in vfs_fallocate()
249 if ((mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_ZERO_RANGE)) == in vfs_fallocate()
254 if ((mode & FALLOC_FL_PUNCH_HOLE) && in vfs_fallocate()
255 !(mode & FALLOC_FL_KEEP_SIZE)) in vfs_fallocate()
259 if ((mode & FALLOC_FL_COLLAPSE_RANGE) && in vfs_fallocate()
260 (mode & ~FALLOC_FL_COLLAPSE_RANGE)) in vfs_fallocate()
264 if ((mode & FALLOC_FL_INSERT_RANGE) && in vfs_fallocate()
265 (mode & ~FALLOC_FL_INSERT_RANGE)) in vfs_fallocate()
274 if ((mode & ~FALLOC_FL_KEEP_SIZE) && IS_APPEND(inode)) in vfs_fallocate()
[all …]
Dblock_dev.c1158 static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part);
1167 static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) in __blkdev_get() argument
1175 if (mode & FMODE_READ) in __blkdev_get()
1177 if (mode & FMODE_WRITE) in __blkdev_get()
1211 ret = disk->fops->open(bdev, mode); in __blkdev_get()
1253 ret = __blkdev_get(whole, mode, 1); in __blkdev_get()
1278 ret = bdev->bd_disk->fops->open(bdev, mode); in __blkdev_get()
1306 __blkdev_put(bdev->bd_contains, mode, 1); in __blkdev_get()
1337 int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder) in blkdev_get() argument
1342 WARN_ON_ONCE((mode & FMODE_EXCL) && !holder); in blkdev_get()
[all …]
/fs/dlm/
Dast.c30 lkb->lkb_last_bast.mode, in dlm_dump_lkb_callbacks()
38 lkb->lkb_last_cast.mode, in dlm_dump_lkb_callbacks()
47 lkb->lkb_callbacks[i].mode, in dlm_dump_lkb_callbacks()
53 int dlm_add_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode, in dlm_add_lkb_callback() argument
76 prev_mode = lkb->lkb_callbacks[i-1].mode; in dlm_add_lkb_callback()
78 if ((prev_mode == mode) || in dlm_add_lkb_callback()
79 (prev_mode > mode && prev_mode > DLM_LOCK_PR)) { in dlm_add_lkb_callback()
85 mode, in dlm_add_lkb_callback()
95 lkb->lkb_callbacks[i].mode = mode; in dlm_add_lkb_callback()
105 flags, mode, status, sbflags); in dlm_add_lkb_callback()
[all …]
/fs/9p/
Dvfs_inode.c64 static u32 unixmode2p9mode(struct v9fs_session_info *v9ses, umode_t mode) in unixmode2p9mode() argument
67 res = mode & 0777; in unixmode2p9mode()
68 if (S_ISDIR(mode)) in unixmode2p9mode()
72 if (S_ISSOCK(mode)) in unixmode2p9mode()
74 if (S_ISFIFO(mode)) in unixmode2p9mode()
76 if (S_ISBLK(mode)) in unixmode2p9mode()
78 if (S_ISCHR(mode)) in unixmode2p9mode()
82 if ((mode & S_ISUID) == S_ISUID) in unixmode2p9mode()
84 if ((mode & S_ISGID) == S_ISGID) in unixmode2p9mode()
86 if ((mode & S_ISVTX) == S_ISVTX) in unixmode2p9mode()
[all …]
/fs/ramfs/
Dinode.c54 const struct inode *dir, umode_t mode, dev_t dev) in ramfs_get_inode() argument
60 inode_init_owner(inode, dir, 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, umode_t mode, dev_t dev) in ramfs_mknod() argument
95 struct inode * inode = ramfs_get_inode(dir->i_sb, dir, mode, dev); in ramfs_mknod()
107 static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) in ramfs_mkdir() argument
109 int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); in ramfs_mkdir()
115 static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) in ramfs_create() argument
117 return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); in ramfs_create()
[all …]
/fs/hostfs/
Dhostfs_user.c24 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 …]
Dhostfs_kern.c25 fmode_t mode; member
230 hi->mode = 0; in hostfs_alloc_inode()
308 fmode_t mode; in hostfs_open() local
312 mode = file->f_mode & (FMODE_READ | FMODE_WRITE); in hostfs_open()
313 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open()
316 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
321 if (mode & FMODE_READ) in hostfs_open()
323 if (mode & FMODE_WRITE) in hostfs_open()
337 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open()
342 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open()
[all …]
/fs/sysfs/
Dgroup.c44 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, 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/adfs/
Dinode.c92 umode_t mode, rmask; in adfs_atts2mode() local
96 mode = S_IRUGO & asb->s_owner_mask; in adfs_atts2mode()
97 return S_IFDIR | S_IXUGO | mode; in adfs_atts2mode()
112 mode = S_IFREG; in adfs_atts2mode()
115 mode |= rmask & asb->s_owner_mask; in adfs_atts2mode()
118 mode |= S_IWUGO & asb->s_owner_mask; in adfs_atts2mode()
121 mode |= rmask & asb->s_other_mask; in adfs_atts2mode()
124 mode |= S_IWUGO & asb->s_other_mask; in adfs_atts2mode()
125 return mode; in adfs_atts2mode()
135 umode_t mode; in adfs_mode2atts() local
[all …]
/fs/f2fs/
Dacl.c213 umode_t mode = inode->i_mode; in __f2fs_set_acl() local
219 error = posix_acl_update_mode(inode, &mode, &acl); in __f2fs_set_acl()
222 set_acl_inode(inode, mode); in __f2fs_set_acl()
285 umode_t mode = *mode_p; in f2fs_acl_create_masq() local
293 pa->e_perm &= (mode >> 6) | ~S_IRWXO; in f2fs_acl_create_masq()
294 mode &= (pa->e_perm << 6) | ~S_IRWXU; in f2fs_acl_create_masq()
307 pa->e_perm &= mode | ~S_IRWXO; in f2fs_acl_create_masq()
308 mode &= pa->e_perm | ~S_IRWXO; in f2fs_acl_create_masq()
322 mask_obj->e_perm &= (mode >> 3) | ~S_IRWXO; in f2fs_acl_create_masq()
323 mode &= (mask_obj->e_perm << 3) | ~S_IRWXG; in f2fs_acl_create_masq()
[all …]
/fs/affs/
Damigaffs.c390 umode_t mode = 0; in prot_to_mode() local
393 mode |= 0200; in prot_to_mode()
395 mode |= 0400; in prot_to_mode()
397 mode |= 0100; in prot_to_mode()
399 mode |= 0020; in prot_to_mode()
401 mode |= 0040; in prot_to_mode()
403 mode |= 0010; in prot_to_mode()
405 mode |= 0002; in prot_to_mode()
407 mode |= 0004; in prot_to_mode()
409 mode |= 0001; in prot_to_mode()
[all …]
/fs/proc/
Dgeneric.c116 de->mode = inode->i_mode; in proc_notify_change()
292 de->low_ino, de->mode >> 12)) { in proc_readdir_de()
357 umode_t mode, in __proc_create() argument
387 ent->mode = mode; in __proc_create()
424 struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode, in proc_mkdir_data() argument
429 if (mode == 0) in proc_mkdir_data()
430 mode = S_IRUGO | S_IXUGO; in proc_mkdir_data()
432 ent = __proc_create(&parent, name, S_IFDIR | mode, 2); in proc_mkdir_data()
448 struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, in proc_mkdir_mode() argument
451 return proc_mkdir_data(name, mode, parent, NULL); in proc_mkdir_mode()
[all …]
/fs/configfs/
Dinode.c101 umode_t mode = iattr->ia_mode; in configfs_setattr() local
104 mode &= ~S_ISGID; in configfs_setattr()
105 sd_iattr->ia_mode = sd->s_mode = mode; in configfs_setattr()
111 static inline void set_default_inode_attr(struct inode * inode, umode_t mode) in set_default_inode_attr() argument
113 inode->i_mode = mode; in set_default_inode_attr()
127 struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd, in configfs_new_inode() argument
143 set_default_inode_attr(inode, mode); in configfs_new_inode()
179 int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct inode *)) in configfs_create() argument
193 inode = configfs_new_inode(mode, sd, dentry->d_sb); in configfs_create()
203 if (S_ISDIR(mode) || S_ISLNK(mode)) in configfs_create()
/fs/hfsplus/
Ddir.c226 u16 mode; in hfsplus_readdir() local
235 mode = be16_to_cpu(entry.file.permissions.mode); in hfsplus_readdir()
236 if (S_ISREG(mode)) in hfsplus_readdir()
238 else if (S_ISLNK(mode)) in hfsplus_readdir()
240 else if (S_ISFIFO(mode)) in hfsplus_readdir()
242 else if (S_ISCHR(mode)) in hfsplus_readdir()
244 else if (S_ISBLK(mode)) in hfsplus_readdir()
246 else if (S_ISSOCK(mode)) in hfsplus_readdir()
475 umode_t mode, dev_t rdev) in hfsplus_mknod() argument
482 inode = hfsplus_new_inode(dir->i_sb, mode); in hfsplus_mknod()
[all …]
/fs/overlayfs/
Doverlayfs.h56 umode_t mode, bool debug) in ovl_do_create() argument
58 int err = vfs_create(dir, dentry, mode, true); in ovl_do_create()
60 pr_debug("create(%pd2, 0%o) = %i\n", dentry, mode, err); in ovl_do_create()
65 umode_t mode, bool debug) in ovl_do_mkdir() argument
67 int err = vfs_mkdir(dir, dentry, mode); in ovl_do_mkdir()
69 pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, err); in ovl_do_mkdir()
74 umode_t mode, dev_t dev, bool debug) in ovl_do_mknod() argument
76 int err = vfs_mknod(dir, dentry, mode, dev); in ovl_do_mknod()
79 dentry, mode, dev, err); in ovl_do_mknod()
183 struct inode *ovl_new_inode(struct super_block *sb, umode_t mode,
Dcopy_up.c200 if (!S_ISLNK(stat->mode)) { in ovl_set_attr()
203 .ia_mode = stat->mode, in ovl_set_attr()
229 umode_t mode = stat->mode; in ovl_copy_up_locked() local
244 stat->mode &= S_IFMT; in ovl_copy_up_locked()
246 stat->mode = mode; in ovl_copy_up_locked()
250 if (S_ISREG(stat->mode)) { in ovl_copy_up_locked()
281 if (!S_ISDIR(stat->mode)) in ovl_copy_up_locked()
332 if (S_ISLNK(stat->mode)) { in ovl_copy_up_one()
/fs/squashfs/
Dsquashfs_fs.h283 __le16 mode; member
292 __le16 mode; member
302 __le16 mode; member
313 __le16 mode; member
324 __le16 mode; member
336 __le16 mode; member
348 __le16 mode; member
362 __le16 mode; member
379 __le16 mode; member
393 __le16 mode; member
/fs/devpts/
Dinode.c55 .mode = 0644,
63 .mode = 0644,
71 .mode = 0444,
81 .mode = 0555,
90 .mode = 0555,
105 umode_t mode; member
173 opts->mode = DEVPTS_DEFAULT_MODE; in parse_mount_options()
212 opts->mode = option & S_IALLUGO; in parse_mount_options()
244 int mode; in mknod_ptmx() local
286 mode = S_IFCHR|opts->ptmxmode; in mknod_ptmx()
[all …]
/fs/nfs/
Dsysctl.c21 .mode = 0644,
28 .mode = 0644,
37 .mode = 0555,
46 .mode = 0555,
/fs/coda/
Dsysctl.c22 .mode = 0644,
29 .mode = 0644,
36 .mode = 0600,
45 .mode = 0555,
/fs/minix/
Dnamei.c39 static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) in minix_mknod() argument
47 inode = minix_new_inode(dir, mode, &error); in minix_mknod()
57 static int minix_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) in minix_tmpfile() argument
60 struct inode *inode = minix_new_inode(dir, mode, &error); in minix_tmpfile()
69 static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, in minix_create() argument
72 return minix_mknod(dir, dentry, mode, 0); in minix_create()
115 static int minix_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode) in minix_mkdir() argument
122 inode = minix_new_inode(dir, S_IFDIR | mode, &err); in minix_mkdir()

12345678910>>...13