SUNRPC: remove extraneous header inclusions
[powerpc.git] / fs / nfs / mount_clnt.c
index 0b9a783..4127487 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/net.h>
 #include <linux/in.h>
 #include <linux/sunrpc/clnt.h>
-#include <linux/sunrpc/xprt.h>
 #include <linux/sunrpc/sched.h>
 #include <linux/nfs_fs.h>
 
@@ -49,9 +48,12 @@ nfsroot_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
        struct mnt_fhstatus     result = {
                .fh             = fh
        };
+       struct rpc_message msg  = {
+               .rpc_argp       = path,
+               .rpc_resp       = &result,
+       };
        char                    hostname[32];
        int                     status;
-       int                     call;
 
        dprintk("NFS:      nfs_mount(%08x:%s)\n",
                        (unsigned)ntohl(addr->sin_addr.s_addr), path);
@@ -61,8 +63,12 @@ nfsroot_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
        if (IS_ERR(mnt_clnt))
                return PTR_ERR(mnt_clnt);
 
-       call = (version == NFS_MNT3_VERSION) ? MOUNTPROC3_MNT : MNTPROC_MNT;
-       status = rpc_call(mnt_clnt, call, path, &result, 0);
+       if (version == NFS_MNT3_VERSION)
+               msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC3_MNT];
+       else
+               msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT];
+
+       status = rpc_call_sync(mnt_clnt, &msg, 0);
        return status < 0? status : (result.status? -EACCES : 0);
 }
 
@@ -137,6 +143,8 @@ static struct rpc_procinfo  mnt_procedures[] = {
          .p_encode             = (kxdrproc_t) xdr_encode_dirpath,      
          .p_decode             = (kxdrproc_t) xdr_decode_fhstatus,
          .p_bufsiz             = MNT_dirpath_sz << 2,
+         .p_statidx            = MNTPROC_MNT,
+         .p_name               = "MOUNT",
        },
 };
 
@@ -146,6 +154,8 @@ static struct rpc_procinfo mnt3_procedures[] = {
          .p_encode             = (kxdrproc_t) xdr_encode_dirpath,
          .p_decode             = (kxdrproc_t) xdr_decode_fhstatus3,
          .p_bufsiz             = MNT_dirpath_sz << 2,
+         .p_statidx            = MOUNTPROC3_MNT,
+         .p_name               = "MOUNT",
        },
 };