Lines Matching refs:mode
49 static u32 unixmode2p9mode(struct v9fs_session_info *v9ses, umode_t mode) in unixmode2p9mode() argument
52 res = mode & 0777; in unixmode2p9mode()
53 if (S_ISDIR(mode)) in unixmode2p9mode()
57 if (S_ISSOCK(mode)) in unixmode2p9mode()
59 if (S_ISFIFO(mode)) in unixmode2p9mode()
61 if (S_ISBLK(mode)) in unixmode2p9mode()
63 if (S_ISCHR(mode)) in unixmode2p9mode()
67 if ((mode & S_ISUID) == S_ISUID) in unixmode2p9mode()
69 if ((mode & S_ISGID) == S_ISGID) in unixmode2p9mode()
71 if ((mode & S_ISVTX) == S_ISVTX) in unixmode2p9mode()
87 int mode = stat->mode; in p9mode2perm() local
89 res = mode & S_IALLUGO; in p9mode2perm()
91 if ((mode & P9_DMSETUID) == P9_DMSETUID) in p9mode2perm()
94 if ((mode & P9_DMSETGID) == P9_DMSETGID) in p9mode2perm()
97 if ((mode & P9_DMSETVTX) == P9_DMSETVTX) in p9mode2perm()
114 u32 mode = stat->mode; in p9mode2unixmode() local
119 if ((mode & P9_DMDIR) == P9_DMDIR) in p9mode2unixmode()
121 else if ((mode & P9_DMSYMLINK) && (v9fs_proto_dotu(v9ses))) in p9mode2unixmode()
123 else if ((mode & P9_DMSOCKET) && (v9fs_proto_dotu(v9ses)) in p9mode2unixmode()
126 else if ((mode & P9_DMNAMEDPIPE) && (v9fs_proto_dotu(v9ses)) in p9mode2unixmode()
129 else if ((mode & P9_DMDEVICE) && (v9fs_proto_dotu(v9ses)) in p9mode2unixmode()
205 wstat->mode = ~0; in v9fs_blank_wstat()
251 struct inode *inode, umode_t mode, dev_t rdev) in v9fs_init_inode() argument
255 inode_init_owner(inode, NULL, mode); in v9fs_init_inode()
261 switch (mode & S_IFMT) { in v9fs_init_inode()
333 mode, mode & S_IFMT); in v9fs_init_inode()
349 struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev) in v9fs_get_inode() argument
355 p9_debug(P9_DEBUG_VFS, "super block: %p mode: %ho\n", sb, mode); in v9fs_get_inode()
363 err = v9fs_init_inode(v9ses, inode, mode, rdev); in v9fs_get_inode()
643 struct dentry *dentry, char *extension, u32 perm, u8 mode) in v9fs_create() argument
671 err = p9_client_fcreate(ofid, name, perm, mode, extension); in v9fs_create()
724 v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in v9fs_vfs_create() argument
728 u32 perm = unixmode2p9mode(v9ses, mode); in v9fs_vfs_create()
750 static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in v9fs_vfs_mkdir() argument
760 perm = unixmode2p9mode(v9ses, mode | S_IFDIR); in v9fs_vfs_mkdir()
841 struct file *file, unsigned flags, umode_t mode) in v9fs_vfs_atomic_open() argument
866 perm = unixmode2p9mode(v9ses, mode); in v9fs_vfs_atomic_open()
1109 wstat.mode = unixmode2p9mode(v9ses, iattr->ia_mode); in v9fs_vfs_setattr()
1160 umode_t mode; in v9fs_stat2inode() local
1196 mode = p9mode2perm(v9ses, stat); in v9fs_stat2inode()
1197 mode |= inode->i_mode & ~S_IALLUGO; in v9fs_stat2inode()
1198 inode->i_mode = mode; in v9fs_stat2inode()
1260 if (!(st->mode & P9_DMSYMLINK)) { in v9fs_vfs_get_link()
1371 v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) in v9fs_vfs_mknod() argument
1379 dir->i_ino, dentry, mode, in v9fs_vfs_mknod()
1383 if (S_ISBLK(mode)) in v9fs_vfs_mknod()
1385 else if (S_ISCHR(mode)) in v9fs_vfs_mknod()
1390 perm = unixmode2p9mode(v9ses, mode); in v9fs_vfs_mknod()