]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/nfs3proc.c
autofs4: collect version check return
[linux-2.6-omap-h63xx.git] / fs / nfs / nfs3proc.c
index 1e750e4574a911e982606265edb63033be870de4..c55be7a7679e27f6c011766add0b2bf8e9cfc447 100644 (file)
@@ -699,7 +699,7 @@ nfs3_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
 }
 
 static int
-nfs3_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
+do_proc_fsinfo(struct rpc_clnt *client, struct nfs_fh *fhandle,
                 struct nfs_fsinfo *info)
 {
        struct rpc_message msg = {
@@ -711,11 +711,27 @@ nfs3_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
 
        dprintk("NFS call  fsinfo\n");
        nfs_fattr_init(info->fattr);
-       status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0);
+       status = rpc_call_sync(client, &msg, 0);
        dprintk("NFS reply fsinfo: %d\n", status);
        return status;
 }
 
+/*
+ * Bare-bones access to fsinfo: this is for nfs_get_root/nfs_get_sb via
+ * nfs_create_server
+ */
+static int
+nfs3_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
+                  struct nfs_fsinfo *info)
+{
+       int     status;
+
+       status = do_proc_fsinfo(server->client, fhandle, info);
+       if (status && server->nfs_client->cl_rpcclient != server->client)
+               status = do_proc_fsinfo(server->nfs_client->cl_rpcclient, fhandle, info);
+       return status;
+}
+
 static int
 nfs3_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
                   struct nfs_pathconf *info)