linux-nfs-pag-handling-20070822
[openafs.git] / src / afs / afs_nfsclnt.c
index 59aaa45..c8941dd 100644 (file)
@@ -203,6 +203,12 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter,
 #else
     uid = (*cred)->cr_uid;
 #endif
+    /* Do this early, so pag management knows */
+#ifdef AFS_OSF_ENV
+    (*cred)->cr_ruid = NFSXLATOR_CRED; /* Identify it as nfs xlator call */
+#else
+    (*cred)->cr_rgid = NFSXLATOR_CRED; /* Identify it as nfs xlator call */
+#endif
     if ((afs_nfsexporter->exp_states & EXP_CLIPAGS) && pag != NOPAG) {
        uid = pag;
     } else if (pag != NOPAG) {
@@ -300,11 +306,6 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter,
     *pagparam = pag;
     *outexporter = (struct afs_exporter *)np;
     afs_PutUser(au, WRITE_LOCK);
-#ifdef AFS_OSF_ENV
-    (*cred)->cr_ruid = NFSXLATOR_CRED; /* Identify it as nfs xlator call */
-#else
-    (*cred)->cr_rgid = NFSXLATOR_CRED; /* Identify it as nfs xlator call */
-#endif
 /*    ReleaseWriteLock(&afs_xnfsreq);  */
     return 0;
 }