Lines Matching refs:ino
126 static char *inode_name(struct inode *ino) in inode_name() argument
131 dentry = d_find_alias(ino); in inode_name()
276 unsigned long long next, ino; in hostfs_readdir() local
289 while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) { in hostfs_readdir()
290 if (!dir_emit(ctx, name, len, ino, type)) in hostfs_readdir()
298 static int hostfs_open(struct inode *ino, struct file *file) in hostfs_open() argument
306 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open()
309 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
328 mutex_lock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
330 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open()
331 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
335 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open()
336 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
337 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
341 if (HOSTFS_I(ino)->fd == -1) { in hostfs_open()
342 HOSTFS_I(ino)->fd = fd; in hostfs_open()
344 err = replace_file(fd, HOSTFS_I(ino)->fd); in hostfs_open()
347 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
351 HOSTFS_I(ino)->mode = mode; in hostfs_open()
352 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
512 static int read_name(struct inode *ino, char *name) in read_name() argument
525 ino->i_op = &hostfs_link_iops; in read_name()
528 ino->i_op = &hostfs_dir_iops; in read_name()
529 ino->i_fop = &hostfs_dir_fops; in read_name()
535 init_special_inode(ino, st.mode & S_IFMT, rdev); in read_name()
536 ino->i_op = &hostfs_iops; in read_name()
539 ino->i_op = &hostfs_iops; in read_name()
540 ino->i_fop = &hostfs_file_fops; in read_name()
541 ino->i_mapping->a_ops = &hostfs_aops; in read_name()
547 ino->i_ino = st.ino; in read_name()
548 ino->i_mode = st.mode; in read_name()
549 set_nlink(ino, st.nlink); in read_name()
550 i_uid_write(ino, st.uid); in read_name()
551 i_gid_write(ino, st.gid); in read_name()
552 ino->i_atime = (struct timespec64){ st.atime.tv_sec, st.atime.tv_nsec }; in read_name()
553 ino->i_mtime = (struct timespec64){ st.mtime.tv_sec, st.mtime.tv_nsec }; in read_name()
554 ino->i_ctime = (struct timespec64){ st.ctime.tv_sec, st.ctime.tv_nsec }; in read_name()
555 ino->i_size = st.size; in read_name()
556 ino->i_blocks = st.blocks; in read_name()
599 static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, in hostfs_lookup() argument
606 inode = hostfs_iget(ino->i_sb); in hostfs_lookup()
624 static int hostfs_link(struct dentry *to, struct inode *ino, in hostfs_link() argument
643 static int hostfs_unlink(struct inode *ino, struct dentry *dentry) in hostfs_unlink() argument
659 static int hostfs_symlink(struct user_namespace *mnt_userns, struct inode *ino, in hostfs_symlink() argument
672 static int hostfs_mkdir(struct user_namespace *mnt_userns, struct inode *ino, in hostfs_mkdir() argument
685 static int hostfs_rmdir(struct inode *ino, struct dentry *dentry) in hostfs_rmdir() argument
765 struct inode *ino, int desired) in hostfs_permission() argument
776 name = inode_name(ino); in hostfs_permission()
780 if (S_ISCHR(ino->i_mode) || S_ISBLK(ino->i_mode) || in hostfs_permission()
781 S_ISFIFO(ino->i_mode) || S_ISSOCK(ino->i_mode)) in hostfs_permission()
787 err = generic_permission(&init_user_ns, ino, desired); in hostfs_permission()