Skip to content

Commit

Permalink
write_iter variants of {__,}generic_file_aio_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 6, 2014
1 parent 3644424 commit 8174202
Show file tree
Hide file tree
Showing 29 changed files with 94 additions and 79 deletions.
8 changes: 4 additions & 4 deletions fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ v9fs_direct_write(struct file *filp, const char __user * data,

buff_write:
mutex_unlock(&inode->i_mutex);
return do_sync_write(filp, data, count, offsetp);
return new_sync_write(filp, data, count, offsetp);
}

/**
Expand All @@ -781,7 +781,7 @@ v9fs_cached_file_write(struct file *filp, const char __user * data,

if (filp->f_flags & O_DIRECT)
return v9fs_direct_write(filp, data, count, offset);
return do_sync_write(filp, data, count, offset);
return new_sync_write(filp, data, count, offset);
}


Expand Down Expand Up @@ -851,7 +851,7 @@ const struct file_operations v9fs_cached_file_operations = {
.read = v9fs_cached_file_read,
.write = v9fs_cached_file_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.open = v9fs_file_open,
.release = v9fs_dir_release,
.lock = v9fs_file_lock,
Expand All @@ -864,7 +864,7 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
.read = v9fs_cached_file_read,
.write = v9fs_cached_file_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.open = v9fs_file_open,
.release = v9fs_dir_release,
.lock = v9fs_file_lock_dotl,
Expand Down
4 changes: 2 additions & 2 deletions fs/adfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const struct file_operations adfs_file_operations = {
.read_iter = generic_file_read_iter,
.mmap = generic_file_mmap,
.fsync = generic_file_fsync,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.splice_read = generic_file_splice_read,
};

Expand Down
4 changes: 2 additions & 2 deletions fs/affs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const struct file_operations affs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.open = affs_file_open,
.release = affs_file_release,
Expand Down
4 changes: 2 additions & 2 deletions fs/bfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const struct file_operations bfs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.splice_read = generic_file_splice_read,
};
Expand Down
4 changes: 2 additions & 2 deletions fs/ecryptfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ const struct file_operations ecryptfs_main_fops = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = ecryptfs_read_update_atime,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.iterate = ecryptfs_readdir,
.unlocked_ioctl = ecryptfs_unlocked_ioctl,
#ifdef CONFIG_COMPAT
Expand Down
4 changes: 2 additions & 2 deletions fs/exofs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ static int exofs_flush(struct file *file, fl_owner_t id)
const struct file_operations exofs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.open = generic_file_open,
.release = exofs_release_file,
Expand Down
4 changes: 2 additions & 2 deletions fs/ext2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ int ext2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
const struct file_operations ext2_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.unlocked_ioctl = ext2_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ext2_compat_ioctl,
Expand Down
4 changes: 2 additions & 2 deletions fs/ext3/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ static int ext3_release_file (struct inode * inode, struct file * filp)
const struct file_operations ext3_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.unlocked_ioctl = ext3_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ext3_compat_ioctl,
Expand Down
4 changes: 2 additions & 2 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
const struct file_operations f2fs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.open = generic_file_open,
.mmap = f2fs_file_mmap,
.fsync = f2fs_sync_file,
Expand Down
4 changes: 2 additions & 2 deletions fs/fat/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ int fat_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
const struct file_operations fat_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.release = fat_file_release,
.unlocked_ioctl = fat_generic_ioctl,
Expand Down
4 changes: 2 additions & 2 deletions fs/hfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ static const struct file_operations hfs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.splice_read = generic_file_splice_read,
.fsync = hfs_file_fsync,
Expand Down
4 changes: 2 additions & 2 deletions fs/hfsplus/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ static const struct file_operations hfsplus_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.splice_read = generic_file_splice_read,
.fsync = hfsplus_file_fsync,
Expand Down
4 changes: 2 additions & 2 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ static const struct file_operations hostfs_file_fops = {
.read = new_sync_read,
.splice_read = generic_file_splice_read,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write = do_sync_write,
.write_iter = generic_file_write_iter,
.write = new_sync_write,
.mmap = generic_file_mmap,
.open = hostfs_file_open,
.release = hostfs_file_release,
Expand Down
4 changes: 2 additions & 2 deletions fs/hpfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ const struct file_operations hpfs_file_ops =
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.release = hpfs_file_release,
.fsync = hpfs_file_fsync,
Expand Down
4 changes: 2 additions & 2 deletions fs/jffs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const struct file_operations jffs2_file_operations =
.open = generic_file_open,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.unlocked_ioctl=jffs2_ioctl,
.mmap = generic_file_readonly_mmap,
.fsync = jffs2_fsync,
Expand Down
4 changes: 2 additions & 2 deletions fs/jfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ const struct inode_operations jfs_file_inode_operations = {
const struct file_operations jfs_file_operations = {
.open = jfs_open,
.llseek = generic_file_llseek,
.write = do_sync_write,
.write = new_sync_write,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.splice_read = generic_file_splice_read,
.splice_write = generic_file_splice_write,
Expand Down
4 changes: 2 additions & 2 deletions fs/logfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ const struct inode_operations logfs_reg_iops = {

const struct file_operations logfs_reg_fops = {
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.fsync = logfs_fsync,
.unlocked_ioctl = logfs_ioctl,
.llseek = generic_file_llseek,
.mmap = generic_file_readonly_mmap,
.open = generic_file_open,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
};

const struct address_space_operations logfs_reg_aops = {
Expand Down
4 changes: 2 additions & 2 deletions fs/minix/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const struct file_operations minix_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.fsync = generic_file_fsync,
.splice_read = generic_file_splice_read,
Expand Down
4 changes: 2 additions & 2 deletions fs/nilfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma)
const struct file_operations nilfs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.unlocked_ioctl = nilfs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = nilfs_compat_ioctl,
Expand Down
4 changes: 2 additions & 2 deletions fs/omfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ static sector_t omfs_bmap(struct address_space *mapping, sector_t block)
const struct file_operations omfs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.fsync = generic_file_fsync,
.splice_read = generic_file_splice_read,
Expand Down
4 changes: 2 additions & 2 deletions fs/ramfs/file-mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
const struct file_operations ramfs_file_operations = {
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.fsync = noop_fsync,
.splice_read = generic_file_splice_read,
Expand Down
4 changes: 2 additions & 2 deletions fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const struct file_operations ramfs_file_operations = {
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.fsync = noop_fsync,
.splice_read = generic_file_splice_read,
.splice_write = generic_file_splice_write,
Expand Down
4 changes: 2 additions & 2 deletions fs/reiserfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page,

const struct file_operations reiserfs_file_operations = {
.read = new_sync_read,
.write = do_sync_write,
.write = new_sync_write,
.unlocked_ioctl = reiserfs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = reiserfs_compat_ioctl,
Expand All @@ -246,7 +246,7 @@ const struct file_operations reiserfs_file_operations = {
.release = reiserfs_file_release,
.fsync = reiserfs_sync_file,
.read_iter = generic_file_read_iter,
.aio_write = generic_file_aio_write,
.write_iter = generic_file_write_iter,
.splice_read = generic_file_splice_read,
.splice_write = generic_file_splice_write,
.llseek = generic_file_llseek,
Expand Down
4 changes: 2 additions & 2 deletions fs/sysv/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const struct file_operations sysv_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.fsync = generic_file_fsync,
.splice_read = generic_file_splice_read,
Expand Down
4 changes: 2 additions & 2 deletions fs/ufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const struct file_operations ufs_file_operations = {
.llseek = generic_file_llseek,
.read = new_sync_read,
.read_iter = generic_file_read_iter,
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.write = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.open = generic_file_open,
.fsync = generic_file_fsync,
Expand Down
2 changes: 2 additions & 0 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,9 @@ int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isbl
extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *);
extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long);
extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *);
extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *);
extern ssize_t generic_file_direct_write(struct kiocb *, struct iov_iter *, loff_t);
extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t);
extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
Expand Down
Loading

0 comments on commit 8174202

Please sign in to comment.