if (!autofs_oz_mode(sbi))
                return -EACCES;
 
+       /* autofs_oz_mode() needs to allow path walks when the
+        * autofs mount is catatonic but the state of an autofs
+        * file system needs to be preserved over restarts.
+        */
+       if (sbi->catatonic)
+               return -EACCES;
+
        BUG_ON(!ino);
 
        autofs_clean_ino(ino);
        struct autofs_info *ino = autofs_dentry_ino(dentry);
        struct autofs_info *p_ino;
 
-       /* This allows root to remove symlinks */
-       if (!autofs_oz_mode(sbi) && !capable(CAP_SYS_ADMIN))
-               return -EPERM;
+       if (!autofs_oz_mode(sbi))
+               return -EACCES;
+
+       /* autofs_oz_mode() needs to allow path walks when the
+        * autofs mount is catatonic but the state of an autofs
+        * file system needs to be preserved over restarts.
+        */
+       if (sbi->catatonic)
+               return -EACCES;
 
        if (atomic_dec_and_test(&ino->count)) {
                p_ino = autofs_dentry_ino(dentry->d_parent);
        if (!autofs_oz_mode(sbi))
                return -EACCES;
 
+       /* autofs_oz_mode() needs to allow path walks when the
+        * autofs mount is catatonic but the state of an autofs
+        * file system needs to be preserved over restarts.
+        */
+       if (sbi->catatonic)
+               return -EACCES;
+
        spin_lock(&sbi->lookup_lock);
        if (!simple_empty(dentry)) {
                spin_unlock(&sbi->lookup_lock);
        if (!autofs_oz_mode(sbi))
                return -EACCES;
 
+       /* autofs_oz_mode() needs to allow path walks when the
+        * autofs mount is catatonic but the state of an autofs
+        * file system needs to be preserved over restarts.
+        */
+       if (sbi->catatonic)
+               return -EACCES;
+
        pr_debug("dentry %p, creating %pd\n", dentry, dentry);
 
        BUG_ON(!ino);