knfsd: 64 bit ino support for NFS server
[safe/jmp/linux-2.6] / fs / nfsd / nfsxdr.c
index cb3e7fa..986f9b3 100644 (file)
@@ -523,6 +523,10 @@ nfssvc_encode_entry(void *ccdv, const char *name,
                cd->common.err = nfserr_toosmall;
                return -EINVAL;
        }
+       if (ino > ~((u32) 0)) {
+               cd->common.err = nfserr_fbig;
+               return -EINVAL;
+       }
        *p++ = xdr_one;                         /* mark entry present */
        *p++ = htonl((u32) ino);                /* file id */
        p    = xdr_encode_array(p, name, namlen);/* name length & name */