]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: cm_LookupInternal obtain type of target
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 27 Nov 2012 05:16:58 +0000 (00:16 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 27 Nov 2012 15:44:51 +0000 (07:44 -0800)
cm_LookupInternal needs to return the target of a mount point
if the matching directory entry is a mount point.  Therefore, if
the target type is unknown the status information must be queried.

Reviewed-on: http://gerrit.openafs.org/8528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 9ed02a628afd700a0e3c47ac92fa9c89d0827301)

Change-Id: I02d09772df1ef32800736fd798f2f5f4b2997a86
Reviewed-on: http://gerrit.openafs.org/8532
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_vnodeops.c

index 89bbbaed1b76c4d1eda644f64cd29107e1bf892c..c03dee58339d1efa7751636a0616119e1b6ae33d 100644 (file)
@@ -1111,7 +1111,7 @@ retry_lookup:
      * that we stopped early, probably because we found the entry we're
      * looking for.  Any other non-zero code is an error.
      */
-    if (code && code != CM_ERROR_STOPNOW && code != CM_ERROR_BPLUS_NOMATCH) {
+    if (code && code != CM_ERROR_STOPNOW) {
         /* if the cm_scache_t we are searching in is not a directory
          * we must return path not found because the error
          * is to describe the final component not an intermediary
@@ -1252,7 +1252,7 @@ notfound:
     lock_ObtainWrite(&tscp->rw);
 
     /*
-     * Do not get status if we do not already have a callback.
+     * Do not get status if we do not already have a callback or know the type.
      * The process of reading the mount point string will obtain status information
      * in a single RPC.  No reason to add a second round trip.
      *
@@ -1260,7 +1260,7 @@ notfound:
      * current cm_user_t is not the same as the one that obtained the
      * mount point string contents.
      */
-    if (cm_HaveCallback(tscp)) {
+    if (cm_HaveCallback(tscp) || tscp->fileType == CM_SCACHETYPE_UNKNOWN) {
         code = cm_SyncOp(tscp, NULL, userp, reqp, 0,
                           CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_NEEDCALLBACK);
         if (code) {