>From 9025f9ffc675c3d8bf6c25fdebe30ca98082bab6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 19 May 2009 09:47:02 +0200 Subject: [PATCH 1/3] writeback: add memory barrier before wake_up_bit() in bdi_work_free() As per wake_up_bit() documentation, was also triggered in the wild. Process got stuck forever waiting for a bit clear that had happened. Signed-off-by: Jens Axboe --- fs/fs-writeback.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index a287c09..6052701 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -102,6 +102,7 @@ static void bdi_work_free(struct rcu_head *head) kfree(work); else { clear_bit(0, &work->state); + smp_mb__after_clear_bit(); wake_up_bit(&work->state, 0); } } -- 1.6.3.9.g6345