From: Jeffrey Altman Date: Thu, 6 Oct 2005 14:50:11 +0000 (+0000) Subject: STABLE14-windows-byte-range-locks-20051006 X-Git-Tag: openafs-stable-1_4_1-rc1~67 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=47ccf390327f6368529cc74cb12af711d4dec869;p=packages%2Fo%2Fopenafs.git 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) --- 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"); }