In message <[EMAIL PROTECTED]>,Jeffrey Hutzelman writes:
>Besides calling BUG() inline, which is a good thing, your code has the 
>effect of changing the behavior on 2.4 so that we call BUG() instead of 
>trying to dereference a NULL pointer.  I'm pretty sure there's a reason we 

that can be fixed i think.  i dont think BUG() is available in all
2.4 kernels.  just recent ones.

>Also, your change to AFS_ASSERT_GLOCK() means that the macro now expands to 
>a statement instead of an expression, and a statement that might affect 
>flow control at that.  Consider something like this:
>Instead, I'd leave AFS_ASSERT_GLOCK() alone, and arrange for osi_Panic() to 
>also expand to an expression.  Maybe something like
>
>#define osi_Panic(msg...) (printk(KERN_CRIT "openafs: " msg), bug(), 0)

someone else already pointed that out.  it probably should just be
wrapped in a do { } while(0) but your alternative is probably fine.
however, it seems a little less clear than the do while.
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to