From 7ba93ca79e75ac3eca6c08597b0c88abbd09e1e1 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 2 Apr 2003 16:29:13 -0800 Subject: [PATCH] [PATCH] Fix jbd assert failure on IO error. From: Stephen Tweedie 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 06d27895de7d2..15694bfcb1470 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -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); -- 2.53.0