aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_addr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-01 22:32:23 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:28:26 -0400
commit9565a5445240cd441f2c670aa7260ee8eb5dff79 (patch)
tree4449d982f9476fae8bff8ee9f78c673508b42a4e /fs/9p/vfs_addr.c
parentc711a6b111322941a41bb024dbcc22b9858d5dd6 (diff)
9p: get rid of v9fs_direct_file_write()
just handle it in ->direct_IO() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/vfs_addr.c')
-rw-r--r--fs/9p/vfs_addr.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 0e153f07e0fc..402269c108cd 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -252,15 +252,21 @@ static int v9fs_launder_page(struct page *page)
252static ssize_t 252static ssize_t
253v9fs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos) 253v9fs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
254{ 254{
255 /* 255 struct file *file = iocb->ki_filp;
256 * FIXME 256 if (rw == WRITE) {
257 * Now that we do caching with cache mode enabled, We need 257 ssize_t written;
258 * to support direct IO 258 int err = 0;
259 */ 259
260 p9_debug(P9_DEBUG_VFS, "v9fs_direct_IO: v9fs_direct_IO (%pD) off/no(%lld/%lu) EINVAL\n", 260 written = p9_client_write(file->private_data, pos, iter, &err);
261 iocb->ki_filp, 261 if (written) {
262 (long long)pos, iter->nr_segs); 262 struct inode *inode = file_inode(file);
263 263 loff_t i_size = i_size_read(inode);
264 if (pos + written > i_size)
265 inode_add_bytes(inode, pos + written - i_size);
266 return written;
267 }
268 return err;
269 }
264 return -EINVAL; 270 return -EINVAL;
265} 271}
266 272