Patch: linux-2.5.30/fs/ntfs BUG_ON(cond1 || cond2) bugs(!) and clean ups

From: Adam J. Richter (
Date: Mon Aug 05 2002 - 15:41:30 EST

        The following patch replaces all BUG_ON(condition1 || condition2)
statements in fs/ntfs with separate BUG_ON statements, usually like so:


        This provides more information if the BUG_ON statement is every

        In addition, the fs/ntfs code had some
BUG_ON(...atomic_dec_and_test(...)) statements. BUG_ON conditions should
not have side effects, because you are supposed to be able to compile out
BUG_ON statements to have the code run faster (which is an important
guarantee for encouraging developers to write BUG_ON statements). I
have translated the offending cases to statements of the following form:


        I have attached the patch below. I would like to get these
changes into Linus's 2.5 tree. Please let me know if you want to take
it from here, if you want me to submit this patch to Linus or if you
want me to do something else. Thanks for your time, and for maintaining
the NT file system on Linux.

Adam J. Richter     __     ______________   575 Oroville Road     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:28 EST