tmpfree: update all the usages of brelse that will now be tmpfree
authorAlan Cox <alan@linux.intel.com>
Thu, 19 Oct 2017 20:07:55 +0000 (21:07 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 19 Oct 2017 20:07:55 +0000 (21:07 +0100)
Kernel/filesys.c
Kernel/platform-coco2/mini_ide_discard.c
Kernel/platform-coco2cart/mini_ide_discard.c
Kernel/platform-coco3/main.c
Kernel/platform-coco3/mbr.c
Kernel/platform-dragon-nx32/devtty.c
Kernel/platform-nc100/devgfx.c
Kernel/platform-trs80/devgfx.c
Kernel/platform-z80pack/main.c
Kernel/platform-zx128/devmdv.c

index c205f30..5d6cf74 100644 (file)
@@ -1,4 +1,4 @@
-#undef DEBUG
+#define DEBUG
 #include <kernel.h>
 #include <kdata.h>
 #include <printf.h>
@@ -379,7 +379,7 @@ void filename(char *userspace_upath, char *name)
     /* And move past the slash, or not the string start */
     ptr++;
     memcpy(name, ptr, FILENAME_LEN);
-    brelse(buf);
+    tmpfree(buf);
 }
 
 
index 49eff53..4054e27 100644 (file)
@@ -93,5 +93,5 @@ int ide_probe(void)
        ide_identify(0, buf);
        if (ide_present)
                ide_identify(1, buf);
-       brelse((bufptr) buf);
+       tmpfree(buf);
 }
index 60c7e2c..2bdfc3c 100644 (file)
@@ -97,5 +97,5 @@ void ide_probe(void)
        ide_identify(0, buf);
        if (ide_present)
                ide_identify(1, buf);
-       brelse((bufptr) buf);
+       tmpfree(buf);
 }
index 9ea67ac..be96e4b 100644 (file)
@@ -112,7 +112,7 @@ char *pathbuf(void)
 
 void pathfree(char *tb)
 {
-       brelse(tb);
+       tmpfree(tb);
 }
 
 #endif
index 9173b97..b3d239f 100644 (file)
@@ -83,5 +83,5 @@ void mbr_parse(char letter)
        }
                
        /* release temporary memory */
-       brelse((bufptr)br);
+       tmpfree(br);
 }
index 17b66b8..c8d9a2e 100644 (file)
@@ -440,7 +440,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr)
 
                tmp = (uint8_t *)tmpbuf();
                err = gfx_draw_op(arg, ptr, tmp);
-               brelse((bufptr) tmp);
+               tmpfree(tmp);
                if (err) {
                        udata.u_error = err;
                        err = -1;
index 034a0f8..8514d36 100644 (file)
@@ -56,7 +56,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr)
     if (draw_validate(ptr, l, 480, 64))
       goto bad; */
     video_cmd(tmp);
-    brelse((bufptr) tmp);
+    tmpfree(tmp);
     return 0;
   default:
     udata.u_error = EINVAL;
index d803d8e..e6a08ab 100644 (file)
@@ -132,7 +132,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr)
     if (vmode == 1) {
       uint8_t *tmp = (uint8_t *)tmpbuf();
       err = gfx_draw_op(arg, ptr, tmp);
-      brelse((bufptr) tmp);
+      tmpfree(tmp);
       if (err) {
         udata.u_error = err;
         err = -1;
index 6dddbec..6bc74af 100644 (file)
@@ -55,7 +55,7 @@ char *pathbuf(void)
 
 void pathfree(char *tb)
 {
brelse(tb);
tmpfree(tb);
 }
 
 #endif
index 2fb1156..157af7b 100644 (file)
@@ -150,7 +150,7 @@ int mdv_open(uint8_t minor, uint16_t flag)
                        kprintf("mdv_open: had to use secondary map\n");
                }
                memcpy(mdvmap[minor], t, 256);
-               brelse(t);
+               tmpfree(t);
                mdv_motor_off();
        }
        mdv_count[minor]++;