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.
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>
(cherry picked from
fa11f71f040b2e6856047c53fdd902109e5c6e52)
Change-Id: I4b70abab200ea50b419e215f4b3f3b4d3d7ab484
Reviewed-on: http://gerrit.openafs.org/5144
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