libafs: fix lock leak during shutdown
[openafs.git] / src / afs / VNOPS / afs_vnop_attrs.c
index 854f4ee..c25e90d 100644 (file)
@@ -239,8 +239,13 @@ afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, afs_ucred_t *acred)
     afs_BozonLock(&avc->pvnLock, avc);
 #endif
 
-    if (afs_shuttingdown)
+    if (afs_shuttingdown) {
+#ifdef AFS_BOZONLOCK_ENV
+       afs_BozonUnlock(&avc->pvnLock, avc);
+#endif
+       AFS_DISCON_UNLOCK();
        return EIO;
+    }
 
     if (!(avc->f.states & CStatd)) {
        if (!(code = afs_InitReq(&treq, acred))) {