Lines Matching refs:ino

128 static char *inode_name(struct inode *ino)  in inode_name()  argument
133 dentry = d_find_alias(ino); in inode_name()
273 unsigned long long next, ino; in hostfs_readdir() local
286 while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) { in hostfs_readdir()
287 if (!dir_emit(ctx, name, len, ino, type)) in hostfs_readdir()
295 static int hostfs_open(struct inode *ino, struct file *file) in hostfs_open() argument
303 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open()
306 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
325 mutex_lock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
327 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open()
328 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
332 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open()
333 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
334 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
338 if (HOSTFS_I(ino)->fd == -1) { in hostfs_open()
339 HOSTFS_I(ino)->fd = fd; in hostfs_open()
341 err = replace_file(fd, HOSTFS_I(ino)->fd); in hostfs_open()
344 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
348 HOSTFS_I(ino)->mode = mode; in hostfs_open()
349 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
511 static int hostfs_inode_update(struct inode *ino, const struct hostfs_stat *st) in hostfs_inode_update() argument
513 set_nlink(ino, st->nlink); in hostfs_inode_update()
514 i_uid_write(ino, st->uid); in hostfs_inode_update()
515 i_gid_write(ino, st->gid); in hostfs_inode_update()
516 ino->i_atime = in hostfs_inode_update()
518 ino->i_mtime = in hostfs_inode_update()
520 inode_set_ctime(ino, st->ctime.tv_sec, st->ctime.tv_nsec); in hostfs_inode_update()
521 ino->i_size = st->size; in hostfs_inode_update()
522 ino->i_blocks = st->blocks; in hostfs_inode_update()
526 static int hostfs_inode_set(struct inode *ino, void *data) in hostfs_inode_set() argument
536 ino->i_op = &hostfs_link_iops; in hostfs_inode_set()
539 ino->i_op = &hostfs_dir_iops; in hostfs_inode_set()
540 ino->i_fop = &hostfs_dir_fops; in hostfs_inode_set()
546 init_special_inode(ino, st->mode & S_IFMT, rdev); in hostfs_inode_set()
547 ino->i_op = &hostfs_iops; in hostfs_inode_set()
550 ino->i_op = &hostfs_iops; in hostfs_inode_set()
551 ino->i_fop = &hostfs_file_fops; in hostfs_inode_set()
552 ino->i_mapping->a_ops = &hostfs_aops; in hostfs_inode_set()
558 HOSTFS_I(ino)->dev = st->dev; in hostfs_inode_set()
559 ino->i_ino = st->ino; in hostfs_inode_set()
560 ino->i_mode = st->mode; in hostfs_inode_set()
561 return hostfs_inode_update(ino, st); in hostfs_inode_set()
568 return inode->i_ino == st->ino && HOSTFS_I(inode)->dev == st->dev; in hostfs_inode_test()
580 inode = iget5_locked(sb, st.ino, hostfs_inode_test, hostfs_inode_set, in hostfs_iget()
624 static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, in hostfs_lookup() argument
634 inode = hostfs_iget(ino->i_sb, name); in hostfs_lookup()
646 static int hostfs_link(struct dentry *to, struct inode *ino, in hostfs_link() argument
665 static int hostfs_unlink(struct inode *ino, struct dentry *dentry) in hostfs_unlink() argument
681 static int hostfs_symlink(struct mnt_idmap *idmap, struct inode *ino, in hostfs_symlink() argument
694 static int hostfs_mkdir(struct mnt_idmap *idmap, struct inode *ino, in hostfs_mkdir() argument
707 static int hostfs_rmdir(struct inode *ino, struct dentry *dentry) in hostfs_rmdir() argument
775 struct inode *ino, int desired) in hostfs_permission() argument
786 name = inode_name(ino); in hostfs_permission()
790 if (S_ISCHR(ino->i_mode) || S_ISBLK(ino->i_mode) || in hostfs_permission()
791 S_ISFIFO(ino->i_mode) || S_ISSOCK(ino->i_mode)) in hostfs_permission()
797 err = generic_permission(&nop_mnt_idmap, ino, desired); in hostfs_permission()