Linux : Don't leak GLOCK when writing CellServDB
[openafs.git] / src / afs / LINUX / osi_proc.c
index 2ac51af..53478bd 100644 (file)
@@ -14,8 +14,6 @@
 #include <afsconfig.h>
 #include "afs/param.h"
 
-RCSID
-    ("$Header$");
 
 #include <linux/module.h> /* early to avoid printf->printk mapping */
 #ifdef HAVE_KERNEL_LINUX_SEQ_FILE_H
@@ -24,8 +22,8 @@ RCSID
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
 #include "afs/nfsclient.h"
-#include "h/unistd.h"          /* For syscall numbers. */
-#include "h/mm.h"
+#include <linux/unistd.h>              /* For syscall numbers. */
+#include <linux/mm.h>
 
 #ifdef AFS_AMD64_LINUX20_ENV
 #include <asm/ia32_unistd.h>
@@ -69,7 +67,7 @@ static void *c_next(struct seq_file *m, void *p, loff_t *pos)
        tq = QNext(cq);
 
        if (tq == &CellLRU)
-               return NULL;
+               tq = NULL;
 
        AFS_GUNLOCK();
        return tq;
@@ -91,7 +89,7 @@ static int c_show(struct seq_file *m, void *p)
        seq_printf(m, ">%s #(%d/%d)\n", tc->cellName,
                   tc->cellNum, tc->cellIndex);
 
-       for (j = 0; j < MAXCELLHOSTS; j++) {
+       for (j = 0; j < AFS_MAXCELLHOSTS; j++) {
                afs_uint32 addr;
 
                if (!tc->cellHosts[j]) break;
@@ -284,7 +282,7 @@ length)
             }
         }
 
-        for (cnt = 0; cnt < MAXCELLHOSTS; cnt++) {
+        for (cnt = 0; cnt < AFS_MAXCELLHOSTS; cnt++) {
             if (!tc->cellHosts[cnt]) break;
             pos += 90;
             if (pos <= offset) {