Commit 7ba93ca7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix jbd assert failure on IO error.

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.
parent bdf6c6a6
...@@ -666,7 +666,8 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, int force_copy) ...@@ -666,7 +666,8 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, int force_copy)
int offset; int offset;
char *source; 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; page = jh2bh(jh)->b_page;
offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK; offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
source = kmap(page); source = kmap(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment