]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Properly AFS_GUNLOCK() when returning an error after having previously
authorNickolai Zeldovich <kolya@mit.edu>
Fri, 19 Apr 2002 05:10:38 +0000 (05:10 +0000)
committerGarry Zacheiss <zacheiss@mit.edu>
Fri, 19 Apr 2002 05:10:38 +0000 (05:10 +0000)
AFS_GLOCK()'ed, in afs_mount() and afs_unmount().

(cherry picked from commit ebcef806960b3507d4de6edfd59a89c37b6ca2fd)

src/afs/SOLARIS/osi_vfsops.c

index 239a5c57ba4a73a72f8417f0946e212a3b3aedc0..009b34a6bda7fcae213c658c094756a6be42669f 100644 (file)
@@ -41,11 +41,14 @@ int afs_mount(struct vfs *afsp, struct vnode *amvp, struct mounta *uap,
 
     AFS_STATCNT(afs_mount);
 
-    if (!suser(credp))
+    if (!suser(credp)) {
+       AFS_GUNLOCK();
        return EPERM;
+    }
     afsp->vfs_fstype = afsfstype;
 
     if (afs_globalVFS) { /* Don't allow remounts. */
+       AFS_GUNLOCK();
        return EBUSY;
     }
 
@@ -68,8 +71,10 @@ int afs_unmount (struct vfs *afsp, struct AFS_UCRED *credp)
     AFS_GLOCK();
     AFS_STATCNT(afs_unmount);
 
-    if (!suser(credp))
+    if (!suser(credp)) {
+       AFS_GUNLOCK();
        return EPERM;
+    }
     afs_globalVFS = 0;
     afs_shutdown();