aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 13:22:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 13:22:56 -0700
commitfa927894bbb4a4c7669c72bad1924991022fda38 (patch)
tree93560f1a096973235fe9ff50c436f5239c1c499a /drivers/staging
parentc841e12add6926d64aa608687893465330b5a03e (diff)
parent8436318205b9f29e45db88850ec60e326327e241 (diff)
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second vfs update from Al Viro: "Now that net-next went in... Here's the next big chunk - killing ->aio_read() and ->aio_write(). There'll be one more pile today (direct_IO changes and generic_write_checks() cleanups/fixes), but I'd prefer to keep that one separate" * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits) ->aio_read and ->aio_write removed pcm: another weird API abuse infinibad: weird APIs switched to ->write_iter() kill do_sync_read/do_sync_write fuse: use iov_iter_get_pages() for non-splice path fuse: switch to ->read_iter/->write_iter switch drivers/char/mem.c to ->read_iter/->write_iter make new_sync_{read,write}() static coredump: accept any write method switch /dev/loop to vfs_iter_write() serial2002: switch to __vfs_read/__vfs_write ashmem: use __vfs_read() export __vfs_read() autofs: switch to __vfs_write() new helper: __vfs_write() switch hugetlbfs to ->read_iter() coda: switch to ->read_iter/->write_iter ncpfs: switch to ->read_iter/->write_iter net/9p: remove (now-)unused helpers p9_client_attach(): set fid->uid correctly ...
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/android/ashmem.c2
-rw-r--r--drivers/staging/comedi/drivers/serial2002.c18
-rw-r--r--drivers/staging/lustre/lustre/llite/file.c6
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_internal.h2
4 files changed, 7 insertions, 21 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index d140b733940c..c5c037ccf32c 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -310,7 +310,7 @@ static ssize_t ashmem_read(struct file *file, char __user *buf,
* be destroyed until all references to the file are dropped and
* ashmem_release is called.
*/
- ret = asma->file->f_op->read(asma->file, buf, len, pos);
+ ret = __vfs_read(asma->file, buf, len, pos);
if (ret >= 0) {
/** Update backing file pos, since f_ops->read() doesn't */
asma->file->f_pos = *pos;
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index ad35ed6e93f0..304ebff119ee 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -108,24 +108,16 @@ static int serial2002_tty_write(struct file *f, unsigned char *buf, int count)
{
const char __user *p = (__force const char __user *)buf;
int result;
+ loff_t offset = 0;
mm_segment_t oldfs;
oldfs = get_fs();
set_fs(KERNEL_DS);
- f->f_pos = 0;
- result = f->f_op->write(f, p, count, &f->f_pos);
+ result = __vfs_write(f, p, count, &offset);
set_fs(oldfs);
return result;
}
-static int serial2002_tty_readb(struct file *f, unsigned char *buf)
-{
- char __user *p = (__force char __user *)buf;
-
- f->f_pos = 0;
- return f->f_op->read(f, p, 1, &f->f_pos);
-}
-
static void serial2002_tty_read_poll_wait(struct file *f, int timeout)
{
struct poll_wqueues table;
@@ -161,13 +153,15 @@ static int serial2002_tty_read(struct file *f, int timeout)
result = -1;
if (!IS_ERR(f)) {
mm_segment_t oldfs;
+ char __user *p = (__force char __user *)&ch;
+ loff_t offset = 0;
oldfs = get_fs();
set_fs(KERNEL_DS);
if (f->f_op->poll) {
serial2002_tty_read_poll_wait(f, timeout);
- if (serial2002_tty_readb(f, &ch) == 1)
+ if (__vfs_read(f, p, 1, &offset) == 1)
result = ch;
} else {
/* Device does not support poll, busy wait */
@@ -178,7 +172,7 @@ static int serial2002_tty_read(struct file *f, int timeout)
if (retries >= timeout)
break;
- if (serial2002_tty_readb(f, &ch) == 1) {
+ if (__vfs_read(f, p, 1, &offset) == 1) {
result = ch;
break;
}
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 85e74d18d1c7..529062ea112b 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -3135,9 +3135,7 @@ int ll_inode_permission(struct inode *inode, int mask)
/* -o localflock - only provides locally consistent flock locks */
struct file_operations ll_file_operations = {
- .read = new_sync_read,
.read_iter = ll_file_read_iter,
- .write = new_sync_write,
.write_iter = ll_file_write_iter,
.unlocked_ioctl = ll_file_ioctl,
.open = ll_file_open,
@@ -3150,9 +3148,7 @@ struct file_operations ll_file_operations = {
};
struct file_operations ll_file_operations_flock = {
- .read = new_sync_read,
.read_iter = ll_file_read_iter,
- .write = new_sync_write,
.write_iter = ll_file_write_iter,
.unlocked_ioctl = ll_file_ioctl,
.open = ll_file_open,
@@ -3168,9 +3164,7 @@ struct file_operations ll_file_operations_flock = {
/* These are for -o noflock - to return ENOSYS on flock calls */
struct file_operations ll_file_operations_noflock = {
- .read = new_sync_read,
.read_iter = ll_file_read_iter,
- .write = new_sync_write,
.write_iter = ll_file_write_iter,
.unlocked_ioctl = ll_file_ioctl,
.open = ll_file_open,
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h
index 2af1d7286250..e7422f5c9c6f 100644
--- a/drivers/staging/lustre/lustre/llite/llite_internal.h
+++ b/drivers/staging/lustre/lustre/llite/llite_internal.h
@@ -938,10 +938,8 @@ struct ll_cl_context {
};
struct vvp_thread_info {
- struct iovec vti_local_iov;
struct vvp_io_args vti_args;
struct ra_io_arg vti_ria;
- struct kiocb vti_kiocb;
struct ll_cl_context vti_io_ctx;
};