diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-13 20:36:17 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 11:04:42 -0500 |
commit | 0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc (patch) | |
tree | fc67e000acb43601a0dcb9c0288a94a3d737b6a2 /fs/9p | |
parent | 95820a36516d12dcb49d066dd3d5b187a2557612 (diff) | |
download | kernel-common-0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc.tar.gz kernel-common-0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc.tar.bz2 kernel-common-0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc.zip |
9p: consolidate read/write functions
Currently there are two separate versions of read and write. One for
dealing with user buffers and the other for dealing with kernel buffers.
There is a tremendous amount of code duplication in the otherwise
identical versions of these functions. This patch adds an additional
user buffer parameter to read and write and conditionalizes handling of
the buffer on whether the kernel buffer or the user buffer is populated.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 52944d2249a4..3819a195de8f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -136,7 +136,7 @@ v9fs_file_read(struct file *filp, char __user * data, size_t count, P9_DPRINTK(P9_DEBUG_VFS, "\n"); fid = filp->private_data; - ret = p9_client_uread(fid, data, *offset, count); + ret = p9_client_read(fid, NULL, data, *offset, count); if (ret > 0) *offset += ret; @@ -164,7 +164,7 @@ v9fs_file_write(struct file *filp, const char __user * data, (int)count, (int)*offset); fid = filp->private_data; - ret = p9_client_uwrite(fid, data, *offset, count); + ret = p9_client_write(fid, NULL, data, *offset, count); if (ret > 0) { invalidate_inode_pages2_range(inode->i_mapping, *offset, *offset+ret); |