Lines Matching defs:mode
2164 void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
2166 inode->i_mode = mode;
2167 if (S_ISCHR(mode)) {
2170 } else if (S_ISBLK(mode)) {
2173 } else if (S_ISFIFO(mode))
2175 else if (S_ISSOCK(mode))
2179 " inode %s:%lu\n", mode, inode->i_sb->s_id,
2185 * inode_init_owner - Init uid,gid,mode for new inode according to posix standards
2188 * @mode: mode of the new inode
2191 umode_t mode)
2198 if (S_ISDIR(mode))
2199 mode |= S_ISGID;
2202 inode->i_mode = mode;
2471 * @mode: mode of the file to be created in @dir
2473 * If the @mode of the new file has both the S_ISGID and S_IXGRP bit
2477 * In all other cases, strip the S_ISGID bit from @mode.
2479 * Return: the new mode to use for the file
2481 umode_t mode_strip_sgid(const struct inode *dir, umode_t mode)
2483 if ((mode & (S_ISGID | S_IXGRP)) != (S_ISGID | S_IXGRP))
2484 return mode;
2485 if (S_ISDIR(mode) || !dir || !(dir->i_mode & S_ISGID))
2486 return mode;
2488 return mode;
2489 return mode & ~S_ISGID;