aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs3proc.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index c172a7584646..ed67567f0556 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -68,27 +68,39 @@ nfs3_async_handle_jukebox(struct rpc_task *task)
68 return 1; 68 return 1;
69} 69}
70 70
71/*
72 * Bare-bones access to getattr: this is for nfs_read_super.
73 */
74static int 71static int
75nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, 72do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle,
76 struct nfs_fsinfo *info) 73 struct nfs_fsinfo *info)
77{ 74{
78 int status; 75 int status;
79 76
80 dprintk("%s: call fsinfo\n", __FUNCTION__); 77 dprintk("%s: call fsinfo\n", __FUNCTION__);
81 nfs_fattr_init(info->fattr); 78 nfs_fattr_init(info->fattr);
82 status = rpc_call(server->client_sys, NFS3PROC_FSINFO, fhandle, info, 0); 79 status = rpc_call(client, NFS3PROC_FSINFO, fhandle, info, 0);
83 dprintk("%s: reply fsinfo: %d\n", __FUNCTION__, status); 80 dprintk("%s: reply fsinfo: %d\n", __FUNCTION__, status);
84 if (!(info->fattr->valid & NFS_ATTR_FATTR)) { 81 if (!(info->fattr->valid & NFS_ATTR_FATTR)) {
85 status = rpc_call(server->client_sys, NFS3PROC_GETATTR, fhandle, info->fattr, 0); 82 status = rpc_call(client, NFS3PROC_GETATTR, fhandle, info->fattr, 0);
86 dprintk("%s: reply getattr: %d\n", __FUNCTION__, status); 83 dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
87 } 84 }
88 return status; 85 return status;
89} 86}
90 87
91/* 88/*
89 * Bare-bones access to getattr: this is for nfs_read_super.
90 */
91static int
92nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
93 struct nfs_fsinfo *info)
94{
95 int status;
96
97 status = do_proc_get_root(server->client, fhandle, info);
98 if (status && server->client_sys != server->client)
99 status = do_proc_get_root(server->client_sys, fhandle, info);
100 return status;
101}
102
103/*
92 * One function for each procedure in the NFS protocol. 104 * One function for each procedure in the NFS protocol.
93 */ 105 */
94static int 106static int