Lines Matching refs:ino
124 static char *inode_name(struct inode *ino) in inode_name() argument
129 dentry = d_find_alias(ino); in inode_name()
283 unsigned long long next, ino; in hostfs_readdir() local
296 while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) { in hostfs_readdir()
297 if (!dir_emit(ctx, name, len, ino, type)) in hostfs_readdir()
305 static int hostfs_open(struct inode *ino, struct file *file) in hostfs_open() argument
313 if ((mode & HOSTFS_I(ino)->mode) == mode) in hostfs_open()
316 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
335 mutex_lock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
337 if ((mode & HOSTFS_I(ino)->mode) == mode) { in hostfs_open()
338 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
342 if ((mode | HOSTFS_I(ino)->mode) != mode) { in hostfs_open()
343 mode |= HOSTFS_I(ino)->mode; in hostfs_open()
344 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
348 if (HOSTFS_I(ino)->fd == -1) { in hostfs_open()
349 HOSTFS_I(ino)->fd = fd; in hostfs_open()
351 err = replace_file(fd, HOSTFS_I(ino)->fd); in hostfs_open()
354 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
358 HOSTFS_I(ino)->mode = mode; in hostfs_open()
359 mutex_unlock(&HOSTFS_I(ino)->open_mutex); in hostfs_open()
518 static int read_name(struct inode *ino, char *name) in read_name() argument
531 ino->i_op = &hostfs_link_iops; in read_name()
534 ino->i_op = &hostfs_dir_iops; in read_name()
535 ino->i_fop = &hostfs_dir_fops; in read_name()
541 init_special_inode(ino, st.mode & S_IFMT, rdev); in read_name()
542 ino->i_op = &hostfs_iops; in read_name()
545 ino->i_op = &hostfs_iops; in read_name()
546 ino->i_fop = &hostfs_file_fops; in read_name()
547 ino->i_mapping->a_ops = &hostfs_aops; in read_name()
553 ino->i_ino = st.ino; in read_name()
554 ino->i_mode = st.mode; in read_name()
555 set_nlink(ino, st.nlink); in read_name()
556 i_uid_write(ino, st.uid); in read_name()
557 i_gid_write(ino, st.gid); in read_name()
558 ino->i_atime = st.atime; in read_name()
559 ino->i_mtime = st.mtime; in read_name()
560 ino->i_ctime = st.ctime; in read_name()
561 ino->i_size = st.size; in read_name()
562 ino->i_blocks = st.blocks; in read_name()
605 static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, in hostfs_lookup() argument
612 inode = hostfs_iget(ino->i_sb); in hostfs_lookup()
642 static int hostfs_link(struct dentry *to, struct inode *ino, in hostfs_link() argument
661 static int hostfs_unlink(struct inode *ino, struct dentry *dentry) in hostfs_unlink() argument
677 static int hostfs_symlink(struct inode *ino, struct dentry *dentry, in hostfs_symlink() argument
690 static int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode) in hostfs_mkdir() argument
702 static int hostfs_rmdir(struct inode *ino, struct dentry *dentry) in hostfs_rmdir() argument
780 static int hostfs_permission(struct inode *ino, int desired) in hostfs_permission() argument
791 name = inode_name(ino); in hostfs_permission()
795 if (S_ISCHR(ino->i_mode) || S_ISBLK(ino->i_mode) || in hostfs_permission()
796 S_ISFIFO(ino->i_mode) || S_ISSOCK(ino->i_mode)) in hostfs_permission()
802 err = generic_permission(ino, desired); in hostfs_permission()