Lines Matching refs:filp
11 static int hpfs_dir_release(struct inode *inode, struct file *filp) in hpfs_dir_release() argument
14 hpfs_del_pos(inode, &filp->f_pos); in hpfs_dir_release()
22 static loff_t hpfs_dir_lseek(struct file *filp, loff_t off, int whence) in hpfs_dir_lseek() argument
24 loff_t new_off = off + (whence == 1 ? filp->f_pos : 0); in hpfs_dir_lseek()
27 struct inode *i = filp->f_path.dentry->d_inode; in hpfs_dir_lseek()
45 return filp->f_pos = new_off; in hpfs_dir_lseek()
53 static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) in hpfs_readdir() argument
55 struct inode *inode = filp->f_path.dentry->d_inode; in hpfs_readdir()
101 if (filp->f_pos == 12) { /* diff -r requires this (note, that diff -r */ in hpfs_readdir()
102 filp->f_pos = 13; /* also fails on msdos filesystem in 2.0) */ in hpfs_readdir()
105 if (filp->f_pos == 13) { in hpfs_readdir()
116 if (hpfs_stop_cycles(inode->i_sb, filp->f_pos, &c1, &c2, "hpfs_readdir")) { in hpfs_readdir()
120 if (filp->f_pos == 12) in hpfs_readdir()
122 if (filp->f_pos == 3 || filp->f_pos == 4 || filp->f_pos == 5) { in hpfs_readdir()
123 printk("HPFS: warning: pos==%d\n",(int)filp->f_pos); in hpfs_readdir()
126 if (filp->f_pos == 0) { in hpfs_readdir()
127 if (filldir(dirent, ".", 1, filp->f_pos, inode->i_ino, DT_DIR) < 0) in hpfs_readdir()
129 filp->f_pos = 11; in hpfs_readdir()
131 if (filp->f_pos == 11) { in hpfs_readdir()
132 if (filldir(dirent, "..", 2, filp->f_pos, hpfs_inode->i_parent_dir, DT_DIR) < 0) in hpfs_readdir()
134 filp->f_pos = 1; in hpfs_readdir()
136 if (filp->f_pos == 1) { in hpfs_readdir()
137 filp->f_pos = ((loff_t) hpfs_de_as_down_as_possible(inode->i_sb, hpfs_inode->i_dno) << 4) + 1; in hpfs_readdir()
138 hpfs_add_pos(inode, &filp->f_pos); in hpfs_readdir()
139 filp->f_version = inode->i_version; in hpfs_readdir()
141 old_pos = filp->f_pos; in hpfs_readdir()
142 if (!(de = map_pos_dirent(inode, &filp->f_pos, &qbh))) { in hpfs_readdir()
159 filp->f_pos = old_pos; in hpfs_readdir()