--- 1.78/fs/buffer.c Thu Dec 5 15:55:00 2002 +++ edited/fs/buffer.c Fri Dec 13 15:24:52 2002 @@ -871,8 +871,8 @@ spin_lock(&lru_list_lock); } - spin_unlock(&lru_list_lock); err2 = osync_buffers_list(list); + spin_unlock(&lru_list_lock); if (err) return err; @@ -889,6 +889,8 @@ * you dirty the buffers, and then use osync_buffers_list to wait for * completion. Any other dirty buffers which are not yet queued for * write will not be flushed to disk by the osync. + * + * Expects lru_list_lock to be held at entry. */ static int osync_buffers_list(struct list_head *list) { @@ -896,8 +898,6 @@ struct list_head *p; int err = 0; - spin_lock(&lru_list_lock); - repeat: list_for_each_prev(p, list) { bh = BH_ENTRY(p); @@ -913,7 +913,6 @@ } } - spin_unlock(&lru_list_lock); return err; }