X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fubik%2Fdisk.c;h=15fb858fd2ff7474644f6224f1f84ac9bfce444e;hp=a41aef44bbf2d4c910ebf4173a87dfa25bef29c8;hb=2b4d2224bac4e656d7504ce2783450117b74dd47;hpb=fe1648ca02137cac306d5f5002d8f79b580694ba diff --git a/src/ubik/disk.c b/src/ubik/disk.c index a41aef4..15fb858 100644 --- a/src/ubik/disk.c +++ b/src/ubik/disk.c @@ -820,6 +820,19 @@ udisk_end(atrans) struct ubik_trans *atrans; { struct ubik_dbase *dbase; +#if defined(UBIK_PAUSE) + /* Another thread is trying to lock this transaction. + * That can only be an RPC doing SDISK_Lock. + * Unlock the transaction, 'cause otherwise the other + * thread will never wake up. Don't free it because + * the caller will do that already. + */ + if (atrans->flags & TRSETLOCK) { + atrans->flags |= TRSTALE; + ulock_relLock(atrans); + return; + } +#endif /* UBIK_PAUSE */ if (!(atrans->flags & TRDONE)) udisk_abort(atrans); dbase = atrans->dbase;