If the cm_scache_t flags include CM_SCACHEFLAG_DELETED, do not
bother releasing an outstanding file lock to the file server.
The lock went away when the file was deleted. Any attempt to
release will fail with VNOVNODE which is translated locally into
CM_ERROR_BADFD.
If a RXAFS_ReleaseLock RPC fails with VNOVNODE, treat it as
success.
Change-Id: I15860920a224bd032256e08c9983fa31f7f1c9ee
Reviewed-on: http://gerrit.openafs.org/5118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
struct rx_connection * rxconnp;
AFSVolSync volSync;
+ if (scp->flags & CM_SCACHEFLAG_DELETED) {
+ osi_Log1(afsd_logp, "CALL ReleaseLock on Deleted Vnode scp 0x%p", scp);
+ return 0;
+ }
+
memset(&volSync, 0, sizeof(volSync));
tfid.Volume = scp->fid.volume;
lock_ObtainWrite(&scp->rw);
- return code;
+ return (code != CM_ERROR_BADFD ? code : 0);
}
/* called with scp->rw held. May release it during processing, but