]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix jbd assert failure on IO error.
authorAndrew Morton <akpm@digeo.com>
Thu, 3 Apr 2003 00:29:13 +0000 (16:29 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Apr 2003 00:29:13 +0000 (16:29 -0800)
From: Stephen Tweedie <sct@redhat.com>

The buffer_uptodate flag gets cleared on IO failure, and this can panic jbd
when it tries to write such a buffer.  Relax the panic to be just a warning.

fs/jbd/transaction.c

index 06d27895de7d23615f4c36a0b9ad33f98111b024..15694bfcb1470910631b0b853e2413ab02403376 100644 (file)
@@ -666,7 +666,8 @@ done_locked:
                int offset;
                char *source;
 
-               J_ASSERT_JH(jh, buffer_uptodate(jh2bh(jh)));
+               J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)),
+                           "Possible IO failure.\n");
                page = jh2bh(jh)->b_page;
                offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
                source = kmap(page);