Commit 457f82ba authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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: Fix incorrect parameters to v9fs_file_readn.
  9p: Possible regression in p9_client_stat
  9p: default 9p transport module fix
parents eb872c15 9c9ad616
...@@ -57,7 +57,7 @@ static int v9fs_vfs_readpage(struct file *filp, struct page *page) ...@@ -57,7 +57,7 @@ static int v9fs_vfs_readpage(struct file *filp, struct page *page)
buffer = kmap(page); buffer = kmap(page);
offset = page_offset(page); offset = page_offset(page);
retval = v9fs_file_readn(filp, buffer, NULL, offset, PAGE_CACHE_SIZE); retval = v9fs_file_readn(filp, buffer, NULL, PAGE_CACHE_SIZE, offset);
if (retval < 0) if (retval < 0)
goto done; goto done;
......
...@@ -117,9 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt) ...@@ -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); kfree(options);
return ret; return ret;
} }
...@@ -689,6 +686,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options) ...@@ -689,6 +686,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
if (err < 0) if (err < 0)
goto error; goto error;
if (!clnt->trans_mod)
clnt->trans_mod = v9fs_get_default_trans();
if (clnt->trans_mod == NULL) { if (clnt->trans_mod == NULL) {
err = -EPROTONOSUPPORT; err = -EPROTONOSUPPORT;
P9_DPRINTK(P9_DEBUG_ERROR, P9_DPRINTK(P9_DEBUG_ERROR,
...@@ -1098,7 +1098,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, ...@@ -1098,7 +1098,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset,
if (data) { if (data) {
memmove(data, dataptr, count); memmove(data, dataptr, count);
data += count;
} }
if (udata) { if (udata) {
...@@ -1192,9 +1191,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) ...@@ -1192,9 +1191,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret); err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret);
if (err) { if (err) {
ret = ERR_PTR(err);
p9pdu_dump(1, req->rc); p9pdu_dump(1, req->rc);
goto free_and_error; p9_free_req(clnt, req);
goto error;
} }
P9_DPRINTK(P9_DEBUG_9P, P9_DPRINTK(P9_DEBUG_9P,
...@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) ...@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
p9_free_req(clnt, req); p9_free_req(clnt, req);
return ret; return ret;
free_and_error:
p9_free_req(clnt, req);
error: error:
kfree(ret); kfree(ret);
return ERR_PTR(err); return ERR_PTR(err);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment