linux/fs/ext2/file.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  linux/fs/ext2/file.c
 *
 * Copyright (C) 1992, 1993, 1994, 1995
 * Remy Card ([email protected])
 * Laboratoire MASI - Institut Blaise Pascal
 * Universite Pierre et Marie Curie (Paris VI)
 *
 *  from
 *
 *  linux/fs/minix/file.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 *
 *  ext2 fs regular file handling primitives
 *
 *  64-bit file support on 64-bit platforms by Jakub Jelinek
 * 	([email protected])
 */

#include <linux/time.h>
#include <linux/pagemap.h>
#include <linux/dax.h>
#include <linux/quotaops.h>
#include <linux/iomap.h>
#include <linux/uio.h>
#include <linux/buffer_head.h>
#include "ext2.h"
#include "xattr.h"
#include "acl.h"
#include "trace.h"

#ifdef CONFIG_FS_DAX
static ssize_t ext2_dax_read_iter(struct kiocb *iocb, struct iov_iter *to)
{}

static ssize_t ext2_dax_write_iter(struct kiocb *iocb, struct iov_iter *from)
{}

/*
 * The lock ordering for ext2 DAX fault paths is:
 *
 * mmap_lock (MM)
 *   sb_start_pagefault (vfs, freeze)
 *     address_space->invalidate_lock
 *       address_space->i_mmap_rwsem or page_lock (mutually exclusive in DAX)
 *         ext2_inode_info->truncate_mutex
 *
 * The default page_lock and i_size verification done by non-DAX fault paths
 * is sufficient because ext2 doesn't support hole punching.
 */
static vm_fault_t ext2_dax_fault(struct vm_fault *vmf)
{}

static const struct vm_operations_struct ext2_dax_vm_ops =;

static int ext2_file_mmap(struct file *file, struct vm_area_struct *vma)
{}
#else
#define ext2_file_mmap
#endif

/*
 * Called when filp is released. This happens when all file descriptors
 * for a single struct file are closed. Note that different open() calls
 * for the same file yield different struct file structures.
 */
static int ext2_release_file (struct inode * inode, struct file * filp)
{}

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

static ssize_t ext2_dio_read_iter(struct kiocb *iocb, struct iov_iter *to)
{}

static int ext2_dio_write_end_io(struct kiocb *iocb, ssize_t size,
				 int error, unsigned int flags)
{}

static const struct iomap_dio_ops ext2_dio_write_ops =;

static ssize_t ext2_dio_write_iter(struct kiocb *iocb, struct iov_iter *from)
{}

static ssize_t ext2_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{}

static ssize_t ext2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{}

static int ext2_file_open(struct inode *inode, struct file *filp)
{}

const struct file_operations ext2_file_operations =;

const struct inode_operations ext2_file_inode_operations =;