Andrew Morton wrote: > Andrew Morton wrote: > >> buffer_error() was always supposed to be temporary. Once per month someone >> reports the one in __find_get_block_slow(), but that's all. The only >> reason for keeping it around is as a debug aid to filesystem developers. >> >> We could make it a no-op if !CONFIG_BUFFER_DEBUG. > > > But even if we do that, the compiler cannot optimise away things like: > > if (atomic_read(&bh->b_count) == 0 && > !PageLocked(bh->b_page) && > !PageWriteback(bh->b_page)) > do {} while (0); Nod. > so if it offends you, go kill the thing outright. If you like config variables, here's a second patch (untested but should be obvious). As a side note, we need a Kconfig for generic debugging options... I would rather not kill the code in submit_bh() outright, just disable it for non-filesystem developers. For me, buffer_error() definition is secondary to disabling these checks-that-noone-hits in the submit_bh() fast path. Jeff