Re: Linux 2.4.18-pre4

Ingo Oeser (ingo.oeser@informatik.tu-chemnitz.de)
Wed, 16 Jan 2002 10:22:56 +0100


On Tue, Jan 15, 2002 at 07:56:38PM -0200, Marcelo Tosatti wrote:
[pre4 Announcement]

What is this hunk supposed to do?
diff -urN linux-2.4.18-pre3/fs/buffer.c linux/fs/buffer.c
--- linux-2.4.18-pre3/fs/buffer.c Fri Dec 21 09:41:55 2001
+++ linux/fs/buffer.c Tue Jan 15 15:10:18 2002
@@ -1633,12 +1671,34 @@
*/
while(wait_bh > wait) {
wait_on_buffer(*--wait_bh);
- err = -EIO;
if (!buffer_uptodate(*wait_bh))
- goto out;
+ return -EIO;
}
return 0;
out:
+ /*
+ * Zero out any newly allocated blocks to avoid exposing stale
+ * data. If BH_New is set, we know that the block was newly
+ * allocated in the above loop.
+ */
+ bh = head;
+ block_start = 0;
[1]
+ do {
+ block_end = block_start+blocksize;
+ if (block_end <= from)
+ continue;
[2]

The situation between [1] and [2] won't change, so I don't
understand the "continue" here and think it will either never be
triggered or an endless loop.

Could you or the one introducing this clarify?

Thanks & Regards

Ingo Oeser

-- 
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
     >>>   4. Chemnitzer Linux-Tag - 09.+10. Maerz 2002 <<<
              http://www.tu-chemnitz.de/linux/tag/
-
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/