Lines Matching refs:ino

128 static char *inode_name(struct inode *ino)
133 dentry = d_find_alias(ino);
273 unsigned long long next, ino;
286 while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) {
287 if (!dir_emit(ctx, name, len, ino, type))
295 static int hostfs_open(struct inode *ino, struct file *file)
303 if ((mode & HOSTFS_I(ino)->mode) == mode)
306 mode |= HOSTFS_I(ino)->mode;
325 mutex_lock(&HOSTFS_I(ino)->open_mutex);
327 if ((mode & HOSTFS_I(ino)->mode) == mode) {
328 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
332 if ((mode | HOSTFS_I(ino)->mode) != mode) {
333 mode |= HOSTFS_I(ino)->mode;
334 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
338 if (HOSTFS_I(ino)->fd == -1) {
339 HOSTFS_I(ino)->fd = fd;
341 err = replace_file(fd, HOSTFS_I(ino)->fd);
344 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
348 HOSTFS_I(ino)->mode = mode;
349 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
511 static int hostfs_inode_update(struct inode *ino, const struct hostfs_stat *st)
513 set_nlink(ino, st->nlink);
514 i_uid_write(ino, st->uid);
515 i_gid_write(ino, st->gid);
516 inode_set_atime_to_ts(ino, (struct timespec64){
520 inode_set_mtime_to_ts(ino, (struct timespec64){
524 inode_set_ctime(ino, st->ctime.tv_sec, st->ctime.tv_nsec);
525 ino->i_size = st->size;
526 ino->i_blocks = st->blocks;
530 static int hostfs_inode_set(struct inode *ino, void *data)
540 ino->i_op = &hostfs_link_iops;
543 ino->i_op = &hostfs_dir_iops;
544 ino->i_fop = &hostfs_dir_fops;
550 init_special_inode(ino, st->mode & S_IFMT, rdev);
551 ino->i_op = &hostfs_iops;
554 ino->i_op = &hostfs_iops;
555 ino->i_fop = &hostfs_file_fops;
556 ino->i_mapping->a_ops = &hostfs_aops;
562 HOSTFS_I(ino)->dev = st->dev;
563 ino->i_ino = st->ino;
564 ino->i_mode = st->mode;
565 return hostfs_inode_update(ino, st);
572 return inode->i_ino == st->ino && HOSTFS_I(inode)->dev == st->dev;
584 inode = iget5_locked(sb, st.ino, hostfs_inode_test, hostfs_inode_set,
628 static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
638 inode = hostfs_iget(ino->i_sb, name);
646 static int hostfs_link(struct dentry *to, struct inode *ino,
665 static int hostfs_unlink(struct inode *ino, struct dentry *dentry)
681 static int hostfs_symlink(struct mnt_idmap *idmap, struct inode *ino,
694 static int hostfs_mkdir(struct mnt_idmap *idmap, struct inode *ino,
707 static int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
775 struct inode *ino, int desired)
786 name = inode_name(ino);
790 if (S_ISCHR(ino->i_mode) || S_ISBLK(ino->i_mode) ||
791 S_ISFIFO(ino->i_mode) || S_ISSOCK(ino->i_mode))
797 err = generic_permission(&nop_mnt_idmap, ino, desired);