aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/hypfs
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/hypfs')
-rw-r--r--arch/s390/hypfs/inode.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 813fc21358f9..cd702ae45d6d 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -134,12 +134,20 @@ static int hypfs_open(struct inode *inode, struct file *filp)
134 return 0; 134 return 0;
135} 135}
136 136
137static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf, 137static ssize_t hypfs_aio_read(struct kiocb *iocb, const struct iovec *iov,
138 size_t count, loff_t offset) 138 unsigned long nr_segs, loff_t offset)
139{ 139{
140 char *data; 140 char *data;
141 size_t len; 141 size_t len;
142 struct file *filp = iocb->ki_filp; 142 struct file *filp = iocb->ki_filp;
143 /* XXX: temporary */
144 char __user *buf = iov[0].iov_base;
145 size_t count = iov[0].iov_len;
146
147 if (nr_segs != 1) {
148 count = -EINVAL;
149 goto out;
150 }
143 151
144 data = filp->private_data; 152 data = filp->private_data;
145 len = strlen(data); 153 len = strlen(data);
@@ -158,12 +166,13 @@ static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf,
158out: 166out:
159 return count; 167 return count;
160} 168}
161static ssize_t hypfs_aio_write(struct kiocb *iocb, const char __user *buf, 169static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov,
162 size_t count, loff_t pos) 170 unsigned long nr_segs, loff_t offset)
163{ 171{
164 int rc; 172 int rc;
165 struct super_block *sb; 173 struct super_block *sb;
166 struct hypfs_sb_info *fs_info; 174 struct hypfs_sb_info *fs_info;
175 size_t count = iov_length(iov, nr_segs);
167 176
168 sb = iocb->ki_filp->f_dentry->d_inode->i_sb; 177 sb = iocb->ki_filp->f_dentry->d_inode->i_sb;
169 fs_info = sb->s_fs_info; 178 fs_info = sb->s_fs_info;