Lines Matching defs:mode

276  * file mode permission bits, or else 1. Returns -E... on error.
282 umode_t mode = 0;
286 * A null ACL can always be presented as mode bits.
294 mode |= (pa->e_perm & S_IRWXO) << 6;
297 mode |= (pa->e_perm & S_IRWXO) << 3;
300 mode |= pa->e_perm & S_IRWXO;
303 mode = (mode & ~S_IRWXG) |
316 *mode_p = (*mode_p & ~S_IRWXUGO) | mode;
322 * Create an ACL representing the file mode permission bits of an inode.
325 posix_acl_from_mode(umode_t mode, gfp_t flags)
332 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6;
335 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3;
338 acl->a_entries[2].e_perm = (mode & S_IRWXO);
412 * mode_p initially must contain the mode parameter to the open() / creat()
420 umode_t mode = *mode_p;
428 pa->e_perm &= (mode >> 6) | ~S_IRWXO;
429 mode &= (pa->e_perm << 6) | ~S_IRWXU;
442 pa->e_perm &= mode | ~S_IRWXO;
443 mode &= pa->e_perm | ~S_IRWXO;
457 mask_obj->e_perm &= (mode >> 3) | ~S_IRWXO;
458 mode &= (mask_obj->e_perm << 3) | ~S_IRWXG;
462 group_obj->e_perm &= (mode >> 3) | ~S_IRWXO;
463 mode &= (group_obj->e_perm << 3) | ~S_IRWXG;
466 *mode_p = (*mode_p & ~S_IRWXUGO) | mode;
473 static int __posix_acl_chmod_masq(struct posix_acl *acl, umode_t mode)
483 pa->e_perm = (mode & S_IRWXU) >> 6;
499 pa->e_perm = (mode & S_IRWXO);
508 mask_obj->e_perm = (mode & S_IRWXG) >> 3;
512 group_obj->e_perm = (mode & S_IRWXG) >> 3;
537 __posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode)
542 err = __posix_acl_chmod_masq(clone, mode);
555 posix_acl_chmod(struct inode *inode, umode_t mode)
572 ret = __posix_acl_chmod(&acl, GFP_KERNEL, mode);
582 posix_acl_create(struct inode *dir, umode_t *mode,
592 if (S_ISLNK(*mode) || !IS_POSIXACL(dir))
597 *mode &= ~current_umask();
608 ret = posix_acl_create_masq(clone, mode);
617 if (!S_ISDIR(*mode))
633 * posix_acl_update_mode - update mode in set_acl
635 * @mode_p: mode (pointer) for update
638 * Update the file mode when setting an ACL: compute the new file permission
640 * file mode, set *@acl to NULL to indicate that no ACL should be set.
650 umode_t mode = inode->i_mode;
653 error = posix_acl_equiv_mode(*acl, &mode);
660 mode &= ~S_ISGID;
661 *mode_p = mode;