]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/mount_clnt.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / fs / nfs / mount_clnt.c
index 49c7cd0502cc39b9411460ac7b27b6ac367781c2..086a6830d785c10269a3d0251130f14caad9d477 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/sched.h>
 #include <linux/nfs_fs.h>
+#include "internal.h"
 
 #ifdef RPC_DEBUG
 # define NFSDBG_FACILITY       NFSDBG_MOUNT
@@ -98,7 +99,7 @@ out_call_err:
 
 out_mnt_err:
        dprintk("NFS: MNT server returned result %d\n", result.status);
-       status = -EACCES;
+       status = nfs_stat_to_errno(result.status);
        goto out;
 }
 
@@ -130,10 +131,11 @@ static int xdr_decode_fhstatus3(struct rpc_rqst *req, __be32 *p,
                                struct mnt_fhstatus *res)
 {
        struct nfs_fh *fh = res->fh;
+       unsigned size;
 
        if ((res->status = ntohl(*p++)) == 0) {
-               int size = ntohl(*p++);
-               if (size <= NFS3_FHSIZE) {
+               size = ntohl(*p++);
+               if (size <= NFS3_FHSIZE && size != 0) {
                        fh->size = size;
                        memcpy(fh->data, p, size);
                } else