Re: [PATCH] warnkill trivia 2/2

From: Tomas Szepe (szepe@pinerecords.com)
Date: Sun Sep 01 2002 - 06:37:42 EST


> From: Tomas Szepe <szepe@pinerecords.com>
> Date: Sun, 1 Sep 2002 13:28:56 +0200
>
> > I think you mean something like "atomic_t const * v" which means the
> > pointer is constant, not the value.
>
> Precisely.
>
> BTW who even passes around const atomic_t's? Ie. what
> genrated the warning and made you even edit this to begin with?

fs/reiserfs/buffer2.c, line ~28:
atomic_t gets the const quality on account of being a member
of a const struct buffer_head instance.

void wait_buffer_until_released (const struct buffer_head * bh)
{
  int repeat_counter = 0;

  while (atomic_read (&(bh->b_count)) > 1) {

    if ( !(++repeat_counter % 30000000) ) {
      reiserfs_warning ("vs-3050: wait_buffer_until_released: nobody releases buffer (%b). Still waiting (%d) %cJDIRTY %cJWAIT\n",
                        bh, repeat_counter, buffer_journaled(bh) ? ' ' : '!',
                        buffer_journal_dirty(bh) ? ' ' : '!');
    }
    run_task_queue(&tq_disk);
    yield();
  }
  if (repeat_counter > 30000000) {
    reiserfs_warning("vs-3051: done waiting, ignore vs-3050 messages for (%b)\n", bh) ;
  }
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:13 EST