From 47ccf390327f6368529cc74cb12af711d4dec869 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 6 Oct 2005 14:50:11 +0000 Subject: [PATCH] STABLE14-windows-byte-range-locks-20051006 Do not mark locks lost simply because the ExtendLock failed. A lock is only lost if the server responds with EINVAL indicating that the lock no longer exists. A lock can be renewed by other clients that are also using the file. The client can make no assumptions about the status of a lock based upon the passage of time. (cherry picked from commit 8445720d36474797b67341991f15771dcb90b236) --- src/WINNT/afsd/cm_vnodeops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 868bd3600..c752c1870 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -4195,7 +4196,8 @@ void cm_CheckLocks() if (code) { osi_Log1(afsd_logp, "CALL ExtendLock FAILURE, code 0x%x", code); - cm_LockMarkSCacheLost(scp); + if (code == EINVAL || code == CM_ERROR_INVAL) + cm_LockMarkSCacheLost(scp); } else { osi_Log0(afsd_logp, "CALL ExtendLock SUCCESS"); } -- 2.39.5