diff options
Diffstat (limited to 'net/9p/client.c')
| -rw-r--r-- | net/9p/client.c | 34 | 
1 files changed, 13 insertions, 21 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index dd43a8289b0d..5bf5f227dbe0 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -60,9 +60,9 @@ static struct p9_req_t *  p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...);  /** - * v9fs_parse_options - parse mount options into session structure - * @options: options string passed from mount - * @v9ses: existing v9fs session information + * parse_options - parse mount options into client structure + * @opts: options string passed from mount + * @clnt: existing v9fs client information   *   * Return 0 upon success, -ERRNO upon failure   */ @@ -117,9 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)  		}  	} -	if (!clnt->trans_mod) -		clnt->trans_mod = v9fs_get_default_trans(); -  	kfree(options);  	return ret;  } @@ -235,7 +232,7 @@ EXPORT_SYMBOL(p9_tag_lookup);  /**   * p9_tag_init - setup tags structure and contents - * @tags: tags structure from the client struct + * @c:  v9fs client struct   *   * This initializes the tags structure for each client instance.   * @@ -261,7 +258,7 @@ error:  /**   * p9_tag_cleanup - cleans up tags structure and reclaims resources - * @tags: tags structure from the client struct + * @c:  v9fs client struct   *   * This frees resources associated with the tags structure   * @@ -414,14 +411,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)  		if (c->dotu)  			err = -ecode; -		if (!err) { +		if (!err || !IS_ERR_VALUE(err))  			err = p9_errstr2errno(ename, strlen(ename)); -			/* string match failed */ -			if (!err) -				err = -ESERVERFAULT; -		} -  		P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename);  		kfree(ename); @@ -433,8 +425,8 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)  /**   * p9_client_flush - flush (cancel) a request - * c: client state - * req: request to cancel + * @c: client state + * @oldreq: request to cancel   *   * This sents a flush for a particular requests and links   * the flush request to the original request.  The current @@ -689,6 +681,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)  	if (err < 0)  		goto error; +	if (!clnt->trans_mod) +		clnt->trans_mod = v9fs_get_default_trans(); +  	if (clnt->trans_mod == NULL) {  		err = -EPROTONOSUPPORT;  		P9_DPRINTK(P9_DEBUG_ERROR, @@ -1098,7 +1093,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset,  	if (data) {  		memmove(data, dataptr, count); -		data += count;  	}  	if (udata) { @@ -1192,9 +1186,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)  	err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret);  	if (err) { -		ret = ERR_PTR(err);  		p9pdu_dump(1, req->rc); -		goto free_and_error; +		p9_free_req(clnt, req); +		goto error;  	}  	P9_DPRINTK(P9_DEBUG_9P, @@ -1211,8 +1205,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)  	p9_free_req(clnt, req);  	return ret; -free_and_error: -	p9_free_req(clnt, req);  error:  	kfree(ret);  	return ERR_PTR(err);  | 
