Lines Matching defs:mode
267 /* no ->get_acl() calls in RCU mode... */
291 unsigned int mode = inode->i_mode;
294 mode >>= 6;
296 if (IS_POSIXACL(inode) && (mode & S_IRWXG)) {
303 mode >>= 3;
309 if ((mask & ~mode & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0)
326 * It would then be called again in ref-walk mode.
437 umode_t mode = inode->i_mode;
441 (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
529 * continue in RCU mode, we attempt to drop out of rcu-walk mode and grab
531 * mode. Refcounts are grabbed at the last known good point before rcu-walk
534 * to restart the path walk from the beginning in ref-walk mode.
538 * unlazy_walk - try to switch to ref-walk mode.
544 * for ref-walk mode. @dentry must be a path found by a do_lookup call on
556 * will do the right thing for non-RCU mode, and all our
631 * If we had been in RCU mode, drop out of it and legitimize nd->path.
815 umode_t mode = inode->i_mode;
818 if (!S_ISREG(mode))
822 if (mode & S_ISUID)
826 if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))
1062 * This may only be called in refwalk mode.
1150 * Try to skip to top of mountpoint pile in rcuwalk mode. Fail if
1298 * Skip to top of mountpoint pile in refwalk mode for follow_dotdot()
2583 int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
2592 mode &= S_IALLUGO;
2593 mode |= S_IFREG;
2594 error = security_inode_create(dir, dentry, mode);
2597 error = dir->i_op->create(dir, dentry, mode, want_excl);
2640 * An append-only file must be opened in append mode for writing.
2685 static int may_o_create(struct path *dir, struct dentry *dentry, umode_t mode)
2687 int error = security_path_mknod(dir, dentry, mode, 0);
2695 return security_inode_create(dir->dentry->d_inode, dentry, mode);
2719 umode_t mode;
2734 mode = op->mode;
2736 mode &= ~current_umask();
2771 error = may_o_create(&nd->path, dentry, mode);
2785 error = dir->i_op->atomic_open(dir, dentry, file, open_flag, mode,
2906 umode_t mode = op->mode;
2908 mode &= ~current_umask();
2921 error = security_path_mknod(&nd->path, dentry, mode, 0);
2924 error = vfs_create(dir->d_inode, dentry, mode,
2972 /* we _can_ be in RCU mode here */
2984 * This will *only* deal with leaving RCU mode - LOOKUP_JUMPED
3071 /* we _can_ be in RCU mode here */
3214 error = dir->i_op->tmpfile(dir, nd->path.dentry, op->mode);
3453 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
3460 if ((S_ISCHR(mode) || S_ISBLK(mode)) && !capable(CAP_MKNOD))
3466 error = devcgroup_inode_mknod(mode, dev);
3470 error = security_inode_mknod(dir, dentry, mode, dev);
3474 error = dir->i_op->mknod(dir, dentry, mode, dev);
3481 static int may_mknod(umode_t mode)
3483 switch (mode & S_IFMT) {
3489 case 0: /* zero mode translates to S_IFREG */
3498 SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode,
3506 error = may_mknod(mode);
3515 mode &= ~current_umask();
3516 error = security_path_mknod(&path, dentry, mode, dev);
3519 switch (mode & S_IFMT) {
3521 error = vfs_create(path.dentry->d_inode,dentry,mode,true);
3524 error = vfs_mknod(path.dentry->d_inode,dentry,mode,
3528 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
3540 SYSCALL_DEFINE3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev)
3542 return sys_mknodat(AT_FDCWD, filename, mode, dev);
3545 int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
3556 mode &= (S_IRWXUGO|S_ISVTX);
3557 error = security_inode_mkdir(dir, dentry, mode);
3564 error = dir->i_op->mkdir(dir, dentry, mode);
3571 SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode)
3584 mode &= ~current_umask();
3585 error = security_path_mkdir(&path, dentry, mode);
3587 error = vfs_mkdir(path.dentry->d_inode, dentry, mode);
3596 SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode)
3598 return sys_mkdirat(AT_FDCWD, pathname, mode);