Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Jul 20, 2009
2 parents eb872c1 + 9c9ad61 commit 457f82b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fs/9p/vfs_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int v9fs_vfs_readpage(struct file *filp, struct page *page)
buffer = kmap(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)
goto done;

Expand Down
13 changes: 5 additions & 8 deletions net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -689,6 +686,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,
Expand Down Expand Up @@ -1098,7 +1098,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) {
Expand Down Expand Up @@ -1192,9 +1191,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,
Expand All @@ -1211,8 +1210,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);
Expand Down

0 comments on commit 457f82b

Please sign in to comment.