summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-14 05:36:17 +0400
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 20:04:42 +0400
commit0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc (patch)
treefc67e000acb43601a0dcb9c0288a94a3d737b6a2 /include/net
parent95820a36516d12dcb49d066dd3d5b187a2557612 (diff)
downloadlinux-0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc.tar.xz
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 'include/net')
-rw-r--r--include/net/9p/client.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 6a71d9067818..c70a0f0b448d 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -201,13 +201,11 @@ int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
char *extension);
int p9_client_clunk(struct p9_fid *fid);
int p9_client_remove(struct p9_fid *fid);
-int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count);
+int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
+ u64 offset, u32 count);
int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count);
-int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count);
-int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset,
- u32 count);
-int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset,
- u32 count);
+int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata,
+ u64 offset, u32 count);
struct p9_stat *p9_client_stat(struct p9_fid *fid);
int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst);
struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset);