[OpenAFS-devel] Re: OpenAFS 1.4.7pre1 Oops

Harald Barth haba@kth.se
Wed, 02 Apr 2008 12:16:50 +0200 (CEST)


Now my box hung, too. I looked at
STABLE14-linux-dont-flush-writes-on-exec-20080326 osi_vnodeops.c:


       	     AFS_GLOCK();
 	 
 	     if (fp->f_flags | O_RDONLY)     /* readers dont flush */
 	         return 0;

The return 0 after the AFS_GLOCK() sounds alarm bells in my head.
Shouldn't this be something like goto out; (but the current out: is
not usable because of the free) so I'd do it like this:

       	     AFS_GLOCK();

 	     if (fp->f_flags | O_RDONLY) {    /* readers dont flush */
                 AFS_GUNLOCK();
	         return 0;
             }

Harald.