mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"This the bunch that sat in -next + lock_parent() fix. This is the
minimal set; there's more pending stuff.
In particular, I really hope to get acct.c fixes merged this cycle -
we need that to deal sanely with delayed-mntput stuff. In the next
pile, hopefully - that series is fairly short and localized
(kernel/acct.c, fs/super.c and fs/namespace.c). In this pile: more
iov_iter work. Most of prereqs for ->splice_write with sane locking
order are there and Kent's dio rewrite would also fit nicely on top of
this pile"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (70 commits)
lock_parent: don't step on stale ->d_parent of all-but-freed one
kill generic_file_splice_write()
ceph: switch to iter_file_splice_write()
shmem: switch to iter_file_splice_write()
nfs: switch to iter_splice_write_file()
fs/splice.c: remove unneeded exports
ocfs2: switch to iter_file_splice_write()
->splice_write() via ->write_iter()
bio_vec-backed iov_iter
optimize copy_page_{to,from}_iter()
bury generic_file_aio_{read,write}
lustre: get rid of messing with iovecs
ceph: switch to ->write_iter()
ceph_sync_direct_write: stop poking into iov_iter guts
ceph_sync_read: stop poking into iov_iter guts
new helper: copy_page_from_iter()
fuse: switch to ->write_iter()
btrfs: switch to ->write_iter()
ocfs2: switch to ->write_iter()
xfs: switch to ->write_iter()
...
This commit is contained in:
commit
16b9057804
102 changed files with 1796 additions and 2028 deletions
|
|
@ -1017,10 +1017,9 @@ static int f2fs_write_end(struct file *file,
|
|||
}
|
||||
|
||||
static int check_direct_IO(struct inode *inode, int rw,
|
||||
const struct iovec *iov, loff_t offset, unsigned long nr_segs)
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
unsigned blocksize_mask = inode->i_sb->s_blocksize - 1;
|
||||
int i;
|
||||
|
||||
if (rw == READ)
|
||||
return 0;
|
||||
|
|
@ -1028,14 +1027,14 @@ static int check_direct_IO(struct inode *inode, int rw,
|
|||
if (offset & blocksize_mask)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < nr_segs; i++)
|
||||
if (iov[i].iov_len & blocksize_mask)
|
||||
return -EINVAL;
|
||||
if (iov_iter_alignment(iter) & blocksize_mask)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
|
||||
const struct iovec *iov, loff_t offset, unsigned long nr_segs)
|
||||
struct iov_iter *iter, loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
|
@ -1044,14 +1043,14 @@ static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
|
|||
if (f2fs_has_inline_data(inode))
|
||||
return 0;
|
||||
|
||||
if (check_direct_IO(inode, rw, iov, offset, nr_segs))
|
||||
if (check_direct_IO(inode, rw, iter, offset))
|
||||
return 0;
|
||||
|
||||
/* clear fsync mark to recover these blocks */
|
||||
fsync_mark_clear(F2FS_SB(inode->i_sb), inode->i_ino);
|
||||
|
||||
return blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
|
||||
get_data_block);
|
||||
return blockdev_direct_IO(rw, iocb, inode, iter, offset,
|
||||
get_data_block);
|
||||
}
|
||||
|
||||
static void f2fs_invalidate_data_page(struct page *page, unsigned int offset,
|
||||
|
|
|
|||
|
|
@ -808,10 +808,10 @@ long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
|
||||
const struct file_operations f2fs_file_operations = {
|
||||
.llseek = f2fs_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.aio_read = generic_file_aio_read,
|
||||
.aio_write = generic_file_aio_write,
|
||||
.read = new_sync_read,
|
||||
.write = new_sync_write,
|
||||
.read_iter = generic_file_read_iter,
|
||||
.write_iter = generic_file_write_iter,
|
||||
.open = generic_file_open,
|
||||
.mmap = f2fs_file_mmap,
|
||||
.fsync = f2fs_sync_file,
|
||||
|
|
@ -821,5 +821,5 @@ const struct file_operations f2fs_file_operations = {
|
|||
.compat_ioctl = f2fs_compat_ioctl,
|
||||
#endif
|
||||
.splice_read = generic_file_splice_read,
|
||||
.splice_write = generic_file_splice_write,
|
||||
.splice_write = iter_file_splice_write,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue