aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-27 15:24:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-27 15:24:08 -0400
commitcf481442f2e086316ed8a1b3046f00ad23632ac4 (patch)
tree2edd0fb64549dfb6388e39d86e8965908dfcb925 /net
parent788d908f2879a17e5f80924f3da2e23f1034482d (diff)
parent7815f4be4026b6c5027058102ae67a4b9feffa5f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: update documentation pointers 9p: remove unnecessary v9fses->options which duplicates the mount string net/9p: insulate the client against an invalid error code sent by a 9p server 9p: Add missing cast for the error return value in v9fs_get_inode 9p: Remove redundant inode uid/gid assignment 9p: Fix possible regressions when ->get_sb fails. 9p: Fix v9fs show_options 9p: Fix possible memleak in v9fs_inode_from fid. 9p: minor comment fixes 9p: Fix possible inode leak in v9fs_get_inode. 9p: Check for error in return value of v9fs_fid_add
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c21
-rw-r--r--net/9p/error.c2
-rw-r--r--net/9p/trans_fd.c8
-rw-r--r--net/9p/trans_rdma.c9
-rw-r--r--net/9p/trans_virtio.c11
5 files changed, 22 insertions, 29 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 787ccddb85ea..5bf5f227dbe0 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -60,9 +60,9 @@ static struct p9_req_t *
60p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); 60p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...);
61 61
62/** 62/**
63 * v9fs_parse_options - parse mount options into session structure 63 * parse_options - parse mount options into client structure
64 * @options: options string passed from mount 64 * @opts: options string passed from mount
65 * @v9ses: existing v9fs session information 65 * @clnt: existing v9fs client information
66 * 66 *
67 * Return 0 upon success, -ERRNO upon failure 67 * Return 0 upon success, -ERRNO upon failure
68 */ 68 */
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(p9_tag_lookup);
232 232
233/** 233/**
234 * p9_tag_init - setup tags structure and contents 234 * p9_tag_init - setup tags structure and contents
235 * @tags: tags structure from the client struct 235 * @c: v9fs client struct
236 * 236 *
237 * This initializes the tags structure for each client instance. 237 * This initializes the tags structure for each client instance.
238 * 238 *
@@ -258,7 +258,7 @@ error:
258 258
259/** 259/**
260 * p9_tag_cleanup - cleans up tags structure and reclaims resources 260 * p9_tag_cleanup - cleans up tags structure and reclaims resources
261 * @tags: tags structure from the client struct 261 * @c: v9fs client struct
262 * 262 *
263 * This frees resources associated with the tags structure 263 * This frees resources associated with the tags structure
264 * 264 *
@@ -411,14 +411,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
411 if (c->dotu) 411 if (c->dotu)
412 err = -ecode; 412 err = -ecode;
413 413
414 if (!err) { 414 if (!err || !IS_ERR_VALUE(err))
415 err = p9_errstr2errno(ename, strlen(ename)); 415 err = p9_errstr2errno(ename, strlen(ename));
416 416
417 /* string match failed */
418 if (!err)
419 err = -ESERVERFAULT;
420 }
421
422 P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename); 417 P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename);
423 418
424 kfree(ename); 419 kfree(ename);
@@ -430,8 +425,8 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
430 425
431/** 426/**
432 * p9_client_flush - flush (cancel) a request 427 * p9_client_flush - flush (cancel) a request
433 * c: client state 428 * @c: client state
434 * req: request to cancel 429 * @oldreq: request to cancel
435 * 430 *
436 * This sents a flush for a particular requests and links 431 * This sents a flush for a particular requests and links
437 * the flush request to the original request. The current 432 * the flush request to the original request. The current
diff --git a/net/9p/error.c b/net/9p/error.c
index fdebe4314062..52518512a93e 100644
--- a/net/9p/error.c
+++ b/net/9p/error.c
@@ -239,7 +239,7 @@ int p9_errstr2errno(char *errstr, int len)
239 errstr[len] = 0; 239 errstr[len] = 0;
240 printk(KERN_ERR "%s: server reported unknown error %s\n", 240 printk(KERN_ERR "%s: server reported unknown error %s\n",
241 __func__, errstr); 241 __func__, errstr);
242 errno = 1; 242 errno = ESERVERFAULT;
243 } 243 }
244 244
245 return -errno; 245 return -errno;
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 8c2588e4edc0..8d934dd7fd54 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -119,8 +119,8 @@ struct p9_poll_wait {
119 * @wpos: write position for current frame 119 * @wpos: write position for current frame
120 * @wsize: amount of data to write for current frame 120 * @wsize: amount of data to write for current frame
121 * @wbuf: current write buffer 121 * @wbuf: current write buffer
122 * @poll_pending_link: pending links to be polled per conn
122 * @poll_wait: array of wait_q's for various worker threads 123 * @poll_wait: array of wait_q's for various worker threads
123 * @poll_waddr: ????
124 * @pt: poll state 124 * @pt: poll state
125 * @rq: current read work 125 * @rq: current read work
126 * @wq: current write work 126 * @wq: current write work
@@ -700,9 +700,9 @@ static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req)
700} 700}
701 701
702/** 702/**
703 * parse_options - parse mount options into session structure 703 * parse_opts - parse mount options into p9_fd_opts structure
704 * @options: options string passed from mount 704 * @params: options string passed from mount
705 * @opts: transport-specific structure to parse options into 705 * @opts: fd transport-specific structure to parse options into
706 * 706 *
707 * Returns 0 upon success, -ERRNO upon failure 707 * Returns 0 upon success, -ERRNO upon failure
708 */ 708 */
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index ac4990041ebb..65cb29db03f8 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -67,14 +67,15 @@
67 * @pd: Protection Domain pointer 67 * @pd: Protection Domain pointer
68 * @qp: Queue Pair pointer 68 * @qp: Queue Pair pointer
69 * @cq: Completion Queue pointer 69 * @cq: Completion Queue pointer
70 * @dm_mr: DMA Memory Region pointer
70 * @lkey: The local access only memory region key 71 * @lkey: The local access only memory region key
71 * @timeout: Number of uSecs to wait for connection management events 72 * @timeout: Number of uSecs to wait for connection management events
72 * @sq_depth: The depth of the Send Queue 73 * @sq_depth: The depth of the Send Queue
73 * @sq_sem: Semaphore for the SQ 74 * @sq_sem: Semaphore for the SQ
74 * @rq_depth: The depth of the Receive Queue. 75 * @rq_depth: The depth of the Receive Queue.
76 * @rq_count: Count of requests in the Receive Queue.
75 * @addr: The remote peer's address 77 * @addr: The remote peer's address
76 * @req_lock: Protects the active request list 78 * @req_lock: Protects the active request list
77 * @send_wait: Wait list when the SQ fills up
78 * @cm_done: Completion event for connection management tracking 79 * @cm_done: Completion event for connection management tracking
79 */ 80 */
80struct p9_trans_rdma { 81struct p9_trans_rdma {
@@ -154,9 +155,9 @@ static match_table_t tokens = {
154}; 155};
155 156
156/** 157/**
157 * parse_options - parse mount options into session structure 158 * parse_opts - parse mount options into rdma options structure
158 * @options: options string passed from mount 159 * @params: options string passed from mount
159 * @opts: transport-specific structure to parse options into 160 * @opts: rdma transport-specific structure to parse options into
160 * 161 *
161 * Returns 0 upon success, -ERRNO upon failure 162 * Returns 0 upon success, -ERRNO upon failure
162 */ 163 */
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index a49484e67e1d..9bf0b737aa51 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -57,11 +57,9 @@ static int chan_index;
57 * @initialized: whether the channel is initialized 57 * @initialized: whether the channel is initialized
58 * @inuse: whether the channel is in use 58 * @inuse: whether the channel is in use
59 * @lock: protects multiple elements within this structure 59 * @lock: protects multiple elements within this structure
60 * @client: client instance
60 * @vdev: virtio dev associated with this channel 61 * @vdev: virtio dev associated with this channel
61 * @vq: virtio queue associated with this channel 62 * @vq: virtio queue associated with this channel
62 * @tagpool: accounting for tag ids (and request slots)
63 * @reqs: array of request slots
64 * @max_tag: current number of request_slots allocated
65 * @sg: scatter gather list which is used to pack a request (protected?) 63 * @sg: scatter gather list which is used to pack a request (protected?)
66 * 64 *
67 * We keep all per-channel information in a structure. 65 * We keep all per-channel information in a structure.
@@ -92,7 +90,7 @@ static unsigned int rest_of_page(void *data)
92 90
93/** 91/**
94 * p9_virtio_close - reclaim resources of a channel 92 * p9_virtio_close - reclaim resources of a channel
95 * @trans: transport state 93 * @client: client instance
96 * 94 *
97 * This reclaims a channel by freeing its resources and 95 * This reclaims a channel by freeing its resources and
98 * reseting its inuse flag. 96 * reseting its inuse flag.
@@ -181,9 +179,8 @@ static int p9_virtio_cancel(struct p9_client *client, struct p9_req_t *req)
181 179
182/** 180/**
183 * p9_virtio_request - issue a request 181 * p9_virtio_request - issue a request
184 * @t: transport state 182 * @client: client instance issuing the request
185 * @tc: &p9_fcall request to transmit 183 * @req: request to be issued
186 * @rc: &p9_fcall to put reponse into
187 * 184 *
188 */ 185 */
189 186