Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192310
b: refs/heads/master
c: 1b4c606
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 14, 2010
1 parent 650dbde commit 89d238a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b157b06ca24514ef4b766cabb8e852c950040923
refs/heads/master: 1b4c6065b903390067c1b49bd616db5994c0d51c
14 changes: 8 additions & 6 deletions trunk/fs/nfs/nfsroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ static int __init root_nfs_ports(void)
*/
static int __init root_nfs_get_handle(void)
{
struct nfs_fh fh;
struct sockaddr_in sin;
unsigned int auth_flav_len = 0;
struct nfs_mount_request request = {
Expand All @@ -499,21 +498,24 @@ static int __init root_nfs_get_handle(void)
NFS_MNT3_VERSION : NFS_MNT_VERSION,
.protocol = (nfs_data.flags & NFS_MOUNT_TCP) ?
XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP,
.fh = &fh,
.auth_flav_len = &auth_flav_len,
};
int status;
int status = -ENOMEM;

request.fh = nfs_alloc_fhandle();
if (!request.fh)
goto out;
set_sockaddr(&sin, servaddr, htons(mount_port));
status = nfs_mount(&request);
if (status < 0)
printk(KERN_ERR "Root-NFS: Server returned error %d "
"while mounting %s\n", status, nfs_export_path);
else {
nfs_data.root.size = fh.size;
memcpy(nfs_data.root.data, fh.data, fh.size);
nfs_data.root.size = request.fh->size;
memcpy(&nfs_data.root.data, request.fh->data, request.fh->size);
}

nfs_free_fhandle(request.fh);
out:
return status;
}

Expand Down

0 comments on commit 89d238a

Please sign in to comment.