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;
}
AFS_GLOCK();
AFS_STATCNT(afs_unmount);
- if (!suser(credp))
+ if (!suser(credp)) {
+ AFS_GUNLOCK();
return EPERM;
+ }
afs_globalVFS = 0;
afs_shutdown();