#include <linux/fs.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/vmalloc.h>
#include <linux/uaccess.h>
#include <linux/uio.h>
#include <linux/configfs.h>
#include "configfs_internal.h"
#define SIMPLE_ATTR_SIZE …
struct configfs_buffer { … };
static inline struct configfs_fragment *to_frag(struct file *file)
{ … }
static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer)
{ … }
static ssize_t configfs_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
static ssize_t configfs_bin_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
static int fill_write_buffer(struct configfs_buffer *buffer,
struct iov_iter *from)
{ … }
static int
flush_write_buffer(struct file *file, struct configfs_buffer *buffer, size_t count)
{ … }
static ssize_t configfs_write_iter(struct kiocb *iocb, struct iov_iter *from)
{ … }
static ssize_t configfs_bin_write_iter(struct kiocb *iocb,
struct iov_iter *from)
{ … }
static int __configfs_open_file(struct inode *inode, struct file *file, int type)
{ … }
static int configfs_release(struct inode *inode, struct file *filp)
{ … }
static int configfs_open_file(struct inode *inode, struct file *filp)
{ … }
static int configfs_open_bin_file(struct inode *inode, struct file *filp)
{ … }
static int configfs_release_bin_file(struct inode *inode, struct file *file)
{ … }
const struct file_operations configfs_file_operations = …;
const struct file_operations configfs_bin_file_operations = …;
int configfs_create_file(struct config_item * item, const struct configfs_attribute * attr)
{ … }
int configfs_create_bin_file(struct config_item *item,
const struct configfs_bin_attribute *bin_attr)
{ … }