diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:24:05 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:24:05 -0400 |
| commit | 6a6be470c3071559970c5659354484d4f664050e (patch) | |
| tree | d4b335e863e426acad96fe5e4bce2e3e064abc32 /fs/nfs/nfsroot.c | |
| parent | 98c89cdd3a292af3451e47a2a33132f5183861b0 (diff) | |
| parent | 126e216a8730532dfb685205309275f87e3d133e (diff) | |
Merge branch 'nfs-for-2.6.35' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.35' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (78 commits)
SUNRPC: Don't spam gssd with upcall requests when the kerberos key expired
SUNRPC: Reorder the struct rpc_task fields
SUNRPC: Remove the 'tk_magic' debugging field
SUNRPC: Move the task->tk_bytes_sent and tk_rtt to struct rpc_rqst
NFS: Don't call iput() in nfs_access_cache_shrinker
NFS: Clean up nfs_access_zap_cache()
NFS: Don't run nfs_access_cache_shrinker() when the mask is GFP_NOFS
SUNRPC: Ensure rpcauth_prune_expired() respects the nr_to_scan parameter
SUNRPC: Ensure memory shrinker doesn't waste time in rpcauth_prune_expired()
SUNRPC: Dont run rpcauth_cache_shrinker() when gfp_mask is GFP_NOFS
NFS: Read requests can use GFP_KERNEL.
NFS: Clean up nfs_create_request()
NFS: Don't use GFP_KERNEL in rpcsec_gss downcalls
NFSv4: Don't use GFP_KERNEL allocations in state recovery
SUNRPC: Fix xs_setup_bc_tcp()
SUNRPC: Replace jiffies-based metrics with ktime-based metrics
ktime: introduce ktime_to_ms()
SUNRPC: RPC metrics and RTT estimator should use same RTT value
NFS: Calldata for nfs4_renew_done()
NFS: Squelch compiler warning in nfs_add_server_stats()
...
Diffstat (limited to 'fs/nfs/nfsroot.c')
| -rw-r--r-- | fs/nfs/nfsroot.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 8c55b27c0de4..6bd19d843af7 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
| @@ -488,7 +488,6 @@ static int __init root_nfs_ports(void) | |||
| 488 | */ | 488 | */ |
| 489 | static int __init root_nfs_get_handle(void) | 489 | static int __init root_nfs_get_handle(void) |
| 490 | { | 490 | { |
| 491 | struct nfs_fh fh; | ||
| 492 | struct sockaddr_in sin; | 491 | struct sockaddr_in sin; |
| 493 | unsigned int auth_flav_len = 0; | 492 | unsigned int auth_flav_len = 0; |
| 494 | struct nfs_mount_request request = { | 493 | struct nfs_mount_request request = { |
| @@ -499,21 +498,24 @@ static int __init root_nfs_get_handle(void) | |||
| 499 | NFS_MNT3_VERSION : NFS_MNT_VERSION, | 498 | NFS_MNT3_VERSION : NFS_MNT_VERSION, |
| 500 | .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? | 499 | .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? |
| 501 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, | 500 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, |
| 502 | .fh = &fh, | ||
| 503 | .auth_flav_len = &auth_flav_len, | 501 | .auth_flav_len = &auth_flav_len, |
| 504 | }; | 502 | }; |
| 505 | int status; | 503 | int status = -ENOMEM; |
| 506 | 504 | ||
| 505 | request.fh = nfs_alloc_fhandle(); | ||
| 506 | if (!request.fh) | ||
| 507 | goto out; | ||
| 507 | set_sockaddr(&sin, servaddr, htons(mount_port)); | 508 | set_sockaddr(&sin, servaddr, htons(mount_port)); |
| 508 | status = nfs_mount(&request); | 509 | status = nfs_mount(&request); |
| 509 | if (status < 0) | 510 | if (status < 0) |
| 510 | printk(KERN_ERR "Root-NFS: Server returned error %d " | 511 | printk(KERN_ERR "Root-NFS: Server returned error %d " |
| 511 | "while mounting %s\n", status, nfs_export_path); | 512 | "while mounting %s\n", status, nfs_export_path); |
| 512 | else { | 513 | else { |
| 513 | nfs_data.root.size = fh.size; | 514 | nfs_data.root.size = request.fh->size; |
| 514 | memcpy(nfs_data.root.data, fh.data, fh.size); | 515 | memcpy(&nfs_data.root.data, request.fh->data, request.fh->size); |
| 515 | } | 516 | } |
| 516 | 517 | nfs_free_fhandle(request.fh); | |
| 518 | out: | ||
| 517 | return status; | 519 | return status; |
| 518 | } | 520 | } |
| 519 | 521 | ||
