[OpenAFS-devel] patch for afs_vnop_remove.c
Hartmut Reuter
reuter@rzg.mpg.de
Fri, 08 Feb 2002 16:21:15 +0100
Hi,
this caused some oopses: obviously tdc can here be zero!
--- /opt/openafs/src/afs/VNOPS/afs_vnop_remove.c Wed Nov 21
17:01:31 2001+++ ./afs_vnop_remove.c Fri Feb 8 14:29:09 2002
@@ -417,7 +417,7 @@
if (adp) {
tdc = afs_FindDCache(adp, 0);
ObtainWriteLock(&adp->lock, 159);
- ObtainSharedLock(&tdc->lock, 639);
+ if (tdc) ObtainSharedLock(&tdc->lock, 639);
/* afsremove releases the adp & tdc locks, and does
vn_rele(avc) */
code = afsremove(adp, tdc, avc, unlname, cred, &treq);
-----------------------------------------------------------------
Hartmut Reuter e-mail reuter@rzg.mpg.de
phone +49-89-3299-1328
RZG (Rechenzentrum Garching) fax +49-89-3299-1301
Computing Center of the Max-Planck-Gesellschaft (MPG) and the
Institut fuer Plasmaphysik (IPP)
-----------------------------------------------------------------