Lines Matching refs:file
1562 static int configfs_dir_open(struct inode *inode, struct file *file)
1564 struct dentry * dentry = file->f_path.dentry;
1575 file->private_data = configfs_new_dirent(parent_sd, NULL, 0, NULL);
1576 if (IS_ERR(file->private_data))
1577 err = PTR_ERR(file->private_data);
1586 static int configfs_dir_close(struct inode *inode, struct file *file)
1588 struct dentry * dentry = file->f_path.dentry;
1589 struct configfs_dirent * cursor = file->private_data;
1602 static int configfs_readdir(struct file *file, struct dir_context *ctx)
1604 struct dentry *dentry = file->f_path.dentry;
1607 struct configfs_dirent *cursor = file->private_data;
1611 if (!dir_emit_dots(file, ctx))
1634 * someone has an attribute file open,
1664 static loff_t configfs_dir_lseek(struct file *file, loff_t offset, int whence)
1666 struct dentry * dentry = file->f_path.dentry;
1670 offset += file->f_pos;
1679 if (offset != file->f_pos) {
1680 file->f_pos = offset;
1681 if (file->f_pos >= 2) {
1683 struct configfs_dirent *cursor = file->private_data;
1685 loff_t n = file->f_pos - 2;