mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: cm_HaveCallback optimize .readonly
If the cm_scache_t has a registered callback, there is no reason to obtain a volume reference for a .readonly. Just use the callback. Change-Id: I40a696b9c5fa2e8104837871236c41c338dfbdf9 Reviewed-on: http://gerrit.openafs.org/7716 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
561b9ce809
commit
f73aebbe87
@ -1576,6 +1576,9 @@ int cm_HaveCallback(cm_scache_t *scp)
|
||||
return (cm_data.fakeDirVersion == scp->dataVersion);
|
||||
}
|
||||
#endif
|
||||
if (scp->cbServerp != NULL)
|
||||
return 1;
|
||||
|
||||
if (scp->flags & CM_SCACHEFLAG_PURERO) {
|
||||
cm_volume_t *volp = cm_GetVolumeByFID(&scp->fid);
|
||||
if (volp) {
|
||||
@ -1600,10 +1603,7 @@ int cm_HaveCallback(cm_scache_t *scp)
|
||||
return haveCB;
|
||||
}
|
||||
}
|
||||
if (scp->cbServerp != NULL)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* need to detect a broken callback that races with our obtaining a callback.
|
||||
|
Loading…
Reference in New Issue
Block a user