linux/fs/9p/vfs_file.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This file contians vfs file ops for 9P2000.
 *
 *  Copyright (C) 2004 by Eric Van Hensbergen <[email protected]>
 *  Copyright (C) 2002 by Ron Minnich <[email protected]>
 */

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/filelock.h>
#include <linux/sched.h>
#include <linux/file.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/pagemap.h>
#include <linux/utsname.h>
#include <linux/uaccess.h>
#include <linux/uio.h>
#include <linux/slab.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>

#include "v9fs.h"
#include "v9fs_vfs.h"
#include "fid.h"
#include "cache.h"

static const struct vm_operations_struct v9fs_mmap_file_vm_ops;

/**
 * v9fs_file_open - open a file (or directory)
 * @inode: inode to be opened
 * @file: file being opened
 *
 */

int v9fs_file_open(struct inode *inode, struct file *file)
{}

/**
 * v9fs_file_lock - lock a file (or directory)
 * @filp: file to be locked
 * @cmd: lock command
 * @fl: file lock structure
 *
 * Bugs: this looks like a local only lock, we should extend into 9P
 *       by using open exclusive
 */

static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
{}

static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
{}

static int v9fs_file_getlock(struct file *filp, struct file_lock *fl)
{}

/**
 * v9fs_file_lock_dotl - lock a file (or directory)
 * @filp: file to be locked
 * @cmd: lock command
 * @fl: file lock structure
 *
 */

static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl)
{}

/**
 * v9fs_file_flock_dotl - lock a file
 * @filp: file to be locked
 * @cmd: lock command
 * @fl: file lock structure
 *
 */

static int v9fs_file_flock_dotl(struct file *filp, int cmd,
	struct file_lock *fl)
{}

/**
 * v9fs_file_read_iter - read from a file
 * @iocb: The operation parameters
 * @to: The buffer to read into
 *
 */
static ssize_t
v9fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{}

/*
 * v9fs_file_splice_read - splice-read from a file
 * @in: The 9p file to read from
 * @ppos: Where to find/update the file position
 * @pipe: The pipe to splice into
 * @len: The maximum amount of data to splice
 * @flags: SPLICE_F_* flags
 */
static ssize_t v9fs_file_splice_read(struct file *in, loff_t *ppos,
				     struct pipe_inode_info *pipe,
				     size_t len, unsigned int flags)
{}

/**
 * v9fs_file_write_iter - write to a file
 * @iocb: The operation parameters
 * @from: The data to write
 *
 */
static ssize_t
v9fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{}

static int v9fs_file_fsync(struct file *filp, loff_t start, loff_t end,
			   int datasync)
{}

int v9fs_file_fsync_dotl(struct file *filp, loff_t start, loff_t end,
			 int datasync)
{}

static int
v9fs_file_mmap(struct file *filp, struct vm_area_struct *vma)
{}

static vm_fault_t
v9fs_vm_page_mkwrite(struct vm_fault *vmf)
{}

static void v9fs_mmap_vm_close(struct vm_area_struct *vma)
{}

static const struct vm_operations_struct v9fs_mmap_file_vm_ops =;

const struct file_operations v9fs_file_operations =;

const struct file_operations v9fs_file_operations_dotl =;