+ for (ip = inode; ip < inodeNINODE; ip++) {
+#ifdef QUOTA
+ if (ip != iq && ip->i_dev == dev)
+#else
+ if (ip->i_dev == dev)
+#endif
+ if (ip->i_count)
+ return(-1);
+ else {
+ remque(ip);
+ ip->i_forw = ip;
+ ip->i_back = ip;
+ /*
+ * as i_count == 0, the inode was on the free
+ * list already, just leave it there, it will
+ * fall off the bottom eventually. We could
+ * perhaps move it to the head of the free
+ * list, but as umounts are done so
+ * infrequently, we would gain very little,
+ * while making the code bigger.
+ */
+#ifdef QUOTA
+ dqrele(ip->i_dquot);
+ ip->i_dquot = NODQUOT;
+#endif
+ }
+ else if (ip->i_count && (ip->i_mode&IFMT)==IFBLK &&
+ ip->i_rdev == dev)
+ open++;