linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / nfs / mount_clnt.c
index a2ddc6c..db99b8f 100644 (file)
@@ -31,7 +31,7 @@
 
 static struct rpc_clnt *       mnt_create(char *, struct sockaddr_in *,
                                                                int, int);
-struct rpc_program             mnt_program;
+static struct rpc_program      mnt_program;
 
 struct mnt_fhstatus {
        unsigned int            status;
@@ -80,11 +80,8 @@ mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version,
        clnt = rpc_create_client(xprt, hostname,
                                &mnt_program, version,
                                RPC_AUTH_UNIX);
-       if (IS_ERR(clnt)) {
-               xprt_destroy(xprt);
-       } else {
+       if (!IS_ERR(clnt)) {
                clnt->cl_softrtry = 1;
-               clnt->cl_chatty   = 1;
                clnt->cl_oneshot  = 1;
                clnt->cl_intr = 1;
        }
@@ -108,7 +105,6 @@ xdr_decode_fhstatus(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res)
 {
        struct nfs_fh *fh = res->fh;
 
-       memset((void *)fh, 0, sizeof(*fh));
        if ((res->status = ntohl(*p++)) == 0) {
                fh->size = NFS2_FHSIZE;
                memcpy(fh->data, p, NFS2_FHSIZE);
@@ -121,7 +117,6 @@ xdr_decode_fhstatus3(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res)
 {
        struct nfs_fh *fh = res->fh;
 
-       memset((void *)fh, 0, sizeof(*fh));
        if ((res->status = ntohl(*p++)) == 0) {
                int size = ntohl(*p++);
                if (size <= NFS3_FHSIZE) {
@@ -176,7 +171,7 @@ static struct rpc_version * mnt_version[] = {
 
 static struct rpc_stat         mnt_stats;
 
-struct rpc_program     mnt_program = {
+static struct rpc_program      mnt_program = {
        .name           = "mount",
        .number         = NFS_MNT_PROGRAM,
        .nrvers         = sizeof(mnt_version)/sizeof(mnt_version[0]),