Lines Matching refs:ino

124 static char *inode_name(struct inode *ino)
129 dentry = d_find_alias(ino);
274 unsigned long long next, ino;
287 while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) {
288 if (!dir_emit(ctx, name, len, ino, type))
296 static int hostfs_open(struct inode *ino, struct file *file)
304 if ((mode & HOSTFS_I(ino)->mode) == mode)
307 mode |= HOSTFS_I(ino)->mode;
326 mutex_lock(&HOSTFS_I(ino)->open_mutex);
328 if ((mode & HOSTFS_I(ino)->mode) == mode) {
329 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
333 if ((mode | HOSTFS_I(ino)->mode) != mode) {
334 mode |= HOSTFS_I(ino)->mode;
335 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
339 if (HOSTFS_I(ino)->fd == -1) {
340 HOSTFS_I(ino)->fd = fd;
342 err = replace_file(fd, HOSTFS_I(ino)->fd);
345 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
349 HOSTFS_I(ino)->mode = mode;
350 mutex_unlock(&HOSTFS_I(ino)->open_mutex);
509 static int read_name(struct inode *ino, char *name)
522 ino->i_op = &hostfs_link_iops;
525 ino->i_op = &hostfs_dir_iops;
526 ino->i_fop = &hostfs_dir_fops;
532 init_special_inode(ino, st.mode & S_IFMT, rdev);
533 ino->i_op = &hostfs_iops;
536 ino->i_op = &hostfs_iops;
537 ino->i_fop = &hostfs_file_fops;
538 ino->i_mapping->a_ops = &hostfs_aops;
544 ino->i_ino = st.ino;
545 ino->i_mode = st.mode;
546 set_nlink(ino, st.nlink);
547 i_uid_write(ino, st.uid);
548 i_gid_write(ino, st.gid);
549 ino->i_atime = (struct timespec64){ st.atime.tv_sec, st.atime.tv_nsec };
550 ino->i_mtime = (struct timespec64){ st.mtime.tv_sec, st.mtime.tv_nsec };
551 ino->i_ctime = (struct timespec64){ st.ctime.tv_sec, st.ctime.tv_nsec };
552 ino->i_size = st.size;
553 ino->i_blocks = st.blocks;
596 static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
603 inode = hostfs_iget(ino->i_sb);
621 static int hostfs_link(struct dentry *to, struct inode *ino,
640 static int hostfs_unlink(struct inode *ino, struct dentry *dentry)
656 static int hostfs_symlink(struct inode *ino, struct dentry *dentry,
669 static int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
681 static int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
759 static int hostfs_permission(struct inode *ino, int desired)
770 name = inode_name(ino);
774 if (S_ISCHR(ino->i_mode) || S_ISBLK(ino->i_mode) ||
775 S_ISFIFO(ino->i_mode) || S_ISSOCK(ino->i_mode))
781 err = generic_permission(ino, desired);