--- linux-2.6.18-348.3.1.el5.i386/fs/nfsd//nfs3xdr.c 2013-11-14 14:39:32.000000000 +0100 +++ linux-2.6.18-348.3.1.el5.i386/fs/nfsd//nfs3xdr.c 2013-11-14 15:58:17.000000000 +0100 @@ -161,7 +161,7 @@ struct timespec time; *p++ = htonl(nfs3_ftypes[(stat->mode & S_IFMT) >> 12]); - *p++ = htonl((u32) stat->mode); + *p++ = htonl((u32) (stat->mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX))); *p++ = htonl((u32) stat->nlink); *p++ = htonl((u32) nfsd_ruid(rqstp, stat->uid)); *p++ = htonl((u32) nfsd_rgid(rqstp, stat->gid)); @@ -193,7 +193,8 @@ *p++ = xdr_one; *p++ = htonl(nfs3_ftypes[(fhp->fh_post_attr.mode & S_IFMT) >> 12]); - *p++ = htonl((u32) fhp->fh_post_attr.mode); + *p++ = htonl((u32) (fhp->fh_post_attr.mode + & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX))); *p++ = htonl((u32) fhp->fh_post_attr.nlink); *p++ = htonl((u32) nfsd_ruid(rqstp, fhp->fh_post_attr.uid)); *p++ = htonl((u32) nfsd_rgid(rqstp, fhp->fh_post_attr.gid)); --- linux-2.6.18-348.3.1.el5.i386/fs/nfsd/vfs.c 2013-11-14 14:39:32.000000000 +0100 +++ linux-2.6.18-348.3.1.el5.i386/fs/nfsd/vfs.c 2013-11-15 11:42:05.000000000 +0100 @@ -725,7 +725,7 @@ if (IS_ERR(*filp)) err = PTR_ERR(*filp); else { - if (may_flags & NFSD_MAY_64BIT_COOKIE) + if (may_flags & NFSD_MAY_64BIT_COOKIE && 0) (*filp)->f_mode |= FMODE_64BITHASH; else (*filp)->f_mode |= FMODE_32BITHASH;