diff -u --recursive --new-file linux-2.2.14-nfsv3-0.20.9/fs/nfs/inode.c linux-2.2.14-nfsv3/fs/nfs/inode.c --- linux-2.2.14-nfsv3-0.20.9/fs/nfs/inode.c Thu Apr 20 14:28:26 2000 +++ linux-2.2.14-nfsv3/fs/nfs/inode.c Thu Apr 20 13:39:14 2000 @@ -282,7 +282,7 @@ int tcp, version, maxlen; MOD_INC_USE_COUNT; - sb->u.nfs_sb.s_root = NULL; + memset(&sb->u.nfs_sb, 0, sizeof(sb->u.nfs_sb)); if (!data) { printk(KERN_NOTICE "nfs_read_super: missing data argument\n"); goto failure; diff -u --recursive --new-file linux-2.2.14-nfsv3-0.20.9/fs/nfs/mount_clnt.c linux-2.2.14-nfsv3/fs/nfs/mount_clnt.c --- linux-2.2.14-nfsv3-0.20.9/fs/nfs/mount_clnt.c Thu Apr 20 14:28:26 2000 +++ linux-2.2.14-nfsv3/fs/nfs/mount_clnt.c Thu Apr 20 14:15:59 2000 @@ -122,23 +122,27 @@ static int 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) { res->fh->size = NFS2_FHSIZE; memcpy(res->fh->data, p, NFS2_FHSIZE); - } else - memset((u8 *)res, 0, sizeof(*res)); + } return 0; } static int xdr_decode_fhstatus3(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res) { - memset((u8 *)res, 0, sizeof(*res)); + struct nfs_fh *fh = res->fh; + + memset((void *)fh, 0, sizeof(*fh)); if ((res->status = ntohl(*p++)) == 0) { - int size = ntohl(*p++); + unsigned int size = ntohl(*p++); if (size <= NFS3_FHSIZE) { res->fh->size = size; - memcpy(res->fh->data, p, res->fh->size); + memcpy(res->fh->data, p, size); } } return 0;