lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [1/4] standardize bit waiting data type
William Lee Irwin III wrote:

> @@ -153,15 +119,13 @@
> void __wait_on_buffer(struct buffer_head * bh)
> {
> wait_queue_head_t *wqh = bh_waitq_head(bh);
> - DEFINE_BH_WAIT(wait, bh);
> + DEFINE_WAIT_BIT(wait, &bh->b_state, BH_Lock);
>
> - do {
> - prepare_to_wait(wqh, &wait.wait, TASK_UNINTERRUPTIBLE);
> - if (buffer_locked(bh)) {
> - sync_buffer(bh);
> - io_schedule();
> - }
> - } while (buffer_locked(bh));
> + prepare_to_wait(wqh, &wait.wait, TASK_UNINTERRUPTIBLE);
> + if (buffer_locked(bh)) {
> + sync_buffer(bh);
> + io_schedule();
> + }
> finish_wait(wqh, &wait.wait);
> }

Why don't you need a do..while loop any more ?

There is also no loop in __wait_on_bit() in the completed patch series.

Cheers
Martin
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.027 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site