summaryrefslogtreecommitdiff
path: root/fs/jbd/commit.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-10-18 18:01:03 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-18 18:01:03 -0700
commit91cd0c2bdb62901f3a8fcac3584b392f3c8115b0 (patch)
tree9473db08461f774e396b077131be7c8e5e33f8d9 /fs/jbd/commit.c
parenta8589849ae101ada752982b34ab4a6d8f81bfcb3 (diff)
[PATCH] jbd wakeup fix
Processes can sleep in do_get_write_access(), waiting for buffers to be removed from the BJ_Shadow state. We did this by doing a wake_up_buffer() in the commit path and sleeping on the buffer in do_get_write_access(). With the filtered bit-level wakeup code this doesn't work properly any more - the wake_up_buffer() accidentally wakes up tasks which are sleeping in lock_buffer() as well. Those tasks now implicitly assume that the buffer came unlocked. Net effect: Bogus I/O errors when reading journal blocks, because the buffer isn't up to date yet. Hence the recently spate of journal_bmap() failure reports. The patch creates a new jbd-private BH flag purely for this wakeup function. So a wake_up_bit(..., BH_Unshadow) doesn't wake up someone who is waiting for a wake_up_bit(BH_Lock). JBD was the only user of wake_up_buffer(), so remove it altogether. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jbd/commit.c')
-rw-r--r--fs/jbd/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index f8a1dea56611..b4d6654ef7f2 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -579,7 +579,7 @@ wait_for_iobuf:
journal_file_buffer(jh, commit_transaction, BJ_Forget);
/* Wake up any transactions which were waiting for this
IO to complete */
- wake_up_buffer(bh);
+ wake_up_bit(&bh->b_state, BH_Unshadow);
JBUFFER_TRACE(jh, "brelse shadowed buffer");
__brelse(bh);
}