

nfsd_cross_mnt() when called in nfsd_lookup() is expected to return errno 
defined errors, yet when called in nfsd4_encode_dirent_fattr() is expected
to return nfsd.h htonl defined errors.

change nfsd_cross_mnt to return nfsd.h htonl defined errors.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
---


diff -puN fs/nfsd/vfs.c~nfsd-cross-mnt-error-fix fs/nfsd/vfs.c
--- linux-2.6.18-rc5/fs/nfsd/vfs.c~nfsd-cross-mnt-error-fix	2006-09-07 19:28:18.000000000 -0400
+++ linux-2.6.18-rc5-andros/fs/nfsd/vfs.c	2006-09-07 19:28:59.000000000 -0400
@@ -106,7 +106,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, s
 
 	exp2 = exp_get_by_name(exp->ex_client, mnt, mounts, &rqstp->rq_chandle);
 	if (IS_ERR(exp2)) {
-		err = PTR_ERR(exp2);
+		err = nfserrno(PTR_ERR(exp2));
 		dput(mounts);
 		mntput(mnt);
 		goto out;
@@ -115,7 +115,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, s
 		/* successfully crossed mount point.
 		 * check security flavor access to new export */
 		if (!EX_ACCESS(exp2, rqstp->rq_pflavindex)) {
-			err = -EPERM;
+			err = nfserr_perm;
 			exp_put(exp2);
 			dput(mounts);
 			mntput(mnt);
@@ -217,7 +217,7 @@ nfsd_lookup(struct svc_rqst *rqstp, stru
 		if (d_mountpoint(dentry)) {
 			if ((err = nfsd_cross_mnt(rqstp, &dentry, &exp))) {
 				dput(dentry);
-				goto out_nfserr;
+				goto out;
 			}
 		}
 	}
_
