direct_IO: remove rw from a_ops->direct_IO()
Now that no one is using rw, remove it completely. Signed-off-by: Omar Sandoval <osandov@osandov.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
6f67376318
Коммит
22c6186ece
|
@ -196,7 +196,7 @@ prototypes:
|
|||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, int);
|
||||
void (*freepage)(struct page *);
|
||||
int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
int (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
int (*migratepage)(struct address_space *, struct page *, struct page *);
|
||||
int (*launder_page)(struct page *);
|
||||
int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long);
|
||||
|
|
|
@ -590,7 +590,7 @@ struct address_space_operations {
|
|||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, int);
|
||||
void (*freepage)(struct page *);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
/* migrate the contents of a page to the specified target */
|
||||
int (*migratepage) (struct page *, struct page *);
|
||||
int (*launder_page) (struct page *);
|
||||
|
|
|
@ -359,8 +359,8 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io,
|
|||
* up to 22MB for 128kB kmalloc and up to 682MB for 4MB kmalloc. */
|
||||
#define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \
|
||||
~(DT_MAX_BRW_SIZE - 1))
|
||||
static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t file_offset)
|
||||
static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t file_offset)
|
||||
{
|
||||
struct lu_env *env;
|
||||
struct cl_io *io;
|
||||
|
|
|
@ -230,7 +230,6 @@ static int v9fs_launder_page(struct page *page)
|
|||
|
||||
/**
|
||||
* v9fs_direct_IO - 9P address space operation for direct I/O
|
||||
* @rw: direction (read or write)
|
||||
* @iocb: target I/O control block
|
||||
* @iov: array of vectors that define I/O buffer
|
||||
* @pos: offset in file to begin the operation
|
||||
|
@ -248,7 +247,7 @@ static int v9fs_launder_page(struct page *page)
|
|||
*
|
||||
*/
|
||||
static ssize_t
|
||||
v9fs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
|
||||
v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
ssize_t n;
|
||||
|
|
|
@ -389,8 +389,7 @@ static void affs_write_failed(struct address_space *mapping, loff_t to)
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
affs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -146,8 +146,7 @@ blkdev_get_block(struct inode *inode, sector_t iblock,
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
blkdev_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -8114,8 +8114,8 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -1198,8 +1198,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
|
|||
* intercept O_DIRECT reads and writes early, this function should
|
||||
* never get called.
|
||||
*/
|
||||
static ssize_t ceph_direct_io(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t pos)
|
||||
{
|
||||
WARN_ON(1);
|
||||
|
|
|
@ -3877,8 +3877,7 @@ void cifs_oplock_break(struct work_struct *work)
|
|||
* Direct IO is not yet supported in the cached mode.
|
||||
*/
|
||||
static ssize_t
|
||||
cifs_direct_io(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t pos)
|
||||
cifs_direct_io(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
|
||||
{
|
||||
/*
|
||||
* FIXME
|
||||
|
|
|
@ -963,8 +963,8 @@ static void exofs_invalidatepage(struct page *page, unsigned int offset,
|
|||
|
||||
|
||||
/* TODO: Should be easy enough to do proprly */
|
||||
static ssize_t exofs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t exofs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -851,8 +851,7 @@ static sector_t ext2_bmap(struct address_space *mapping, sector_t block)
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -1820,8 +1820,8 @@ static int ext3_releasepage(struct page *page, gfp_t wait)
|
|||
* crashes then stale disk data _may_ be exposed inside the file. But current
|
||||
* VFS code falls back into buffered path in that case so we are safe.
|
||||
*/
|
||||
static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t ext3_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -3089,8 +3089,8 @@ retake_lock:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t ext4_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -1135,8 +1135,8 @@ static int check_direct_IO(struct inode *inode, struct iov_iter *iter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -245,8 +245,7 @@ static int fat_write_end(struct file *file, struct address_space *mapping,
|
|||
return err;
|
||||
}
|
||||
|
||||
static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
static ssize_t fat_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
|
|
|
@ -2782,8 +2782,7 @@ static inline loff_t fuse_round_up(loff_t off)
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
fuse_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
DECLARE_COMPLETION_ONSTACK(wait);
|
||||
ssize_t ret = 0;
|
||||
|
|
|
@ -1038,8 +1038,8 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, loff_t offset)
|
|||
|
||||
|
||||
|
||||
static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t gfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -124,8 +124,8 @@ static int hfs_releasepage(struct page *page, gfp_t mask)
|
|||
return res ? try_to_free_buffers(page) : 0;
|
||||
}
|
||||
|
||||
static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t hfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -122,8 +122,8 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask)
|
|||
return res ? try_to_free_buffers(page) : 0;
|
||||
}
|
||||
|
||||
static ssize_t hfsplus_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -330,8 +330,8 @@ static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
|
|||
return generic_block_bmap(mapping, block, jfs_get_block);
|
||||
}
|
||||
|
||||
static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -240,7 +240,6 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq,
|
|||
|
||||
/**
|
||||
* nfs_direct_IO - NFS address space operation for direct I/O
|
||||
* @rw: direction (read or write)
|
||||
* @iocb: target I/O control block
|
||||
* @iov: array of vectors that define I/O buffer
|
||||
* @pos: offset in file to begin the operation
|
||||
|
@ -251,7 +250,7 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq,
|
|||
* shunt off direct read and write requests before the VFS gets them,
|
||||
* so this method is only ever called for swap.
|
||||
*/
|
||||
ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
|
||||
ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
|
||||
{
|
||||
struct inode *inode = iocb->ki_filp->f_mapping->host;
|
||||
|
||||
|
|
|
@ -305,8 +305,7 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping,
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
nilfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
nilfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
|
@ -818,9 +818,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t ocfs2_direct_IO(int rw,
|
||||
struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
static ssize_t ocfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
|
|
|
@ -3278,8 +3278,8 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
|
|||
* We thank Mingming Cao for helping us understand in great detail what
|
||||
* to do in this section of the code.
|
||||
*/
|
||||
static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
|
@ -100,8 +100,7 @@ static int udf_adinicb_write_begin(struct file *file,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t udf_adinicb_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
/* Fallback to buffered I/O. */
|
||||
|
|
|
@ -215,8 +215,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t udf_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
static ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
|
|
|
@ -1495,7 +1495,6 @@ xfs_end_io_direct_write(
|
|||
|
||||
STATIC ssize_t
|
||||
xfs_vm_direct_IO(
|
||||
int rw,
|
||||
struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
|
|
|
@ -383,7 +383,7 @@ struct address_space_operations {
|
|||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, gfp_t);
|
||||
void (*freepage)(struct page *);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
/*
|
||||
* migrate the contents of a page to the specified target. If
|
||||
* migrate_mode is MIGRATE_ASYNC, it must not block.
|
||||
|
|
|
@ -447,7 +447,7 @@ static inline struct rpc_cred *nfs_file_cred(struct file *file)
|
|||
/*
|
||||
* linux/fs/nfs/direct.c
|
||||
*/
|
||||
extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t);
|
||||
extern ssize_t nfs_direct_IO(struct kiocb *, struct iov_iter *, loff_t);
|
||||
extern ssize_t nfs_file_direct_read(struct kiocb *iocb,
|
||||
struct iov_iter *iter,
|
||||
loff_t pos);
|
||||
|
|
|
@ -1707,7 +1707,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
|
|||
pos + count - 1);
|
||||
if (!retval) {
|
||||
struct iov_iter data = *iter;
|
||||
retval = mapping->a_ops->direct_IO(READ, iocb, &data, pos);
|
||||
retval = mapping->a_ops->direct_IO(iocb, &data, pos);
|
||||
}
|
||||
|
||||
if (retval > 0) {
|
||||
|
@ -2395,7 +2395,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos)
|
|||
}
|
||||
|
||||
data = *from;
|
||||
written = mapping->a_ops->direct_IO(WRITE, iocb, &data, pos);
|
||||
written = mapping->a_ops->direct_IO(iocb, &data, pos);
|
||||
|
||||
/*
|
||||
* Finally, try again to invalidate clean pages which might have been
|
||||
|
|
|
@ -277,9 +277,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
|
|||
|
||||
set_page_writeback(page);
|
||||
unlock_page(page);
|
||||
ret = mapping->a_ops->direct_IO(ITER_BVEC | WRITE,
|
||||
&kiocb, &from,
|
||||
kiocb.ki_pos);
|
||||
ret = mapping->a_ops->direct_IO(&kiocb, &from, kiocb.ki_pos);
|
||||
if (ret == PAGE_SIZE) {
|
||||
count_vm_event(PSWPOUT);
|
||||
ret = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче