From: Jeffrey Altman Date: Fri, 3 Mar 2006 18:26:45 +0000 (+0000) Subject: viced-remove-premature-commit-20060303 X-Git-Tag: mp-rxtcp-20060314~26 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=58b4069926c0e18c11c3fbe0969e94a269463183;p=packages%2Fo%2Fopenafs.git viced-remove-premature-commit-20060303 remove premature LockUpgrade/LockDowngrade commit --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index bcf12bf4e..213c9ad65 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -1698,8 +1698,6 @@ HandleLocking(Vnode * targetptr, afs_int32 rights, ViceLockType LockingType) switch (LockingType) { case LockRead: case LockWrite: - case LockUpgrade: - case LockDowngrade: if (Time > targetptr->disk.lock.lockTime) targetptr->disk.lock.lockTime = targetptr->disk.lock.lockCount = 0; @@ -1716,18 +1714,6 @@ HandleLocking(Vnode * targetptr, afs_int32 rights, ViceLockType LockingType) targetptr->disk.lock.lockTime = Time; } else return (EAGAIN); - } else if (LockingType == LockUpgrade) { - if (targetptr->disk.lock.lockCount == 1) { - targetptr->disk.lock.lockCount = -1; - targetptr->disk.lock.lockTime = Time; - } else - return (EAGAIN); - } else if (LockingType == LockDowngrade) { - if (targetptr->disk.lock.lockCount == -1) { - targetptr->disk.lock.lockCount = 1; - targetptr->disk.lock.lockTime = Time; - } else - return (EAGAIN); } break; case LockExtend: @@ -4969,11 +4955,10 @@ SAFSS_SetLock(struct rx_call *acall, struct AFSFid *Fid, ViceLockType type, afs_int32 rights, anyrights; /* rights for this and any user */ struct client *t_client; /* tmp ptr to client data */ struct in_addr logHostAddr; /* host ip holder for inet_ntoa */ - static char *locktype[5] = { "LockRead", "LockWrite", "LockExtend", "LockUpgrade", "LockDowngrade" }; + static char *locktype[4] = { "LockRead", "LockWrite", "LockExtend", "LockRelease" }; struct rx_connection *tcon = rx_ConnectionOf(acall); - if (type != LockRead && type != LockWrite && - type != LockUpgrade && type != LockDowngrade) { + if (type != LockRead && type != LockWrite) { errorCode = EINVAL; goto Bad_SetLock; }