[patch] fishfs bugs



Hi,

the first chunk is trivial: you check for got_interrupt but it is always a
non-zero number, actually the address of teh got_interrupt() function :))
you probably noticed that it doesn't work so that ! was removed :)

the second part is probably bug, i see no sense of checking for
got_interrupt() if interrupt check is disabled...


Index: fish.c
===================================================================
RCS file: /cvsroot/arpi/amc-4.6/vfs/fish.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fish.c
--- fish.c	10 Feb 2003 23:16:45 -0000	1.1.1.1
+++ fish.c	13 Feb 2003 20:12:47 -0000
@@ -527,7 +527,7 @@
     
     while (1) {
 	while ((n = read(h, buffer, sizeof(buffer))) < 0) {
-	    if ((errno == EINTR) && got_interrupt)
+	    if ((errno == EINTR) && !got_interrupt())
 	        continue;
 	    print_vfs_message(_("fish: Local read failed, sending zeros") );
 	    close(h);
@@ -615,13 +615,13 @@
     vfs_s_super *super = FH_SUPER;
     int n = 0;
     len = MIN( fh->u.fish.total - fh->u.fish.got, len );
-    disable_interrupt_key();
+    enable_interrupt_key();
     while (len && ((n = read (SUP.sockr, buf, len))<0)) {
         if ((errno == EINTR) && !got_interrupt())
 	    continue;
 	break;
     }
-    enable_interrupt_key();
+    disable_interrupt_key();
 
     if (n>0) fh->u.fish.got += n;
     if (n<0) linear_abort(me, fh);



A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    "However, many people beg for its inclusion in Debian. Why?" - Gabucino
  "Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]