mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
543ade1fc9
This patch cleans up generic_file_*_read/write() interfaces. Christoph Hellwig gave me the idea for this clean ups. In a nutshell, all filesystems should set .aio_read/.aio_write methods and use do_sync_read/ do_sync_write() as their .read/.write methods. This allows us to cleanup all variants of generic_file_* routines. Final available interfaces: generic_file_aio_read() - read handler generic_file_aio_write() - write handler generic_file_aio_write_nolock() - no lock write handler __generic_file_aio_write_nolock() - internal worker routine Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
42 lines
942 B
C
42 lines
942 B
C
/*
|
|
* linux/fs/adfs/file.c
|
|
*
|
|
* Copyright (C) 1997-1999 Russell King
|
|
* from:
|
|
*
|
|
* linux/fs/ext2/file.c
|
|
*
|
|
* Copyright (C) 1992, 1993, 1994, 1995
|
|
* Remy Card (card@masi.ibp.fr)
|
|
* Laboratoire MASI - Institut Blaise Pascal
|
|
* Universite Pierre et Marie Curie (Paris VI)
|
|
*
|
|
* from
|
|
*
|
|
* linux/fs/minix/file.c
|
|
*
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
*
|
|
* adfs regular file handling primitives
|
|
*/
|
|
#include <linux/fs.h>
|
|
#include <linux/buffer_head.h> /* for file_fsync() */
|
|
#include <linux/adfs_fs.h>
|
|
|
|
#include "adfs.h"
|
|
|
|
const struct file_operations adfs_file_operations = {
|
|
.llseek = generic_file_llseek,
|
|
.read = do_sync_read,
|
|
.aio_read = generic_file_aio_read,
|
|
.mmap = generic_file_mmap,
|
|
.fsync = file_fsync,
|
|
.write = do_sync_write,
|
|
.aio_write = generic_file_aio_write,
|
|
.sendfile = generic_file_sendfile,
|
|
};
|
|
|
|
struct inode_operations adfs_file_inode_operations = {
|
|
.setattr = adfs_notify_change,
|
|
};
|